{
"type": "post",
"id": 1,
"request": {
"type": "placeOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.01",
"price": "50000"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 43,
"request": {
"type": "cancelOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 44,
"request": {
"type": "cancelAllOrders",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 46,
"request": {
"type": "scheduleCancel",
"payload": {
"address": "0x...",
"accountIndex": 0,
"time": 1734567890123000
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 5,
"request": {
"type": "modifyOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.02",
"price": "49000",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 45,
"request": {
"type": "batchPlaceOrders",
"payload": {
"orders": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.1",
"price": "49000",
"clientId": "bid-1",
"signature": "<128-hex signature for this order>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "SELL",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.1",
"price": "51000",
"clientId": "ask-1",
"signature": "<128-hex signature for this order>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 46,
"request": {
"type": "batchCancelOrders",
"payload": {
"cancels": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"signature": "<128-hex signature for this cancel>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"clientId": "bid-1",
"signature": "<128-hex signature for this cancel>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 47,
"request": {
"type": "batchModifyOrders",
"payload": {
"modifies": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.1",
"price": "49100",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"reduceOnly": false,
"signature": "<128-hex signature for this modify>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-def456",
"side": "SELL",
"quantity": "0.1",
"price": "50900",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"reduceOnly": false,
"signature": "<128-hex signature for this modify>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 7,
"request": {
"type": "setLeverage",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"leverage": 5
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 8,
"request": {
"type": "adjustIsolatedMargin",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"amount": "100"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "get",
"id": 2,
"request": {
"type": "l2orderbook",
"payload": {
"market": "BTC-USD"
}
}
}{
"method": "placeOrder",
"id": 1,
"status": 202,
"result": {
"orderId": "ord-abc123",
"status": "ACK"
}
}Order operations
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.
RPC-style trading operations over WebSocket. Use type: post for order mutations and type: get for read-only snapshots.
Every request carries a client-chosen numeric id that is echoed in the response, allowing you to correlate replies with requests. Use a monotonically increasing counter per connection.
Order mutations are asynchronous — they reply with status: 202 (accepted, not terminal). Subscribe to orders and userFills to observe the full order lifecycle.
Supported post methods: placeOrder, cancelOrder, cancelAllOrders, scheduleCancel, modifyOrder, batchPlaceOrders, batchCancelOrders, batchModifyOrders, setLeverage, adjustIsolatedMargin.
Supported get methods: l2orderbook, bbo, mids, account, fills, orders, markets, prices, positions, leverages, ratelimit.
{
"type": "post",
"id": 1,
"request": {
"type": "placeOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.01",
"price": "50000"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 43,
"request": {
"type": "cancelOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 44,
"request": {
"type": "cancelAllOrders",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 46,
"request": {
"type": "scheduleCancel",
"payload": {
"address": "0x...",
"accountIndex": 0,
"time": 1734567890123000
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 5,
"request": {
"type": "modifyOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.02",
"price": "49000",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 45,
"request": {
"type": "batchPlaceOrders",
"payload": {
"orders": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.1",
"price": "49000",
"clientId": "bid-1",
"signature": "<128-hex signature for this order>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "SELL",
"orderType": "LIMIT",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"quantity": "0.1",
"price": "51000",
"clientId": "ask-1",
"signature": "<128-hex signature for this order>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 46,
"request": {
"type": "batchCancelOrders",
"payload": {
"cancels": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"signature": "<128-hex signature for this cancel>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"clientId": "bid-1",
"signature": "<128-hex signature for this cancel>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 47,
"request": {
"type": "batchModifyOrders",
"payload": {
"modifies": [
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.1",
"price": "49100",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"reduceOnly": false,
"signature": "<128-hex signature for this modify>"
},
{
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-def456",
"side": "SELL",
"quantity": "0.1",
"price": "50900",
"timeInForce": "GTT",
"goodTilTime": "4102444800000000",
"reduceOnly": false,
"signature": "<128-hex signature for this modify>"
}
]
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000"
}
}{
"type": "post",
"id": 7,
"request": {
"type": "setLeverage",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"leverage": 5
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "post",
"id": 8,
"request": {
"type": "adjustIsolatedMargin",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"amount": "100"
},
"apiKey": "<64-hex-public-key>",
"timestamp": "1712345678000000000",
"signature": "<128-hex-signature>"
}
}{
"type": "get",
"id": 2,
"request": {
"type": "l2orderbook",
"payload": {
"market": "BTC-USD"
}
}
}{
"method": "placeOrder",
"id": 1,
"status": 202,
"result": {
"orderId": "ord-abc123",
"status": "ACK"
}
}Cancels every open order for (address, accountIndex). Pass marketId to scope the cancel to a single market; omit it to cancel across all markets. Untriggered TPSL orders in scope are canceled too. Mirrors POST /v1/cancelAllOrders.
Dead man's switch. Arm, refresh, or disarm a cancel-all deadline. Mirrors POST /v1/scheduleCancel.
Keep the switch armed by sending a new time (updated absolute epoch microseconds, 5s–5min ahead of now — typically now + 60s) before the current deadline. Reusing a past time does not extend the previous arm. Omit time (or send null) to disarm. If the deadline elapses without a refresh, the gateway fires cancelAllOrders.
Omit marketId for an account-wide switch (fires cancel-all across every market), or set it to scope the switch to a single market. A per-market switch is independent of the account-wide switch and of other per-market switches on the same subaccount, and marketId selects which switch a given arm/refresh/disarm targets.
A wallet may hold only a bounded number of switches armed at once (across all subaccounts and markets); arming a new switch beyond that limit is rejected. Refreshing an already-armed switch is always allowed.
Places up to 100 orders in one request. All orders must share the same address / accountIndex. Signed PER ELEMENT using the typed canonical payload: each element of orders carries its own signature over the same typed placeOrder payload the element would carry if submitted standalone (op=1 for regular orders, op=4 for TPSL legs). The request envelope carries only the shared apiKey + timestamp; there is no outer request.signature. Mirrors POST /v1/batchPlaceOrders.
Cancels up to 100 orders in one request. All cancels must share the same address / accountIndex. Signed PER ELEMENT using the typed canonical payload: each element of cancels carries its own signature over the same typed cancelOrder payload the element would carry if submitted standalone. The request envelope carries only the shared apiKey + timestamp; there is no outer request.signature. Mirrors POST /v1/batchCancelOrders.
Modifies up to 100 resting orders in one request. All modifies must share the same address / accountIndex. Signed PER ELEMENT using the typed canonical payload: each element of modifies carries its own signature over the same typed modifyOrder payload the element would carry if submitted standalone (op=3). The request envelope carries only the shared apiKey + timestamp; there is no outer request.signature. Failures are per element — an element that fails validation or signature verification surfaces as a status: ERROR row in the response while the rest of the batch proceeds. Mirrors POST /v1/batchModifyOrders.
Per-(account, market) leverage. Mirrors POST /v1/setLeverage. leverage is an integer in [1, market max]; values outside this range are rejected with 400. The WS path returns immediately on accept (envelope status: 202, body status: ACK); subscribe to the accountAttributes channel to observe the engine-confirmed outcome: an APPLIED change arrives as a leverage entry, a REJECTED one as a leverageReject entry (carrying the same requestId for correlation).
Move margin between the cross bucket and an isolated-mode position's leg for (account, market). Mirrors POST /v1/adjustIsolatedMargin. amount is dollars as a decimal string (e.g. "100" for $100) — do not send quote quantums; the gateway converts dollars to quantums for the engine. Positive adds to the leg (cross → isolated), negative removes from the leg (isolated → cross), zero is rejected with 400. The WS path returns immediately on accept (envelope status: 202, body status: ACK); the engine-confirmed post-state arrives on the positions channel as a PositionUpdate (correlated by requestId).
Response to a post or get request. id is always echoed from the request. Order mutations reply with status: 202 (accepted, not terminal). Other methods reply with status: 200 on success.
Was this page helpful?