---
title: "Get one order"
method: GET
path: "/v1/orders/by-id/{order_id}"
tags: ["Orders"]
---

# Get one order

`GET /v1/orders/by-id/{order_id}`

## Request

- Base URL: `https://api.testnet.rise.trade`
- URL: `https://api.testnet.rise.trade/v1/orders/by-id/{order_id}`
- Auth: none required
- TypeScript: <https://skmtc.dev/rise/apis/risex-rest-api/docs/v1/orders/by-id/:order_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Fetch a single order by composite order ID. Faster than GET /v1/orders for one-order lookups.

## Path parameters

- `order_id` string, required

## Query parameters

- `market_id` string, int64

## Response `200`

A successful response.

- ApiGetOrderResponse
  - `order` ApiOrder
    - `id` string: The order ID.
    - `price` string: The original price (in quote unit) of the order.
    - `size` string: The original size (in base unit) of the order.
    - `market_id` string, int64: The market ID of the order.
    - `side` 'BUY' | 'SELL'
    - `type` 'MARKET' | 'LIMIT'
    - `time_in_force` 'GTC' | 'GTT' | 'FOK' | 'IOC': - GTC: Good til canceled - GTT: Good til time - FOK: Fill or kill - IOC: Immediate or cancel
    - `expiry` string, int64: Order expiry timestamp in nanoseconds (0 = no expiry).
    - `post_only` boolean: Post-only means the order will only be placed as a maker order.
    - `reduce_only` boolean: Indicates if the order is reduce-only.
    - `cancel_reason` string: The cancel reason (if exists).
    - `block_number` string, int64: The block number when the order was last updated.
    - `log_index` string, int64: The log index within the block.
    - `stp_mode` 'EXPIRE_MAKER' | 'EXPIRE_TAKER' | 'EXPIRE_BOTH': - EXPIRE_MAKER: Cancel/expire maker order (oldest) - EXPIRE_TAKER: Cancel/expire taker order (newest) - EXPIRE_BOTH: Cancel/expire both orders
    - `filled_size` string: The total filled size (in base unit) of the order.
    - `status` 'ORDER_STATUS_NONE' | 'ORDER_STATUS_OPEN' | 'ORDER_STATUS_FILLED' | 'ORDER_STATUS_CANCELLED': - ORDER_STATUS_NONE: Order doesn't exist or invalid - ORDER_STATUS_OPEN: Order is active on the orderbook - ORDER_STATUS_FILLED: Order has been completely filled - ORDER_STATUS_CANCELLED: Order has been cancelled
    - `sender` string: The owner address of the order.
    - `fee_bps` string: Taker fee rate. NOTE: despite the field name, the denominator is 1,000,000 (pips), not 10,000 (bps). Actual rate = fee_bps / 1_000_000 (e.g. "300" = 0.03%). Field name kept for backward compatibility.
    - `avg_price` string: The average price (in quote unit) of the order.
    - `cancel_requested` boolean: Indicates if the order is cancel requested.
    - `created_at` string, int64: The created at timestamp in nanosecond.
    - `tx_hash` string: The transaction hash.
    - `cancel_requested_at` string, int64: Timestamp (in nanosecond) when order is cancel requested.
    - `cancel_tx_hash` string: The transaction hash of the cancel request.
    - `client_order_id` string: Client-provided order identifier (string-encoded uint64, empty if not set).
    - `stop_type` 'TAKE_PROFIT' | 'STOP_LOSS' | 'STOP_TYPE_NONE'
    - `stop_price` string: Stop price (empty if not a stop order).
    - `stop_price_option` 'LAST_TRADED_PRICE' | 'MARK_PRICE' | 'PRICE_OPTION_NONE'
    - `is_liquidation` boolean: Whether this order was filled as part of a liquidation (taker side only).
    - `wide_order_id` string, uint64: Wide order ID from contract (uint64).
    - `resting_order_id` string, uint64: Resting order ID (WideOrderId >> 1).

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/rise/apis/risex-rest-api.md) - [All operations](https://skmtc.dev/rise/apis/risex-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rise/apis/risex-rest-api/revisions/98eabcd6a6ad?raw)
