Subscribe Transfer
Subscribe to real-time account transfer updates (deposits, withdrawals, transfers, fees, etc.) for GET account/transfers. Uses the Spacetime account_transfers table. Requires account and subaccount index.
Subscribe to account transfer updates (requires authentication, supports delegation)#
Subscribe to real-time account transfer updates (deposits, withdrawals, transfers, fees, etc.) for GET account/transfers. Uses the Spacetime account_transfers table. Requires account and subaccount index.
Request to subscribe to account transfer updates (requires authentication, supports delegation)
Parameters
sourcestringMust be 'transfer'
accountstringEthereum address of the account (must match authenticated user or user must be a delegate)
subaccountIndexintegerSubaccount index to subscribe to transfer updates for
{
"jsonrpc": "2.0",
"method": "subscribe",
"params": {
"source": "transfer",
"account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
"subaccountIndex": 0
},
"id": 11
}Generic success response for subscription requests
Parameters
message?stringSuccess message
{
"jsonrpc": "2.0",
"result": {
"message": "Subscribed to trades"
},
"usIn": 1234567890123,
"usOut": 1234567890456,
"usDiff": 333,
"id": 2
}Real-time notification for a new account transfer (deposit, withdrawal, transfer, fee, etc.). Same shape as GET /account/transfers items. Wrapped with type field to identify the message type.
Parameters
transferTypestringamountstringSigned amount (positive = credit, negative = debit), fixed-point string
accountstringAccount address (hex)
subaccountIndexintegerSubaccount index
counterpartyAccountstringCounterparty account (zero address for external flows)
counterpartySubaccountIndexintegerCounterparty subaccount index
timestampMillisintegerBlock timestamp in milliseconds since Unix epoch
symbolstringMarket symbol (e.g. ETH-USD-PERP)
{
"type": "Transfer",
"data": {
"transferType": "Deposit",
"amount": "1000.000000",
"account": "0xe1c03ec3bcf509b3e8e63abcd03edc661ffe6a78",
"subaccountIndex": 0,
"counterpartyAccount": "0x0000000000000000000000000000000000000000",
"counterpartySubaccountIndex": 0,
"timestampMillis": 1752846925000,
"symbol": "ETH-USD-PERP"
}
}Error response for failed requests
Parameters
jsonrpcstringJSON-RPC version
errorobjectusInintegerRequest received timestamp in milliseconds
usOutintegerResponse sent timestamp in milliseconds
usDiffintegerProcessing time in milliseconds
id?string | integer | nullRequest identifier (if provided in request, otherwise null)
{
"jsonrpc": "2.0",
"error": {
"code": -32602,
"message": "Invalid subscription params"
},
"usIn": 1234567890123,
"usOut": 1234567890456,
"usDiff": 333,
"id": 2
}