subAccountSpotTransfer
Transfer spot tokens between a main account and its sub-accounts.
Sample Data#
{
"signature": {
"r": "0xd37da2735026576e0cfcd347f381499e142423edae6ce9a170fe985bd99f7aaf",
"s": "0x2999636e5fb176a4ae4d3cb1c4682496fcd0bd2b79e84497865340dfeb02c801",
"v": 27
},
"action": {
"type": "subAccountSpotTransfer",
"subAccountUser": "0x9266865bb6afb4c4f618544dd3b8c970f17aa664",
"isDeposit": true,
"token": "BZEC:0x33b2c5252e8ea8431808129c41668129",
"amount": "4.63"
},
"nonce": 1767952944523
}
Field Reference#
Action Fields#
| Field | Type | Description |
|---|---|---|
type | string | Always "subAccountSpotTransfer" |
subAccountUser | string | Sub-account address |
isDeposit | boolean | true to deposit to sub-account, false to withdraw |
token | string | Token identifier |
amount | string | Amount to transfer |
Use Cases#
Sub-Account Spot Funding#
Track spot token allocations to sub-accounts:
def process_subAccountSpotTransfer_action(action):
sub_account = action.get('subAccountUser')
token = action.get('token').split(':')[0]
amount = action.get('amount')
direction = 'to' if action.get('isDeposit') else 'from'
print(f"Spot transfer: {amount} {token} {direction} sub-account")
Related Action Types#
- subAccountTransfer - USD transfers
- spotSend - Direct spot transfers