Order Entry

Order entry operations

Create order

post
/createOrder

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

Body
exchangeIdintegerRequiredExample: 1747927089946
symbolstringOptional

Trading symbol (e.g., BTCRUSDPERP, ETHRUSD)

Example: BTCRUSDPERPPattern: ^[A-Za-z0-9]+$
accountIdintegerRequiredExample: 1747927089946
isBuybooleanRequired

Whether this is a buy order

Example: true
limitPxstringRequiredExample: 43000.00Pattern: ^-?\d+(\.\d+)?$
qtystringOptionalExample: 1.0Pattern: ^\d+(\.\d+)?$
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: 43000.00Pattern: ^-?\d+(\.\d+)?$
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
signerWalletstringRequiredExample: 0x6c51275fd01d5dbd2da194e92f920f8598306df2Pattern: ^0x[a-fA-F0-9]{40}$
expiresAfterintegerOptional

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

Example: 1747927089946
Other propertiesanyOptional
Responses
200

Order creation response

application/json
post
/createOrder
POST /v2/createOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 376

{
  "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,
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
{
  "status": "OPEN",
  "orderId": "123456789-123123123",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}

Cancel order

post
/cancelOrder

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...
Other propertiesanyOptional
Responses
200

Order cancellation response

application/json
post
/cancelOrder
POST /v2/cancelOrder HTTP/1.1
Host: api.reya.xyz
Content-Type: application/json
Accept: */*
Content-Length: 94

{
  "orderId": "123456789-123123123",
  "signature": "0x5678...",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}
{
  "status": "OPEN",
  "orderId": "123456789-123123123",
  "ANY_ADDITIONAL_PROPERTY": "anything"
}