{
"type": "subscribe",
"channel": "account",
"id": "0xAbCd...1234"
}{
"type": "<string>",
"channel": "<string>",
"id": "<string>",
"accountIndex": 123,
"sigFigs": 123,
"roundStep": 123,
"market": "<string>",
"contents": {}
}{
"type": "<string>",
"channel": "<string>",
"id": "<string>",
"accountIndex": 123,
"sigFigs": 123,
"roundStep": 123,
"market": "<string>",
"contents": {}
}Positions
Endpoint:
wss://api.arcus.xyz/v1/ws— one socket multiplexes every channel and RPC request. Click Connect, then send the example subscribe message below to start receiving data.
Open positions for a single sub-account. Snapshot contents use PositionsSnapshot: the REST GET /positions positions map plus isSnapshot: true, lastSequenceId, address, and accountIndex. Updates carry one PositionUpdate event per frame.
cumulativeFunding is absent from streaming events — use the snapshot for funding horizons. On close (size drops to 0), the row is emitted in FLAT form with zeroed financials.
leverage reflects the user’s per-(account, market) override (set via REST POST /v1/setLeverage) when present, otherwise the market default. A PositionUpdate is also emitted when the user adjusts leverage on a market they already hold a position in, and when they add or remove isolated margin via POST /v1/adjustIsolatedMargin (that frame carries requestId so clients can correlate it with the 202 ACK, and marginMode: ISOLATED).
Every perp position row — snapshot and streaming — includes marginMode (CROSS or ISOLATED) so clients can tell the collateral mode without a REST round-trip. Isolated rows set marginUsed to the posted isolated-leg pool (not IMR at mark); the full isolated-leg cash balance is derivable as marginUsed + borrowedCapital.
Optionally scoped to one market: pass market on subscribe (ticker or numeric id) and the snapshot, the live frames, and the post-snapshot catch-up all carry only that market. The filter is part of subscription identity, so one connection can hold several market-scoped views of the same account; unsubscribe must repeat the same market.
{
"type": "subscribe",
"channel": "account",
"id": "0xAbCd...1234"
}{
"type": "<string>",
"channel": "<string>",
"id": "<string>",
"accountIndex": 123,
"sigFigs": 123,
"roundStep": 123,
"market": "<string>",
"contents": {}
}{
"type": "<string>",
"channel": "<string>",
"id": "<string>",
"accountIndex": 123,
"sigFigs": 123,
"roundStep": 123,
"market": "<string>",
"contents": {}
}Sent once on subscribe. Contents use OpenAPI PositionsSnapshot: the same positions map as REST GET /positions (GetPositionsResponse) plus required isSnapshot: true, lastSequenceId, address, and accountIndex. The snapshot does NOT carry the REST-only total field. The required positions map is keyed by perp market id; each row carries sequenceNumber.
One position delta per frame (one PositionUpdate per streaming event). Contents carry isSnapshot: false and lastSequenceId. Each update has one row in positions.
Each perp position row carries sequenceNumber (same counter as AccountUpdate). cumulativeFunding is absent; use the snapshot for funding horizons. On close, emitted in FLAT form with zeroed financials.
Was this page helpful?