tokenSend
Moves a token between TxFlow sub-accounts, or sends it to another address when
toAddress is present. Outcome trading settles on the outcome sub-account,
so collateral commonly moves from perp to outcome before the first trade.
The same action also sends to another user or a TxRelay peg.
Direct EIP-712, signed by the account key — an agent cannot move funds.
tokenSendMove funds between your sub-accounts (e.g. perp → outcome), to another user, or to a TxRelay peg.Direct EIP-712, signed by the account key
Decimal amount in token units, not wei.
TxFlow signing API version.
TxFlow chain ID.
Source sub-account. `perps` is accepted as an alias of `perp`.
"perp""spot""outcome"Fresh millisecond timestamp. Direct EIP-712 actions carry the nonce inside the action as well as in the outer payload; the two must match.
Destination sub-account on the recipient.
"perp""spot""outcome"`NAME:address` of the TxFlow-side token. USDC uses the network USDC contract.
TxFlow network name used by the EIP-712 action and domain.
Must be `tokenSend`.
"tokenSend"`null` or omitted transfers between your own sub-accounts (`TransferToken`). A non-null address sends to that user or a TxRelay peg (`SendToken`) and may charge a one-time activation fee.
curl -X POST https://rpc.txflow-testnet.xyz/exchange \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"action": {
"type": "tokenSend",
"txflowNetwork": "TxFlow-Testnet",
"chainId": 2511,
"apiVersion": 1,
"token": "USDC:0xd04f0d19E8FbA49cfA541E272F9C60a2ad720464",
"amount": "100",
"nonce": 1757992743994,
"fromAccountType": "perp",
"toAccountType": "outcome"
},
"signature": {
"r": "0x<r>",
"s": "0x<s>",
"v": 27
},
"nonce": 1757992743994,
"vaultAddress": null,
"signatureChainId": null
}'`0` on success.
The action's internal name, which does not always match the request `type`.
"TokenSend"A rejected request returns `err` with a non-zero `code` and the reason in `message` (or `response`).
"ok"{
"status": "ok",
"code": 0,
"data": {
"type": "TokenSend",
"data": {
"statuses": [
"success"
]
}
}
}For a transfer between your own sub-accounts, omit toAddress. The EIP-712
primary type is TransferToken. When toAddress is present, the primary type
is SendToken.
token is NAME:address (for example the testnet USDC id used in Try Testnet). fromAccountType and toAccountType name the sub-accounts: perp, outcome, or spot (non-USDC token balances, used for cross-chain withdrawals below).
Both the action and the outer exchange envelope carry the same nonce.
Two EIP-712 primary types
toAddress | Primary type | Typical use |
|---|---|---|
null or omitted | TransferToken | Between your own sub-accounts (e.g. perp ↔ outcome) |
| A non-zero address | SendToken | Another TxFlow user, or the TxRelay peg for a cross-chain withdraw |
TransferToken(string txflowNetwork,string amount,string fromAccountType,string toAccountType,string token,uint64 nonce)
SendToken(string txflowNetwork,address toAddress,string amount,string fromAccountType,string toAccountType,string token,uint64 nonce)The wire action always uses type: "tokenSend". Hash the empty string for omitted toAddress is not used — the TransferToken typehash is selected instead.
The first SendToken to a new destination may charge a one-time 1 USDC activation fee (0 after that destination has been activated, when sending to yourself, or when the destination is waived).
Cross-chain withdraw (USDC and other assets)
POSTTxRelay deposit-address withsrc_chain: "txflow",dst_chainset to the external network, anddst_addressset to the user's destination.tokenSendthe asset to the peg returned asdeposit_address:- USDC:
fromAccountType/toAccountType=perp - other assets:
spot→spot
- USDC:
Native Arbitrum USDC outflows use withdraw3, not this action.
Signing
This action is signed directly by the account key; an agent key cannot move
funds. signatureChainId, when supplied in the outer envelope, selects the
EIP-712 domain chain id without changing the action's business chainId.
See Signing.
Next steps
Confirm with userNonFundingLedgerUpdates (deltaTypes including tokenSend) and sub-account reads such as perpClearinghouseState.