---
title: "Fetch Open Orders"
method: GET
path: "/api/{exchange}/fetchOpenOrders"
---

# Fetch Open Orders

`GET /api/{exchange}/fetchOpenOrders`

Fetch all open orders, optionally filtered by market.

## Path parameters

- `exchange` 'polymarket' | 'kalshi' | 'kalshi-demo' | 'limitless' | 'probable' | 'baozi' | 'myriad' | 'opinion' | 'metaculus' | 'smarkets' | 'polymarket_us' | 'gemini-titan' | 'hyperliquid' | 'suibets' | 'rain' | 'hunch' | 'router', required

## Query parameters

- `marketId` string

## Response `200`

Fetch Open Orders response

- object
  - `success` boolean
  - `error` ErrorDetail — Structured error envelope returned inside `BaseResponse.error` and `ErrorResponse.error`. Hosted-mode endpoints populate `code`, `retryable`, and optionally `exchange` / `detail`; legacy local-mode endpoints may still return only `message`.
    - `message` string — Human-readable error message.
    - `code` 'HOSTED_TRADING_ERROR' | 'INSUFFICIENT_ESCROW_BALANCE' | 'ORDER_SIZE_TOO_SMALL' | 'INVALID_API_KEY' | 'OUTCOME_NOT_FOUND' | 'CATALOG_UNAVAILABLE' | 'BUILT_ORDER_EXPIRED' | 'INVALID_SIGNATURE' | 'NO_LIQUIDITY' | 'MISSING_WALLET_ADDRESS' | 'BAD_REQUEST' | 'AUTHENTICATION_ERROR' | 'PERMISSION_DENIED' | 'NOT_FOUND' | 'ORDER_NOT_FOUND' | 'MARKET_NOT_FOUND' | 'EVENT_NOT_FOUND' | 'RATE_LIMIT_EXCEEDED' | 'INVALID_ORDER' | 'INSUFFICIENT_FUNDS' | 'VALIDATION_ERROR' | 'NETWORK_ERROR' | 'EXCHANGE_NOT_AVAILABLE' | 'NOT_SUPPORTED' — Stable machine-readable error code. Hosted-mode errors use the `HostedTradingError` family (e.g. `INSUFFICIENT_ESCROW_BALANCE`, `BUILT_ORDER_EXPIRED`); pre-hosted local errors use the legacy family (e.g. `BAD_REQUEST`, `NOT_FOUND`).
    - `retryable` boolean — Hint for clients: when `true`, the same request may succeed on retry (e.g. transient network or rate-limit conditions); when `false`, the caller should not retry without modifying the request.
    - `exchange` string, nullable — Venue the error originated from, when known (e.g. 'polymarket', 'kalshi').
    - `detail` object, nullable — Free-form hosted-mode detail blob. Shape depends on `code` — e.g. for `INSUFFICIENT_ESCROW_BALANCE` it may include `{ requested, available }`; for `ORDER_SIZE_TOO_SMALL` it may include `{ min }`; for `BUILT_ORDER_EXPIRED` it may include `{ expiry }`.
  - `data` Order[]
    - `id` string, required — The exchange-assigned order identifier.
    - `marketId` string, required — The market this order was placed on.
    - `outcomeId` string, required — The outcome this order was placed on.
    - `side` 'buy' | 'sell', required — Order side: buy or sell.
    - `type` 'market' | 'limit', required — Order type: market (execute immediately) or limit (resting at a price).
    - `price` number — For limit orders
    - `amount` number, required — Size in contracts/shares
    - `status` 'pending' | 'open' | 'filled' | 'canceled' | 'rejected', required — Lifecycle status of the order.
    - `filled` number, required — Amount filled (USDC cost for buys, shares for sells)
    - `filledShares` number — Amount filled in shares/contracts (if different from USDC-denominated `filled`).
    - `remaining` number, required — Amount remaining
    - `timestamp` number, required — Unix timestamp in milliseconds when the order was created.
    - `fee` number — Fee paid for this order, if known.
    - `feeRateBps` number — Fee rate in basis points applied to this order (e.g. 100 = 1%).
    - `txHash` string, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.
    - `chain` string, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.
    - `blockNumber` number, nullable — Populated in hosted mode after on-chain settlement; null for local-mode and for non-on-chain venues.

---

[API](https://skmtc.net/pmxt-dev/apis/pmxt-hosted-api.md) · [All operations](https://skmtc.net/pmxt-dev/apis/pmxt-hosted-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pmxt-dev/pmxt-hosted-api/versions/da5293255d19/schema)
