Skip to main content
POST
/
custodians
/
me
/
clients
/
{clientId}
/
chains
/
{chain}
/
assets
/
send
/
build-transaction
Build a transaction
curl --request POST \
  --url https://api.portalhq.io/api/v3/custodians/me/clients/{clientId}/chains/{chain}/assets/send/build-transaction \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "to": "0xdFd8302f44727A6348F702fF7B594f127dE3A902",
  "token": "USDC",
  "amount": "0.01"
}
'
{
  "transaction": {
    "from": "0x21d8d1d2d9907c051670d8c9a80bd2192d273f8d",
    "to": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
    "data": "0xa9059cbb000000000000000000000000dfd8302f44727a6348f702ff7b594f127de3a9020000000000000000000000000000000000000000000000000000000000002710"
  },
  "metadata": {
    "rawAmount": "10000",
    "formattedAmount": "0.01",
    "tokenDecimals": 6,
    "tokenAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
  }
}

Authorizations

Authorization
string
header
required

Portal API Key (Custodian API Key). Pass as a Bearer token in the Authorization header.

Path Parameters

clientId
string
required

The unique identifier of the client.

chain
string
required

The blockchain chain identifier. Use either a friendly name or CAIP-2 format. When using CAIP-2 format in URLs, ensure the colon (:) is URI-encoded as %3A.

Supported chains:

  • ethereum (eip155:1)
  • sepolia (eip155:11155111)
  • base (eip155:8453)
  • base-sepolia (eip155:84532)
  • polygon (eip155:137)
  • polygon-amoy (eip155:80002)
  • celo (eip155:42220)
  • celo-alfajores (eip155:44787)
  • monad-testnet (eip155:10143)
  • solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp)
  • solana-devnet (solana:EtWTRABZaYq6iMfeYKouRu166VU2xqa1)
  • tron (tron:mainnet)
  • tron-nile (tron:nile)
  • tron-shasta (tron:shasta)
  • stellar (stellar:pubnet)
  • stellar-testnet (stellar:testnet)
  • bitcoin-segwit (bip122:000000000019d6689c085ae165831e93-p2wpkh)
  • bitcoin-segwit-testnet (bip122:000000000933ea01ad0ee984209779ba-p2wpkh)

Body

application/json
to
string
required

The recipient's wallet address.

token
string
required

The token symbol (e.g. USDC) or contract/mint address.

amount
string
required

The amount to transfer in the token's primary denomination. Must be greater than zero.

Response

Unsigned transaction built successfully. The response structure depends on the chain type.

transaction
object
metadata
object