Order Entry

Order entry operations

Create order

post

Create a new order (IOC, GTC, SL, TP)

Body
exchangeIdintegerRequiredExample: 1
symbolstringOptionalExample: ETHRUSDPERP
accountIdintegerRequiredExample: 12345
isBuybooleanRequired

Whether this is a buy order

Example: true
limitPxstringRequiredExample: 50000.0
qtystringOptionalExample: 0.1
orderTypestring · enumRequired

Order type, (LIMIT = Limit, TP = Take Profit, SL = Stop Loss)

Example: LIMITPossible values:
timeInForcestring · enumOptional

Order time in force, exclusively used for LIMIT orders

Example: GTCPossible values:
triggerPxstringOptional

Trigger price, only for TP/SL orders

Example: 50000.0
reduceOnlybooleanOptional

Whether this is a reduce-only order, exclusively used for LIMIT IOC orders.

Example: false
signaturestringRequired

See signatures and nonces section for more details on how to generate.

Example: 0x1234...
noncestringRequired

Order nonce, see signatures and nonces section for more details.

Example: 1234567890
signerWalletstringRequired

Signer wallet address

Example: 0x1234567890123456789012345678901234567890
expiresAfterintegerOptional

Expiration timestamp (exclusively for IOC orders). The order will only be filled before this timestamp.

Example: 1676923200
Responses
200

Order creation response

application/json
post
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 order

post

Cancel an existing order

Body
orderIdstringRequired

Order ID to cancel

Example: 123456789-123123123
signaturestringRequired

See signatures section for more details on how to generate.

Example: 0x5678...
Responses
200

Order cancellation response

application/json
post
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"
}