---
title: "Get Open & Closed Orders"
method: GET
path: "/api/v1/order/realtime"
tags: ["Trade"]
---

# Get Open & Closed Orders

`GET /api/v1/order/realtime`

Primarily query unfilled or partially filled orders in real-time, but also supports querying recent 500 closed status (Cancelled, Filled) orders. Please see the usage of request param open_only.

## Query parameters

- `sub_account_address` string, required
- `symbol` string
- `order_id` string, uuid
- `order_link_id` string
- `open_only` boolean
- `order_filter` OrderFilter — unresolved $ref
- `limit` integer, nullable
- `cursor` string, nullable

## Response `200`

Orders

- OrderListResponse — Response for order list and order history requests.
  - `list` Order[], required
    - `avg_price` string, required — Average price at which part (or all) of the order has been executed (i.e. filled)
    - `cancel_type` 'CancelByUser' | 'CancelByAdmin' | 'CancelBySystem' | 'CancelByReduceOnly' | 'CancelByPrepareLiq' | 'CancelAllBeforeLiq' | 'CancelByPrepareAdl' | 'CancelAllBeforeAdl' | 'CancelBySettle' | 'CancelByTpSlTsClear' | 'CancelBySmp' | 'CancelByDcp' | 'CancelByRebalance' | 'CancelByOcoTpCanceledBySlTriggered' | 'CancelByOcoSlCanceledByTpTriggered' — Reason/Source of the order cancellation.
    - `close_on_trigger` boolean, required
    - `closed_pnl` string, nullable — Closed profit and loss for each close position order. Valid only in order WebSocket
    - `create_type` 'CreateByUser' | 'CreateByFutureSpread' | 'CreateByAdminClosing' | 'CreateBySettle' | 'CreateByStopOrder' | 'CreateByTakeProfit' | 'CreateByPartialTakeProfit' | 'CreateByStopLoss' | 'CreateByPartialStopLoss' | 'CreateByTrailingStop' | 'CreateByTrailingProfit' | 'CreateByLiq' | 'CreateByTakeOverPassThrough' | 'CreateByAdlPassThrough' | 'CreateByBlockPassThrough' | 'CreateByBlockTradeMovePositionPassThrough' | 'CreateByClosing' | 'CreateByFGridBot' | 'CloseByFGridBot' | 'CreateByTWAP' | 'CreateByTVSignal' | 'CreateByMmRateClose' | 'CreateByMartingaleBot' | 'CloseByMartingaleBot' | 'CreateByIceBerg' | 'CreateByArbitrage' | 'CreateByDdh' | 'CreateByBboOrder'
    - `created_time` string, date-time, required
    - `cum_exec_fee` string, required — Cumulative executed trading fee: the total fees charged so far for the executed portion of this order
    - `cum_exec_qty` string, required — Cumulative executed quantity: total amount of the order that has already been filled/executed so far
    - `cum_exec_value` string, required — Cumulative executed value: the total value corresponding to the part of the order that has already been filled. Basically: how much worth in total has been executed so far
    - `expire_time` string, date-time, nullable — Expiration time for orders with a time-in-force of Good-Til-Date (GTD)
    - `last_price_on_created` string, required — Last price at the time the order was created
    - `leaves_qty` string, required — Remaining quantity from the order that has not yet been executed
    - `leaves_value` string, required — Estimated value of the remaining quantity (leavesQty) that remains unfilled. Basically: how much the unfilled portion is “worth”
    - `margin_mode` 'Cross' | 'Isolated', required
    - `order_id` string, uuid, required
    - `order_link_id` string
    - `order_status` 'New' | 'PartiallyFilled' | 'Untriggered' | 'CancelRequested' | 'Rejected' | 'PartiallyFilledCanceled' | 'Filled' | 'Canceled' | 'Triggered' | 'Deactivated' | 'Expired', required
    - `order_type` 'Limit' | 'Market', required — Order type: Limit, Market.
    - `post_only` boolean, required
    - `price` string, required
    - `qty` string, required
    - `reduce_only` boolean, required
    - `reject_reason` 'EcNoError' | 'EcOthers' | 'EcInsufficientFunds' | 'EcUnknownMessageType' | 'EcMissingClOrdId' | 'EcMissingOrigClOrdId' | 'EcClOrdIdOrigClOrdIdAreTheSame' | 'EcDuplicatedClOrdId' | 'EcOrigClOrdIdDoesNotExist' | 'EcTooLateToCancel' | 'EcUnknownOrderType' | 'EcUnknownSide' | 'EcUnknownTimeInForce' | 'EcWronglyRouted' | 'EcMarketOrderPriceIsNotZero' | 'EcLimitOrderInvalidPrice' | 'EcNoEnoughQtyToFill' | 'EcNoImmediateQtyToFill' | 'EcPerCancelRequest' | 'EcMarketOrderCannotBePostOnly' | 'EcPostOnlyWillTakeLiquidity' | 'EcReduceOnlyNoPosition' | 'EcReduceOnlyWouldIncreasePosition' | 'EcReduceOnlyExceedsPosition' | 'EcReduceOnlyMode' | 'EcTradingHalted' | 'EcCancelReplaceOrder' | 'EcInvalidSymbolStatus' | 'EcCancelForNoFullFill' | 'EcBySelfMatch' | 'EcInCallAuctionStatus' | 'EcQtyCannotBeZero' | 'EcMarketOrderNoSupportTif' | 'EcReachMaxTradeNum' | 'EcInvalidPriceScale' | 'EcBitIndexInvalid' | 'EcStopBySelfMatch' | 'EcInvalidSmpType' | 'EcCancelByMmp' | 'EcInvalidUserType' | 'EcInvalidMirrorOid' | 'EcInvalidMirrorUid' | 'EcEcInvalidQty' | 'EcInvalidAmount' | 'EcLoadOrderCancel' | 'EcMarketQuoteNoSuppSell' | 'EcDisorderOrderId' | 'EcInvalidBaseValue' | 'EcLoadOrderCanMatch' | 'EcSecurityStatusFail' | 'EcReachRiskPriceLimit' | 'EcOrderNotExist' | 'EcCancelByOrderValueZero' | 'EcCancelByMatchValueZero' | 'EcReachMarketPriceLimit'
    - `side` 'Sell' | 'Buy', required — Order side: buy or sell.
    - `stop_order_type` 'TakeProfit' | 'StopLoss' | 'TrailingStop' | 'Stop' | 'PartialTakeProfit' | 'PartialStopLoss' | 'TpslOrder' | 'OcoOrder' | 'MmRateClose' | 'BidirectionalTpslOrder'
    - `sub_account_address` string, required
    - `symbol` string, required
    - `time_in_force` union, required — Time in Force instructions.
      - 'GTC' — Good Till Cancel
      - 'IOC' — Immediate or Cancel
      - 'FOK' — Fill or Kill
      - object — Good Till Date
        - `GTD` integer, required — Good Till Date
      - 'Day' — Good For Day
    - `tpsl` TpSl
      - `mode` 'Full' | 'Partial', required
      - `stop_loss` union
        - object
          - `market` object, required
            - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
            - `trigger_price` string, required
        - object
          - `limit` object, required
            - `limit_price` string, required
            - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
            - `trigger_price` string, required
      - `take_profit` union
        - object
          - `market` object, required
            - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
            - `trigger_price` string, required
        - object
          - `limit` object, required
            - `limit_price` string, required
            - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
            - `trigger_price` string, required
    - `trigger` ConditionalOrder
      - `trigger_by` 'LastPrice' | 'IndexPrice' | 'MarkPrice', required
      - `trigger_direction` 'Up' | 'Down', required
      - `trigger_price` string, required — The price level that activates the order.
    - `updated_time` string, date-time, required
  - `next_page_cursor` string, required

---

[API](https://skmtc.net/ekidenfi/apis/ekiden-gateway.md) · [All operations](https://skmtc.net/ekidenfi/apis/ekiden-gateway/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ekidenfi/ekiden-gateway/revisions/75ffe546b73a/schema)
