---
title: "Get Order by ID"
method: GET
path: "/v1/perps/orders/{orderID}"
tags: ["Orders"]
---

# Get Order by ID

`GET /v1/perps/orders/{orderID}`

Gets an individual order by order ID. The `orderID` path parameter can be:

- An internal order ID (e.g. `197ec08e001658690721be129e7fa595`).
- A client order ID prefixed with `client:` (e.g. `client:abc123`).

## Path parameters

- `orderID` string, required

## Response `200`

Order

- object
  - `success` boolean, required — Whether the request was successful
  - `error` string — Error message, present only on failure
  - `error_code` string — Semantic error code. See each endpoint's error responses for the specific codes it can return.
  - `deprecated` string — Deprecation notice, if applicable
  - `result` ApiOrder
    - `orderId` string, required — Internal order ID
    - `clientOrderId` string — Client-provided order ID (if set)
    - `parentOrderId` string — Parent order ID (e.g. for TWAP child orders)
    - `side` 'buy' | 'sell', required — buy or sell
    - `price` string, required — Limit price
    - `size` string, required — Order quantity in base currency
    - `market` string, required — Trading market
    - `filledSize` string, required — Quantity of the order that has been filled
    - `lastFillSize` string, required — Quantity filled in the most recent trade
    - `filledCost` string, required — Cost of the filled portion of the order (filledSize × fill price)
    - `realizedPnl` string — Realized PNL for this order (perps only)
    - `fee` string, required — Fees incurred on this order
    - `feeRebate` string — Fee rebate earned on this order (perps only)
    - `status` 'open' | 'fullyfilled' | 'canceled' | 'pending' | 'untriggered', required — Order status
    - `createdAt` string, date-time, required — Order creation time
    - `filledAt` string, date-time — Time when the order was fully filled (if applicable)
    - `canceledAt` string, date-time — Order cancellation time (if cancelled)
    - `cancelReason` '' | 'liquidation' | 'selfMatchPrevention' | 'cancelAfterTimeout' | 'startupBadPrice' | 'immediateOrCancel' | 'cancelAfterTimeoutOnShutdown' | 'cancelOnStartup' | 'cancelByAdmin' | 'positionClosed' | 'stopOrderPositionNeutral' | 'stopOrderPositionDirectionMismatch' | 'stopOrderInLiquidation' | 'stopOrderInternalError' — Reason the order was cancelled. Possible values: "" (user cancelled), "liquidation", "selfmatchprevention", "cancelaftertimeout", "startupbadprice", "immediateorcancel"
    - `type` 'limit' | 'market' | 'stopMarket' | 'takeProfitMarket', required — Order type
    - `timeInForce` 'GTC' | 'IOC' — Time in force (GTC or IOC). Not returned for market orders.
    - `reduceOnly` boolean — Whether the order is reduce-only
    - `liquidationId` string — ID of the liquidation event this order participated in (perps only)
    - `closePosition` boolean — True if this is a position-level TP/SL order
    - `stopOrderType` 'stopLoss' | 'takeProfit' — Stop order type (stopLoss or takeProfit), if applicable
    - `triggerPrice` string — Trigger price for stop orders

## Other responses

- `400` — Bad request. The request was malformed or failed validation.
- `401` — Authentication required. Provide a valid JWT or API key.
- `403` — Access denied. The authenticated account does not have permission.
- `429` — Rate limit exceeded. Slow down request frequency.
- `500` — Internal server error.

---

[API](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api.md) · [All operations](https://skmtc.net/ondoperps/apis/ondo-perps-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ondoperps/ondo-perps-rest-api/versions/39df6b2fa672/schema)
