Skip to main content

Send Currency Token by ID

Sends an amount of a currency token to a recipient address. The token must be in status 3 (Active). The transfer is signed by the wallet frozen onto the token at creation, on the token's network. The token's node must be the platform root node and inside your API key's node subtree.

amount is a decimal string with at most as many decimals as the token's decimals (6 for a token created through this API): "250.5" is accepted, "0.1234567" is refused, never rounded. See Amounts and Percentages.

The call is asynchronous: it records a SendCurrencyToken (type 3) transaction, publishes it and returns its ID. Poll Get Currency Token Transactions by ID until it reaches status 3 (Done) or 4 (Error).

Required permission: currency-token:send

Request​

POST /v2/admin/currency-tokens/{currency_token_id}/send

Parameters​

NameTypeInDescription
currency_token_idstringpathRequired. Currency token ID (24-character hex)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>
Content-TypeRequired. application/json

Body​

FieldTypeRequiredDescription
amountstringYesAmount to send, greater than zero, with at most the token's decimals
recipient_walletstringYesRecipient wallet address

Example​

curl --request POST \
--url '{{baseUrl}}/v2/admin/currency-tokens/6a859ae35a7db4268dfb40d2/send' \
--header 'Authorization: Bearer <access_token>' \
--header 'Content-Type: application/json' \
--data '{
"amount": "250.5",
"recipient_wallet": "0x3b4E4dd67EE4054514bA2101e981f4C4D44eFDDc"
}'

Response​

{
"transaction_id": "6a8b5e13f9129816a6cc7a13"
}

Response Fields​

FieldTypeDescription
transaction_idstringThe currency token transaction this call started. A 200 means the send was queued, not that it finished

Errors​

StatusCodeDescription
40010015Validation failed — see details. Includes a missing recipient_wallet, and a missing, zero, malformed or too precise amount
40410001 (domain 15)Currency token not found
40010005 (domain 15)The token is not Active: its deploy has not confirmed
40010001 (domain 2)The token's node was not found
40310005 (domain 2)The token's node is not the platform root node, or is outside your API key's node subtree
50010000Unexpected server error, including a currency_token_id that is not a 24-character hex ID

See Errors for the error format and common codes.