Real-time accounting updates including fills, cancellations, merges, and payouts. This stream provides atomic updates for both cash and position balances.
Query Parameters:
- since=<uint64> Last applied seq for resume (optional; must be >0; absent or 0 → start from live tail)
- market=<id> Repeatable; filter by market_id
- account_id=<id> Repeatable; filter by account_id
Resume semantics are identical to the /orders stream.
Accounting Update Frame
Unified atomic update of cash and position balances for an account within one engine tick.
Payload
-
Value is
accounting_update. -
Hide payload attributes Show payload attributes object
-
System reference (order_id or cmd_id)
-
Client reference (client_order_id or client_merge_id)
-
Hide deltas attributes Show deltas attributes object
-
Hide position_delta attributes Show position_delta attributes object
-
Hide merge attributes Show merge attributes object
Payload examples
{
"type": "accounting_update",
"seq": 42,
"ts_ns": 42,
"payload": {
"account_id": "string",
"market_id": "string",
"ref_id": "string",
"client_ref_id": "string",
"deltas": {
"cash": {
"units": 42,
"nanos": 42
},
"margin_release": {
"units": 42,
"nanos": 42
},
"position_delta": {
"yes_qty": {
"units": 42,
"nanos": 42
},
"no_qty": {
"units": 42,
"nanos": 42
},
"yes_reserved": {
"units": 42,
"nanos": 42
},
"no_reserved": {
"units": 42,
"nanos": 42
}
}
},
"merge": {
"merge_id": "string",
"merged_qty": {
"units": 42,
"nanos": 42
},
"pnl_realized": {
"units": 42,
"nanos": 42
}
}
}
}
Payload examples
{
"type": "accounting_payout",
"seq": 42,
"ts_ns": 42,
"payload": {
"account_id": "string",
"market_id": "string",
"payout_id": "string",
"reason": "SETTLEMENT",
"cash_delta": {
"units": 42,
"nanos": 42
},
"position_delta": {
"yes_qty": {
"units": 42,
"nanos": 42
},
"no_qty": {
"units": 42,
"nanos": 42
},
"yes_reserved": {
"units": 42,
"nanos": 42
},
"no_reserved": {
"units": 42,
"nanos": 42
}
}
}
}
Payload examples
{
"type": "heartbeat",
"seq": 42,
"ts_ns": 42,
"payload": {
"interval_sec": 42
}
}
Payload examples
{
"type": "backlog_end",
"seq": 42,
"ts_ns": 42,
"payload": {
"last_seq": 42
}
}