Skip to main content
POST
/
v1
/
transactions
/
build
Build Transaction
curl --request POST \
  --url https://api.example.com/v1/transactions/build \
  --header 'Content-Type: application/json' \
  --data '
{
  "fromAddress": "<string>",
  "toAddress": "<string>",
  "amount": "<string>",
  "chainReference": "<string>",
  "chainId": "<string>",
  "contractAddress": "<string>",
  "gasLimit": "<string>",
  "gasPrice": "<string>",
  "nonce": "<string>",
  "memo": "<string>"
}
'
{
  "txId": "<string>",
  "unsignedTxHex": "<string>",
  "signHashes": [
    {}
  ],
  "metadata": {
    "nonce": "<string>",
    "gasLimit": "<string>",
    "gasPrice": "<string>",
    "maxFeePerGas": "<string>",
    "maxPriorityFeePerGas": "<string>",
    "chainId": "<string>"
  }
}

Build Transaction

Construct an unsigned transaction for native token or ERC-20 transfers. The response includes the unsigned transaction hex and hash(es) to sign.

Request

fromAddress
string
required
Sender address
toAddress
string
required
Recipient address
amount
string
required
Amount in smallest unit (wei for ETH, lamports for SOL)
chainReference
string
required
Chain identifier (e.g., eip155:1 for Ethereum mainnet)
chainId
string
Numeric chain ID (e.g., 1 for Ethereum)
contractAddress
string
Token contract address (for ERC-20 transfers)
gasLimit
string
Gas limit (optional, auto-estimated if not provided)
gasPrice
string
Gas price in wei (optional, auto-estimated if not provided)
nonce
string
Transaction nonce (optional, auto-fetched if not provided)
memo
string
Optional memo/data field

Response

txId
string
Internal transaction identifier
unsignedTxHex
string
Unsigned transaction in hex format
signHashes
array
Array of hashes to sign
metadata
object
Transaction metadata

Example

curl -X POST https://api.axonvault.io/v1/transactions/build \
  -H "X-Access-Key: ak_live_abc123" \
  -H "X-Signature: 5d41402abc4b2a76b9719d911017c592" \
  -H "X-Timestamp: 2024-01-15T10:30:00Z" \
  -H "Content-Type: application/json" \
  -d '{
    "fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE8d",
    "toAddress": "0x1234567890123456789012345678901234567890",
    "amount": "1000000000000000000",
    "chainReference": "eip155:1",
    "chainId": "1"
  }'

Response Example

{
  "txId": "tx_abc123",
  "unsignedTxHex": "0xf86c0a8502540be400825208941234567890123456789012345678901234567890880de0b6b3a76400008025a0...",
  "signHashes": [
    "0xabc123def456789..."
  ],
  "metadata": {
    "nonce": "10",
    "gasLimit": "21000",
    "gasPrice": "20000000000",
    "chainId": "1",
    "chainReference": "eip155:1"
  }
}

Errors

Error TypeStatusDescription
invalid_request400Missing required fields
invalid_address400Invalid from or to address
insufficient_balance400Not enough funds
policy_denied403Transaction blocked by policy

ERC-20 Transfer Example

curl -X POST https://api.axonvault.io/v1/transactions/build \
  -H "X-Access-Key: ak_live_abc123" \
  -H "X-Signature: ..." \
  -H "X-Timestamp: 2024-01-15T10:30:00Z" \
  -H "Content-Type: application/json" \
  -d '{
    "fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f8fE8d",
    "toAddress": "0x1234567890123456789012345678901234567890",
    "amount": "1000000",
    "chainReference": "eip155:1",
    "contractAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48"
  }'

Next Steps

After building a transaction:
  1. Sign the transaction
  2. Construct signed transaction
  3. Submit to blockchain