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

# GetExecutableOrders

`POST /order_service.v1.OrderService/GetExecutableOrders`

Returns pending orders in a market that would be eligible to execute
if the market traded at `price`. Useful for previewing available
counterparty liquidity at a hypothetical price before submitting a
trade.

An order counts as executable when it's a position-opening order on
the `LONG` side with `threshold_price >= price`, a position-opening
 order on the `SHORT` side with `threshold_price <= price`, or a
 reduce-only order (a manual reduce, or a stop-loss/take-profit that
 has already triggered). Only `PENDING`, `PARTIALLY_FILLED`, and
 `PARTIALLY_MERGED` orders are considered.

 Results are ordered by `threshold_price` descending, then
 `timestamp` descending.

## 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

- OrderServiceV1GetExecutableOrdersRequest
  - `marketId` union, required — Market to query. Must be non-zero; an unknown market returns `NOT_FOUND`.
    - integer
    - string, int64
  - `price` number, double, required — Hypothetical execution price to test orders against, in USD. Must be positive.
  - `side` 'SIDE_LONG' | 'SIDE_SHORT' — Direction of the position represented by an order.
  - `limit` integer, nullable — Optional cap on the number of orders returned. When omitted or zero, all matching orders are returned. Does not affect `total_count`, which always reflects the full match set.

## Response `200`

Success

- OrderServiceV1GetExecutableOrdersResponse
  - `orders` BaseObjectsV1Order[] — Orders that would be executable at `price`, ordered by threshold price descending, then timestamp descending. Truncated to `limit` when set.
    - `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.
  - `totalCount` integer — Total number of matching orders, independent of `limit`.

---

[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)
