vaultTransfer
Moves USDC between the account's perp balance and a vault. isDeposit: true deposits usd from the perp account into the vault; isDeposit: false withdraws usd from the account's vault equity back to it. The action is signed by an approved agent.
vaultTransferDeposit USDC from the perp account into a vault, or withdraw it back.Agent-signed
`true` deposits into the vault, `false` withdraws from it.
`NAME:address` of the network USDC contract. Vault transfers are USDC-only.
Must be `vaultTransfer`.
"vaultTransfer"USDC amount in token units, at most 6 decimal places.
Vault to deposit into or withdraw from. Hex on the wire; hashed as its 20 raw bytes.
curl -X POST https://rpc.txflow-testnet.xyz/exchange \
-H "Content-Type: application/json" \
-H "x-api-version: 2026-08-16" \
-d '{
"action": {
"type": "vaultTransfer",
"vaultAddress": "0x0303030303030303030303030303030303030303",
"usd": "100",
"isDeposit": true,
"token": "USDC:0xd04f0d19E8FbA49cfA541E272F9C60a2ad720464"
},
"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`.
"VaultTransfer"A rejected request returns `err` with a non-zero `code` and the reason in `message` (or `response`).
"ok"{
"status": "ok",
"code": 0,
"data": {
"type": "VaultTransfer",
"data": {
"statuses": [
"success"
]
}
}
}Signing
vaultTransfer is agent-signed with two differences from other actions:
vaultAddressinside the action is hashed as its 20 raw bytes (MessagePack binary), while the JSON body carries the hex string.- The hash always ends with a
0x00vault flag. Send the envelopevaultAddressasnull; the target vault is already in the action.
Keep the key order vaultAddress, usd, isDeposit, token. See MessagePack rules.
Next steps
Confirm the transfer and the new vault equity on vaultUpdates. The perp balance change shows in clearinghouseState.