> ## Documentation Index
> Fetch the complete documentation index at: https://platform.trendlinelabs.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an order

> Beta: not yet enabled; the launch venues are Polymarket, predict.fun and Limitless (Kalshi comes later). Requests answer 404 with {"detail": "Not Found"}, as an unregistered path does, until trading is switched on. One order you placed through the API, by our id. An order whose status is unknown is checked at the venue first (at most once per few seconds), so the answer is the venue's state when it can be found, not_placed once its absence is proven, and unknown otherwise. An open order is re-read at the venue too, as often, and its new fills or final state recorded; when the venue cannot be read, the answer is our last recorded state. A final order is never re-read. Refusals: 404 order_not_found (no such order on this account); 422 invalid_request (an id outside ord_ and 24 hex digits).



## OpenAPI

````yaml /openapi.json get /public/v1/orders/{id}
openapi: 3.1.0
info:
  description: >-
    Prediction-market data across Polymarket, Kalshi, Limitless and predict.fun
    over REST, and (Beta) order placement. Every request sends your key as
    `Authorization: Bearer tl_live_…`; try any endpoint from its page.
  title: TrendlineLabs Public API
  version: '1'
servers:
  - description: Production
    url: https://systems.trendlinelabs.ai
security: []
tags:
  - description: 'Read back the key you are calling with: its scopes, tier and rate limit.'
    name: Your key
  - description: Events group markets across venues; each carries a `universal_id`.
    name: Events
  - description: One market's order book, price history and trades on one venue.
    name: Markets
  - description: Current prices for a set of markets in one call.
    name: Prices
  - description: Live cross-venue price gaps on the same market.
    name: Opportunities
  - description: >-
      Beta, not yet enabled: place and cancel limit orders on your own venue
      accounts.
    name: Trading
paths:
  /public/v1/orders/{id}:
    get:
      tags:
        - Trading
      summary: Get an order
      description: >-
        Beta: not yet enabled; the launch venues are Polymarket, predict.fun and
        Limitless (Kalshi comes later). Requests answer 404 with {"detail": "Not
        Found"}, as an unregistered path does, until trading is switched on. One
        order you placed through the API, by our id. An order whose status is
        unknown is checked at the venue first (at most once per few seconds), so
        the answer is the venue's state when it can be found, not_placed once
        its absence is proven, and unknown otherwise. An open order is re-read
        at the venue too, as often, and its new fills or final state recorded;
        when the venue cannot be read, the answer is our last recorded state. A
        final order is never re-read. Refusals: 404 order_not_found (no such
        order on this account); 422 invalid_request (an id outside ord_ and 24
        hex digits).
      operationId: getOrder
      parameters:
        - description: >-
            our id for the order, as the place answer gave it: ord_ and 24 hex
            digits
          in: path
          name: id
          required: true
          schema:
            description: >-
              our id for the order, as the place answer gave it: ord_ and 24 hex
              digits
            pattern: ^ord_[0-9a-f]{24}$
            title: Id
            type: string
      responses:
        '200':
          content:
            application/json:
              example:
                avg_price: null
                client_order_id: s1-0001
                created_at: '2026-10-06T05:59:59+00:00'
                filled_size: '0'
                id: ord_6702291f8e1c2a0012ab34cd
                notional_reserved: '4.20'
                outcome: 'yes'
                price: '0.42'
                remaining_size: '10'
                side: buy
                size: 10
                status: open
                time_in_force: gtc
                type: limit
                universal_id: mk-btc-100k-2026
                updated_at: '2026-10-06T05:59:59+00:00'
                venue: polymarket
                venue_market_id: bitcoin-above-100k-on-december-31
                venue_market_title: Bitcoin above $100,000 on December 31?
                venue_order_id: >-
                  0x5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e5e
              schema:
                $ref: '#/components/schemas/PublicOrder'
          description: Successful Response
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: 'unauthorized: no key, or a key that is unknown, revoked or expired.'
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            WWW-Authenticate:
              description: Bearer realm="public-api"
              schema:
                type: string
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            insufficient_scope: the key lacks the scope this route needs;
            ip_not_allowed: the request came from an address outside the key's
            allowlist; tier_required: the key owner's plan does not include API
            access; access_not_granted: API access is free but granted on
            request; request it on https://trendlinelabs.ai/developer.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            order_not_found: no order with that id was placed through the API by
            this account.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            order_not_cancellable: the order is no longer open, the venue no
            longer holds it, or another credential placed it;
            request_in_progress: a request with this client_order_id is still in
            flight; retry after Retry-After.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Retry-After:
              description: seconds to wait before retrying
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            invalid_request: a parameter is missing, unknown, malformed or out
            of bounds, or a cursor does not match.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            rate_limited: too many requests, or too many failed authentications;
            wait Retry-After seconds.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Retry-After:
              description: seconds to wait before retrying
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            internal_error: an unexpected failure on our side; quote the request
            id. The body may instead be text/plain with no envelope and no
            X-RateLimit-* headers when a failure escapes the route's own
            handling.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: >-
            dependency_unavailable: one of our own stores could not be read;
            retry later; venue_unavailable: the venue could not be read; the
            message names why; retry after Retry-After.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Retry-After:
              description: seconds to wait before retrying
              schema:
                type: integer
            X-RateLimit-Limit:
              description: >-
                requests allowed per window for this key; present once the key
                passed the limiter
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: >-
                requests left in this window; present once the key passed the
                limiter
              schema:
                type: integer
            X-RateLimit-Reset:
              description: >-
                seconds until the window resets; present once the key passed the
                limiter
              schema:
                type: integer
            X-Request-Id:
              description: >-
                this request's id (yours, when you sent X-Request-Id); equals
                the envelope's request_id
              schema:
                type: string
      security:
        - HTTPBearer: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >
            #!/bin/sh

            # getOrder: Get an order. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base.

            curl -sS -X GET
            "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders/ord_6702291f8e1c2a0012ab34cd"
            \
              -H "Authorization: Bearer $TRENDLINE_API_KEY"
        - label: Python
          lang: python
          source: >
            """getOrder: Get an order. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base."""

            import os


            import requests


            BASE = os.environ.get("TRENDLINE_API_BASE",
            "https://systems.trendlinelabs.ai")

            KEY = os.environ["TRENDLINE_API_KEY"]


            r =
            requests.get(f"{BASE}/public/v1/orders/ord_6702291f8e1c2a0012ab34cd",
            params={},
                                headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
            print(r.status_code, r.json())
        - label: JavaScript
          lang: javascript
          source: >
            // getOrder: Get an order. Needs TRENDLINE_API_KEY;
            TRENDLINE_API_BASE overrides the base.

            const BASE = process.env.TRENDLINE_API_BASE ??
            "https://systems.trendlinelabs.ai";

            const KEY = process.env.TRENDLINE_API_KEY;

            const r = await
            fetch(`${BASE}/public/v1/orders/ord_6702291f8e1c2a0012ab34cd`, {
            method: "GET", headers: { Authorization: `Bearer ${KEY}` } });

            console.log(r.status, await r.json());
components:
  schemas:
    PublicOrder:
      properties:
        avg_price:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            the average fill price of `outcome`, 0..1 as a decimal string, when
            the venue reported one
          title: Avg Price
        client_order_id:
          description: your id for this order
          title: Client Order Id
          type: string
        created_at:
          description: when we accepted the order, ISO 8601
          title: Created At
          type: string
        filled_size:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            contracts filled, an exact decimal string; null while the status is
            unknown
          title: Filled Size
        id:
          description: >-
            our id for the order, ord_ and 24 hex digits; it exists from the
            moment we accept the request, so an order whose status is unknown
            has one too
          pattern: ^ord_[0-9a-f]{24}$
          title: Id
          type: string
        notional_reserved:
          description: >-
            the order's maximum loss counted against your limits, USD as a
            decimal string
          title: Notional Reserved
          type: string
        outcome:
          description: the venue's own outcome label
          title: Outcome
          type: string
        price:
          description: the limit price of `outcome`, a decimal string
          title: Price
          type: string
        remaining_size:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            contracts still resting, an exact decimal string; null while the
            status is unknown
          title: Remaining Size
        side:
          description: buy or sell, the action on `outcome` at `price`
          enum:
            - buy
            - sell
          title: Side
          type: string
        size:
          description: whole contracts ordered
          title: Size
          type: integer
        status:
          description: >-
            unknown: the venue's answer was not received; retry with the same
            client_order_id or read GET /public/v1/orders/{id}, never send a new
            id. On a venue that cannot prove an order's absence it may stay
            unknown: check the venue before trading the same intent again
          enum:
            - open
            - filled
            - partially_filled
            - cancelled
            - unknown
            - not_placed
          title: Status
          type: string
        time_in_force:
          description: as requested
          enum:
            - gtc
            - ioc
          title: Time In Force
          type: string
        type:
          const: limit
          description: the order type; only limit
          title: Type
          type: string
        universal_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            the market universal id holding the leg; null when no market lists
            it
          title: Universal Id
        updated_at:
          description: when we last recorded a change to the order, ISO 8601
          title: Updated At
          type: string
        venue:
          description: the venue the order was sent to
          enum:
            - kalshi
            - polymarket
            - limitless
            - predictfun
          title: Venue
          type: string
        venue_market_id:
          description: the venue's own market id the order went to
          title: Venue Market Id
          type: string
        venue_market_title:
          anyOf:
            - type: string
            - type: 'null'
          description: the leg's title on the venue, when our mirror holds it
          title: Venue Market Title
        venue_order_id:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            the venue's order id; null while the status is unknown and for an
            order that was never placed
          title: Venue Order Id
      required:
        - id
        - client_order_id
        - venue
        - universal_id
        - venue_market_id
        - outcome
        - side
        - type
        - price
        - size
        - time_in_force
        - status
        - notional_reserved
        - created_at
        - updated_at
      title: PublicOrder
      type: object
    PublicError:
      properties:
        error:
          $ref: '#/components/schemas/PublicErrorBody'
          description: the refusal
      required:
        - error
      title: PublicError
      type: object
    PublicErrorBody:
      properties:
        code:
          description: >-
            a machine-readable code from x-known-codes; a new code may be added,
            so handle an unknown one by its status
          title: Code
          type: string
          x-known-codes:
            - access_not_granted
            - dependency_unavailable
            - idempotency_conflict
            - insufficient_scope
            - internal_error
            - invalid_request
            - ip_not_allowed
            - jurisdiction_refused
            - limit_exceeded
            - market_closed
            - not_found
            - order_not_cancellable
            - order_not_found
            - price_off_tick
            - rate_limited
            - request_in_progress
            - tier_required
            - trade_not_granted
            - trading_halted
            - trading_tier_required
            - unauthorized
            - upstream_unavailable
            - venue_auth_failed
            - venue_leg_unverified
            - venue_not_connected
            - venue_not_listed
            - venue_rejected
            - venue_unavailable
            - venue_unsupported
        message:
          description: a human-readable explanation; never parse it
          title: Message
          type: string
        request_id:
          description: >-
            this request's id, also sent as the X-Request-Id header; quote it
            when asking for help
          title: Request Id
          type: string
      required:
        - code
        - message
        - request_id
      title: PublicErrorBody
      type: object
  securitySchemes:
    HTTPBearer:
      description: 'Authorization: Bearer tl_live_…'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.