Order Entry
1747927089946Trading symbol (e.g., BTCRUSDPERP, WETHRUSD)
BTCRUSDPERPPattern: ^[A-Za-z0-9]+$1747927089946Whether this is a buy order
true43000.00Pattern: ^-?\d+(\.\d+)?([eE][+-]?\d+)?$1.0Pattern: ^\d+(\.\d+)?([eE][+-]?\d+)?$Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)
LIMITPossible values: Order time in force, exclusively used for LIMIT orders
GTCPossible values: Trigger price, only for TP/SL orders
43000.00Pattern: ^-?\d+(\.\d+)?([eE][+-]?\d+)?$Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.
falseSee signatures and nonces section for more details on how to generate.
0x1234...Order nonce, see signatures and nonces section for more details.
12345678900x6c51275fd01d5dbd2da194e92f920f8598306df2Pattern: ^0x[a-fA-F0-9]{40}$Expiration timestamp (exclusively for PERP IOC orders and all SPOT orders). In seconds since epoch. The order will only be filled before this timestamp.
1747927089946Client-provided order ID for tracking and correlation. Optional field that allows clients to assign their own unique identifier to orders.
1747927089946Order creation response
Order status
Executed quantity in the current order update.
1.0Pattern: ^\d+(\.\d+)?([eE][+-]?\d+)?$Total Executed quantity accross all fills where the order is involved.
1.0Pattern: ^\d+(\.\d+)?([eE][+-]?\d+)?$Created order ID (currently generated for all order types except IOC)
123456789-123123123Client-provided order ID echoed back from the request
1747927089946Matching-engine fill nonce of the first fill this order produced on entry. Together with fillCount it identifies the fills as a contiguous nonce range [firstFillId, firstFillId + fillCount - 1]. Absent if the order did not fill on entry. For a non-IOC (resting) taker, the same first nonce also appears on the order's taker update in the orderChanges channel; an IOC taker is not published to orderChanges, so this response is the only place its fill range is delivered.
7205759403792794624Number of fills this order produced on entry — the length of the contiguous nonce range starting at firstFillId. Absent if the order did not fill on entry (so it is >= 1 whenever present).
1747927089946Bad request
Internal server error
POST /v2/createOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 406
{
"exchangeId": 1747927089946,
"symbol": "BTCRUSDPERP",
"accountId": 1747927089946,
"isBuy": true,
"limitPx": "43000.00",
"qty": "1.0",
"orderType": "LIMIT",
"timeInForce": "GTC",
"triggerPx": "43000.00",
"reduceOnly": false,
"signature": "0x1234...",
"nonce": "1234567890",
"signerWallet": "0x6c51275fd01d5dbd2da194e92f920f8598306df2",
"expiresAfter": 1747927089946,
"clientOrderId": 1747927089946,
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"status": "OPEN",
"execQty": "1.0",
"cumQty": "1.0",
"orderId": "123456789-123123123",
"clientOrderId": 1747927089946,
"firstFillId": "7205759403792794624",
"fillCount": 1747927089946,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Internal matching engine order ID to cancel. At least one of orderId or clientOrderId must be provided; if both are supplied the server treats orderId as the canonical identifier and clientOrderId is ignored. For spot markets, this is the order ID returned in the CreateOrderResponse.
490346525705109504Client-provided order ID for tracking and correlation. At least one of orderId or clientOrderId must be provided; clientOrderId is consulted only when orderId is absent. This is the same clientOrderId provided in CreateOrderRequest.
1747927089946Account ID that owns the order. Required for spot markets.
1747927089946Market symbol for the order.Required for spot market orders. If not provided, assumes perp market for backwards compatibility.
BTCRUSDPERPPattern: ^[A-Za-z0-9]+$See signatures section for more details on how to generate.
0x5678...See signatures and nonces section for more details. Compulsory for spot orders.
1234567890Expiration timestamp (exclusively for SPOT orders). In seconds since epoch.
1747927089946Order cancellation response
Order status
Cancelled order ID
123456789-123123123Client-provided order ID echoed back from the request
123456789Bad request
Internal server error
POST /v2/cancelOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 222
{
"orderId": "490346525705109504",
"clientOrderId": 1747927089946,
"accountId": 1747927089946,
"symbol": "BTCRUSDPERP",
"signature": "0x5678...",
"nonce": "1234567890",
"expiresAfter": 1747927089946,
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"status": "OPEN",
"orderId": "123456789-123123123",
"clientOrderId": "123456789",
"ANY_ADDITIONAL_PROPERTY": "anything"
}Request to cancel all orders matching the specified filters
Account ID to cancel orders for.
1747927089946Symbol to cancel orders for. If not specified, cancels orders for all symbols.
BTCRUSDPERPPattern: ^[A-Za-z0-9]+$See signatures and nonces section for more details on how to generate.
0x1234...See signatures and nonces section for more details.
1234567890Expiration timestamp. In seconds since epoch.
1747927089946Mass cancel response
Number of orders that were cancelled
1747927089946Bad request
Internal server error
POST /v2/cancelAll HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 161
{
"accountId": 1747927089946,
"symbol": "BTCRUSDPERP",
"signature": "0x1234...",
"nonce": "1234567890",
"expiresAfter": 1747927089946,
"ANY_ADDITIONAL_PROPERTY": "anything"
}{
"cancelledCount": 1747927089946,
"ANY_ADDITIONAL_PROPERTY": "anything"
}Last updated