Order Entry
Order entry operations
Create a new order (IOC, GTC, SL, TP)
1
ETHRUSDPERP
12345
Whether this is a buy order
true
50000.0
0.1
Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)
LIMIT
Possible values: Order time in force, exclusively used for LIMIT orders
GTC
Possible values: Trigger price, only for TP/SL orders
50000.0
Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.
false
See signatures and nonces section for more details on how to generate.
0x1234...
Order nonce, see signatures and nonces section for more details.
1234567890
Signer wallet address
0x1234567890123456789012345678901234567890
Expiration timestamp (exclusively for IOC orders). The order will only be filled before this timestamp.
1676923200
Order creation response
Bad request
Internal server error
POST /v2/createOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 314
{
"exchangeId": 1,
"symbol": "ETHRUSDPERP",
"accountId": 12345,
"isBuy": true,
"limitPx": "50000.0",
"qty": "0.1",
"orderType": "LIMIT",
"timeInForce": "GTC",
"triggerPx": "50000.0",
"reduceOnly": false,
"signature": "0x1234...",
"nonce": "1234567890",
"signerWallet": "0x1234567890123456789012345678901234567890",
"expiresAfter": 1676923200
}
{
"status": "OPEN",
"orderId": "123456789-123123123"
}
Cancel an existing order
Order ID to cancel
123456789-123123123
See signatures section for more details on how to generate.
0x5678...
Order cancellation response
Bad request
Internal server error
POST /v2/cancelOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 57
{
"orderId": "123456789-123123123",
"signature": "0x5678..."
}
{
"status": "OPEN",
"orderId": "123456789-123123123"
}