GET
/
api
/
v1
/
orders
/
{orderId}
curl -X GET "https://api.roxom.com/api/v1/orders/01234567-89ab-7def-8123-456789abcdea" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"
{
  "data": {
    "order": {
      "id": "01234567-89ab-7def-8123-456789abcdea",
      "symbol": "OIL-BTC",
      "instType": "perpetual",
      "accountId": "01234567-89ab-7def-8123-456789abcdef",
      "type": "limit",
      "timeInForce": "gtc",
      "side": "buy",
      "qty": "100.00",
      "px": "50000000",
      "triggerPx": null,
      "status": "submitted",
      "clientOrderId": "my_order_001",
      "createdAt": 1685432112000,
      "cancelAt": null,
      "isTriggered": null,
      "size": "100.00",
      "unit": "sats"
    }
  }
}

Get Order Status

Retrieve status and execution details of a specific order.

Endpoint

GET /api/v1/orders/{orderId}

Parameters

orderId
string
required
Order ID to retrieve (UUID v7)
X-API-Key
string
required
API key for authentication. Format: your_api_key_here

Example Request

curl -X GET "https://api.roxom.com/api/v1/orders/01234567-89ab-7def-8123-456789abcdea" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json"

Response

{
  "data": {
    "order": {
      "id": "01234567-89ab-7def-8123-456789abcdea",
      "symbol": "OIL-BTC",
      "instType": "perpetual",
      "accountId": "01234567-89ab-7def-8123-456789abcdef",
      "type": "limit",
      "timeInForce": "gtc",
      "side": "buy",
      "qty": "100.00",
      "px": "50000000",
      "triggerPx": null,
      "status": "submitted",
      "clientOrderId": "my_order_001",
      "createdAt": 1685432112000,
      "cancelAt": null,
      "isTriggered": null,
      "size": "100.00",
      "unit": "sats"
    }
  }
}
data
object
Detailed order information

Order Status Values

Fill Details

Each fill in the fills array contains:
fill
object
Individual trade execution details

Real-time Updates

For real-time order status updates, use the WebSocket API:
// Subscribe to order updates
ws.send(JSON.stringify({
  method: 'subscribe',
  params: {
    channel: 'orders'
  },
  id: 1
}));

// Receive order status changes
ws.onmessage = function(event) {
  const data = JSON.parse(event.data);
  if (data.channel === 'orders') {
    console.log('Order update:', data.data);
  }
};

Order Lifecycle

1

Order Submission

Order is submitted and receives initial validation.Status: NEW
2

Order Book Entry

Order passes validation and enters the order book.Status: PENDING
3

Matching Process

Order matching engine attempts to find counterparties.Status: PENDING or PARTIALLY_FILLED
4

Execution

Order is matched and executed (partially or fully).Status: PARTIALLY_FILLED or FILLED
5

Settlement

Balances are updated and confirmations sent.Final Status: FILLED, CANCELED, or EXPIRED

Error Handling

Order Not Found

{
  "error": {
    "code": 404,
    "message": "Order not found",
    "details": "Order 'order_invalid' does not exist or does not belong to this account"
  },
  "timestamp": "2024-01-15T10:30:00Z",
  "requestId": "req_abc123"
}

Unauthorized Access

{
  "error": {
    "code": 403,
    "message": "Access denied",
    "details": "Order belongs to a different account"
  },
  "timestamp": "2024-01-15T10:30:00Z",
  "requestId": "req_def456"
}