{
"type": "post",
"id": 1,
"request": {
"type": "placeOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTC",
"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": 5,
"request": {
"type": "modifyOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.02",
"price": "49000",
"timeInForce": "GTC"
},
"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": "GTC",
"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": "GTC",
"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": 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": "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.testnet.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, modifyOrder, batchPlaceOrders, batchCancelOrders, setLeverage.
Supported get methods: l2orderbook, bbo, mids, account, fills, orders, markets, prices, positions, ratelimit.
{
"type": "post",
"id": 1,
"request": {
"type": "placeOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderSide": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTC",
"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": 5,
"request": {
"type": "modifyOrder",
"payload": {
"address": "0x...",
"accountIndex": 0,
"marketId": 1,
"orderId": "ord-abc123",
"side": "BUY",
"quantity": "0.02",
"price": "49000",
"timeInForce": "GTC"
},
"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": "GTC",
"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": "GTC",
"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": 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": "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.
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.
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 Kafka accept (envelope status: 202, body status: ACK); subscribe to the accountAttributes channel to observe the engine-confirmed APPLIED / REJECTED lifecycle.
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?