---
title: "GetOrder"
method: POST
path: "/order_service.v1.OrderService/GetOrder"
tags: ["Orders"]
---

# GetOrder

`POST /order_service.v1.OrderService/GetOrder`

Returns the current stored state of one order, identified by the
 composite key `order_id` + `market` + `reduce_only`. Order IDs are not
 globally unique: the same numeric ID can exist as both a
 position-opening order and a reduce-only order in the same market, so
 `reduce_only` must match the kind of order you're looking up.

## Headers

- `Connect-Protocol-Version` 1, required — Define the version of the Connect protocol. If omitted, use 1.
- `Connect-Timeout-Ms` number — Define the timeout, in ms

## Request body

- OrderServiceV1GetOrderRequest
  - `orderId` string, int64, required — On-chain order identifier to look up. Required; must be combined with `market` and `reduce_only` to uniquely identify the order.
  - `market` union, required — Market the order belongs to, by `market_id` or `market_symbol`. Required; an unresolvable selector returns `NOT_FOUND`.
    - object
      - `marketId` string, int64, required
    - object
      - `marketSymbol` BaseObjectsV1MarketSymbol, required
        - `assetSymbol` string — Underlying asset symbol, e.g. `"BTC"`. Matched case-insensitively and trimmed.
        - `quoteSymbol` string — Quote symbol, e.g. `"PERP"`. Technically optional, but omitting it looks up a market named exactly by `assetSymbol` alone (e.g. `"BTC"`) rather than `"BTC-PERP"`, which will not resolve to any real market. In practice, always set this.
  - `reduceOnly` boolean — Whether to look up a reduce-only order (`true`) or a position-opening order (`false`) for this `order_id`. Defaults to `false` when omitted.

## Response `200`

Success

- OrderServiceV1GetOrderResponse
  - `order` BaseObjectsV1Order — Current stored state of a position-opening or reduce-only order. Because both order kinds share this message, some numeric fields have different meanings and units. Use `reduceOnly` when interpreting them.
    - `owner` string — Lowercase EVM wallet address that owns the order.
    - `orderId` string, int64 — On-chain order identifier. Unique together with `marketId` and `reduceOnly`. Connect/JSON encodes this uint64 as a decimal string.
    - `timestamp` string, date-time
    - `marketId` string, int64 — On-chain market identifier. Connect/JSON encodes this uint64 as a decimal string.
    - `market` string — Human-readable market name, such as `BTC-PERP`. Falls back to `MARKET-{marketId}` when market metadata is unavailable.
    - `type` 'ORDER_TYPE_MARKET' — Order-type classification used by the API. Currently only market orders are returned.
    - `side` 'SIDE_LONG' | 'SIDE_SHORT' — Direction of the position represented by an order.
    - `thresholdPrice` number, float — Execution price threshold in quote asset terms per underlying asset. Converted using the market's tick precision. This is not necessarily the fill price.
    - `size` number, float — Amount exposed for the order.
    - `leverage` number, float — Leverage multiplier. For reduce-only orders, inherited from the associated position-opening order when available.
    - `status` 'ORDER_STATUS_PENDING' | 'ORDER_STATUS_PARTIALLY_FILLED' | 'ORDER_STATUS_FULLY_FILLED' | 'ORDER_STATUS_CLOSED' | 'ORDER_STATUS_CANCELLED' | 'ORDER_STATUS_MERGED' | 'ORDER_STATUS_PARTIALLY_MERGED' | 'ORDER_STATUS_PARTIALLY_CANCELLED' — Current lifecycle state of an order.
    - `filledSize` number, float — Order Amount that has been filled
    - `unfilledSize` number, float — Order amount remaining to be filled
    - `reduceOnly` boolean — Whether the order is reducing an existing position. False for orders that open or increase exposure; true for orders that reduce exposure.
    - `canceled` boolean — Legacy field that the server does not populate. Use `status` to determine whether an order was cancelled.
    - `initialMargin` number, float — Initial collateral or threshold-price notional, denominated in quote asset units. For position-opening orders, this is the initial collateral.
    - `tickDecimals` integer — Market price precision used to convert raw on-chain price values.
    - `fees` number, float — Fees recorded for the order, denominated in quote asset units.
    - `rebates` number, float — Direct order-side rebates recorded for reduce fills, denominated in quote asset units.
    - `reduceOrderType` string — Reduce-order classification. Values are `MANUAL`, `STOP_LOSS`, `TAKE_PROFIT`, `LIQUIDATION`, or `ADL`. Empty for position-opening orders.
    - `initialNotional` number, float — Initial notional amount for a position-opening order. Calculated as `initialMargin * leverage`. Zero for reduce-only orders.
    - `stopLossPrice` number, float — Stop-loss trigger price attached to a position-opening order, in quote asset units. Zero when no stop-loss is configured.
    - `takeProfitPrice` number, float — Take-profit trigger price attached to a position-opening order, in quote asset units. Zero when no take-profit is configured.

---

[API](https://skmtc.dev/fairground/apis/fairground-fi-api.md) · [All operations](https://skmtc.dev/fairground/apis/fairground-fi-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fairground/fairground-fi-api/revisions/be66e6dc0ac0/schema)
