GET
/
api
/
v1
/
open-order
curl --request GET \
  --url https://user-account.sandbox.rails.xyz/api/v1/open-order \
  --header 'Authorization: Bearer <token>'
{
  "openOrder": {
    "market": "BTC-USD",
    "orderId": "01HZ36SYBP4Z80GRX30P49XHB5",
    "orderType": "buy",
    "tradeType": "limit",
    "price": "65000",
    "quantity": "0.5",
    "filledQuantity": "0.5",
    "leverage": "1",
    "createdAt": 1717020981622,
    "updatedAt": 1717020982756,
    "orderStatus": "active",
    "clientRequestId": "0835bf3e-4a20-41f0-908d-8213f2b7a285",
    "postOnly": false
  }
}

Polling Order Status

This endpoint is mainly used for polling the status of an order in case you don’t receive a timely confirmation message for an order creation or cancellation via the WebSocket API. If an order is not found in our system, it will return a 404 Not Found response.

Order ID and Client Request ID

First, you need to provide market in the query parameters. Then, you can provide either order-id or client-request-id but not both to specify the order you want to retrieve. Typically, you would use order-id when you have the order ID from a previous order creation while client-request-id is used when you want to retrieve an order that you haven’t received a confirmation for yet.

Order Quantity Fields

In the openOrder object, quantity represents the remaining quantity and filledQuantity represents the cumulative filled quantity. The two values will add up to the original order quantity.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

market
string
required

Example value: ETH-USD. To get all supported markets, call /api/v1/markets endpoint.

order-id
string

Example value: 01J4MD3R7N4HH4G76PT47VG3QC. This is the unique identifier of the order. You can get this value from the create order response.

client-request-id
string

Example value: 0835bf3e-4a20-41f0-908d-8213f2b7a285. This is the same value as the clientRequestId field in the create order request.

Response

200 - application/json

The response is of type object.