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

# Place an order

> Beta: not yet enabled; the launch venues are Polymarket, predict.fun and Limitless; Kalshi is built and enabled separately after a live test. Requests answer 404 with {"detail": "Not Found"}, as an unregistered path does, until trading is switched on. Place one order with your own connected venue account, on a venue enabled for trading. type limit rests at price (time_in_force GTC, the default, or GTD until expires_at) or fills now (FOK all or nothing, FAK/IOC what it can); type market fills now against the book (FAK, the default, or FOK), bounded by price when you send one (your worst price; without it the venue's extreme price, and your limits count 1 USD per contract). A buy sends size or amount_usd; size is at least 5 contracts, amount_usd at least 1 USD. What each venue can take is one table (trading guide): a kind it cannot take is 422 venue_unsupported naming the closest that works, before anything is sent. Every order gets our `id` (ord_...) the moment we accept it. Send a client_order_id you generate; resending the same request with it never places a second order (the latest answer is replayed with Idempotent-Replay: true); without one we generate an id, and a retry may then place a second order. 201: the venue accepted it. 202 status unknown: the venue's answer was not received; retry the SAME request (same client_order_id) or read GET /public/v1/orders/{id}, and it is reconciled from the venue, never re-submitted; where the venue cannot prove an order's absence the answer can stay unknown, so check the venue's own listing before trading the same intent again. 200: an answer a reconcile produced (the venue's state, or status not_placed). price is the price of `outcome`, 0..1 on the venue's grid, refused (never rounded) when off it. Refusals: 503 trading_halted; 403 trade_not_granted, jurisdiction_refused, trading_tier_required; 422 venue_unsupported, price_off_tick, limit_exceeded, venue_rejected, invalid_request; 404 not_found, venue_not_listed, venue_not_connected; 410 market_closed; 409 venue_leg_unverified, idempotency_conflict, request_in_progress (Retry-After), venue_auth_failed; 429 rate_limited; 503 venue_unavailable, dependency_unavailable.



## OpenAPI

````yaml /openapi.json post /public/v1/orders
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 three headers,
    `X-Client-Id`, `X-Api-Key` and `X-Api-Secret`; 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:
    post:
      tags:
        - Trading
      summary: Place an order
      description: >-
        Beta: not yet enabled; the launch venues are Polymarket, predict.fun and
        Limitless; Kalshi is built and enabled separately after a live test.
        Requests answer 404 with {"detail": "Not Found"}, as an unregistered
        path does, until trading is switched on. Place one order with your own
        connected venue account, on a venue enabled for trading. type limit
        rests at price (time_in_force GTC, the default, or GTD until expires_at)
        or fills now (FOK all or nothing, FAK/IOC what it can); type market
        fills now against the book (FAK, the default, or FOK), bounded by price
        when you send one (your worst price; without it the venue's extreme
        price, and your limits count 1 USD per contract). A buy sends size or
        amount_usd; size is at least 5 contracts, amount_usd at least 1 USD.
        What each venue can take is one table (trading guide): a kind it cannot
        take is 422 venue_unsupported naming the closest that works, before
        anything is sent. Every order gets our `id` (ord_...) the moment we
        accept it. Send a client_order_id you generate; resending the same
        request with it never places a second order (the latest answer is
        replayed with Idempotent-Replay: true); without one we generate an id,
        and a retry may then place a second order. 201: the venue accepted it.
        202 status unknown: the venue's answer was not received; retry the SAME
        request (same client_order_id) or read GET /public/v1/orders/{id}, and
        it is reconciled from the venue, never re-submitted; where the venue
        cannot prove an order's absence the answer can stay unknown, so check
        the venue's own listing before trading the same intent again. 200: an
        answer a reconcile produced (the venue's state, or status not_placed).
        price is the price of `outcome`, 0..1 on the venue's grid, refused
        (never rounded) when off it. Refusals: 503 trading_halted; 403
        trade_not_granted, jurisdiction_refused, trading_tier_required; 422
        venue_unsupported, price_off_tick, limit_exceeded, venue_rejected,
        invalid_request; 404 not_found, venue_not_listed, venue_not_connected;
        410 market_closed; 409 venue_leg_unverified, idempotency_conflict,
        request_in_progress (Retry-After), venue_auth_failed; 429 rate_limited;
        503 venue_unavailable, dependency_unavailable.
      operationId: placeOrder
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicOrderRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              example:
                amount_usd: null
                avg_price: null
                client_order_id: s1-0001
                created_at: '2026-10-06T05:59:59+00:00'
                expires_at: null
                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
                worst_price: null
              schema:
                $ref: '#/components/schemas/PublicOrder'
          description: >-
            a reconcile's answer (the venue's state, or not_placed), or a replay
            of the latest answer for this client_order_id
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Idempotent-Replay:
              description: true on a replay
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOrder'
          description: the venue accepted the order (its first answer)
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
        '202':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicOrder'
          description: >-
            status unknown: the venue's answer was not received; retry the same
            request, or read the order by its id
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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: missing or partial credential headers, parts that do
            not belong together, or a key that is unknown, revoked or expired.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this answer
              schema:
                type: string
            WWW-Authenticate:
              description: ApiKey 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;
            trade_not_granted: the account holds no active trade grant;
            jurisdiction_refused: the jurisdiction recorded on your trade grant
            may not trade on that venue; trading_tier_required: the account's
            plan may not trade on that venue.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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: >-
            not_found: no such event, market or key; venue_not_listed: the
            market has no leg on that venue; venue_not_connected: we hold no
            usable account of yours for that venue: not connected, held by
            another account, or (Limitless positions) an empty answer for a
            profile not verified as your sub-account (found only through its
            public profile); the message names the reason; 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
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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: >-
            idempotency_conflict: the client_order_id was already used with a
            different request; request_in_progress: a request with this
            client_order_id is still in flight; retry after Retry-After;
            venue_leg_unverified: the market's leg is not the venue market you
            named, or could not be verified; nothing was sent;
            venue_auth_failed: the venue refused your own stored credential;
            reconnect it; order_not_cancellable: the order is no longer open,
            the venue no longer holds it, or another credential placed it.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Retry-After:
              description: seconds to wait before retrying
              schema:
                type: integer
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicError'
          description: 'market_closed: the market''s leg on that venue no longer trades.'
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
        '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; venue_unsupported: the route
            does not serve that venue; price_off_tick: the price is not on the
            venue's price grid; it is refused, never rounded; limit_exceeded:
            the order's maximum loss is over the per-order or daily limit, or
            that limit is 0 (limit_unset); venue_rejected: the venue rejected
            the order; the message carries the venue's own error code only.
          headers:
            Cache-Control:
              description: no-store on every answer
              schema:
                type: string
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
        '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
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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; trading_halted: new orders are halted for everyone;
            cancels, replays and reconciles still answer; 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
            Server-Timing:
              description: >-
                app;dur=<milliseconds, one decimal>: the time from the API
                receiving the request to starting this 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
      security:
        - ApiKey: []
          ApiSecret: []
          ClientId: []
      x-codeSamples:
        - label: cURL
          lang: bash
          source: >
            #!/bin/sh

            # placeOrder: Place an order. Needs TRENDLINE_CLIENT_ID,
            TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE
            overrides the base.

            curl -sS -X POST
            "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/orders"
            \
              -H "X-Client-Id: $TRENDLINE_CLIENT_ID" \
              -H "X-Api-Key: $TRENDLINE_API_KEY" \
              -H "X-Api-Secret: $TRENDLINE_API_SECRET" \
              -H "Content-Type: application/json" -d '{"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"}'
        - label: Python
          lang: python
          source: >
            """placeOrder: Place an order. Needs TRENDLINE_CLIENT_ID,
            TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE
            overrides the base."""

            import os


            import requests


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

            HEADERS = {"X-Client-Id": os.environ["TRENDLINE_CLIENT_ID"],
            "X-Api-Key": os.environ["TRENDLINE_API_KEY"],
                       "X-Api-Secret": os.environ["TRENDLINE_API_SECRET"]}

            r = requests.post(f"{BASE}/public/v1/orders", json={"venue":
            "polymarket", "universal_id": "mk-btc-100k-2026", "outcome": "yes",
            "side": "buy", "type": "limit", "price": "0.42", "size": 10,
            "client_order_id": "s1-0001"}, headers=HEADERS, timeout=10)

            print(r.status_code, r.json())
        - label: JavaScript
          lang: javascript
          source: >
            // placeOrder: Place an order. Needs TRENDLINE_CLIENT_ID,
            TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE
            overrides the base.

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

            const HEADERS = { "X-Client-Id": process.env.TRENDLINE_CLIENT_ID,
            "X-Api-Key": process.env.TRENDLINE_API_KEY,
              "X-Api-Secret": process.env.TRENDLINE_API_SECRET };
            const r = await fetch(`${BASE}/public/v1/orders`, { method: "POST",
            headers: { ...HEADERS, "Content-Type": "application/json" }, body:
            JSON.stringify({"venue":"polymarket","universal_id":"mk-btc-100k-2026","outcome":"yes","side":"buy","type":"limit","price":"0.42","size":10,"client_order_id":"s1-0001"})
            });

            console.log(r.status, await r.json());
components:
  schemas:
    PublicOrderRequest:
      additionalProperties: false
      properties:
        amount_usd:
          anyOf:
            - maxLength: 32
              minLength: 1
              pattern: ^[0-9]+(\.[0-9]{1,2})?$
              type: string
            - type: 'null'
          description: >-
            buys only, instead of size: the USD to spend, at least 1, whole
            cents. A market buy spends it on Polymarket and predict.fun;
            elsewhere, and on a limit order, it buys the whole contracts it
            covers at `price` (or the worst price)
          title: Amount Usd
        client_order_id:
          anyOf:
            - pattern: ^[A-Za-z0-9_-]{1,64}$
              type: string
            - type: 'null'
          description: >-
            an id you choose for this order (e.g. a UUID), unique per order;
            resend the same one only to retry the same order, which never places
            a second order. Optional: without it we generate one, and a retry of
            a lost answer may then place a second order
          title: Client Order Id
        expires_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            GTD only, required with it: when the order expires, Unix seconds, at
            least 180 s and at most a year ahead
          title: Expires At
        outcome:
          description: the venue's own outcome label the order is on
          enum:
            - 'yes'
            - 'no'
          title: Outcome
          type: string
        price:
          anyOf:
            - maxLength: 32
              minLength: 1
              pattern: ^[0-9]+(\.[0-9]+)?$
              type: string
            - type: 'null'
          description: >-
            limit: the limit price of `outcome`, required. market: optional, the
            worst price you accept (a buy's ceiling, a sell's floor); without it
            the venue's extreme price is the bound and your limits count $1 per
            contract. A plain decimal string on the venue's grid, refused when
            off it, never rounded
          title: Price
        side:
          description: buy or sell, the action on `outcome`
          enum:
            - buy
            - sell
          title: Side
          type: string
        size:
          anyOf:
            - maximum: 1000000
              minimum: 1
              type: integer
            - type: 'null'
          description: >-
            whole contracts, at least 5; a sell sends size, a buy sends size or
            amount_usd (exactly one)
          title: Size
        time_in_force:
          anyOf:
            - enum:
                - GTC
                - GTD
                - FOK
                - FAK
                - IOC
                - gtc
                - gtd
                - fok
                - fak
                - ioc
              type: string
            - type: 'null'
          description: >-
            GTC rests until cancelled (the limit default); GTD rests until
            expires_at; FOK fills entirely now or not at all; FAK (alias IOC)
            fills what it can now and cancels the rest (the market default). A
            market order takes FOK or FAK/IOC only. Lower case is accepted
          title: Time In Force
        type:
          description: >-
            limit (rests at `price` or better, per time_in_force) or market
            (fills now against the book, up to an optional worst `price`)
          enum:
            - limit
            - market
          title: Type
          type: string
        universal_id:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          description: >-
            the market universal id; its leg on `venue` is traded, so switching
            venue is one field. Send this, venue_market_id, or both
          title: Universal Id
        venue:
          description: >-
            the venue to trade on; only venues enabled for trading are accepted
            (no best-venue routing)
          enum:
            - kalshi
            - polymarket
            - limitless
            - predictfun
          title: Venue
          type: string
        venue_market_id:
          anyOf:
            - maxLength: 256
              minLength: 1
              type: string
            - type: 'null'
          description: >-
            the venue's own market id (on Kalshi, its ticker); with universal_id
            both must name the same leg, else 422, never re-routed
          title: Venue Market Id
      required:
        - venue
        - outcome
        - side
        - type
      title: PublicOrderRequest
      type: object
    PublicOrder:
      properties:
        amount_usd:
          anyOf:
            - type: string
            - type: 'null'
          description: the USD amount sent, as sent; null when size was sent
          title: Amount Usd
        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
        expires_at:
          anyOf:
            - type: integer
            - type: 'null'
          description: a GTD order's expiry, Unix seconds, as sent; null otherwise
          title: Expires At
        filled_size:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            contracts filled, an exact decimal string; null while the status is
            unknown. A market buy, or a limit FAK/FOK buy, can fill more
            contracts than size at better prices (never spending more than size
            × price)
          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:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            as sent: a limit order's price, a market order's worst price; null
            on a market order sent without one
          title: Price
        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:
          anyOf:
            - type: integer
            - type: 'null'
          description: >-
            whole contracts ordered: as sent, or bought by amount_usd where the
            venue takes contracts; null when the venue took amount_usd itself
          title: Size
        status:
          description: >-
            expired: a GTD order reached expires_at (filled_size says what
            filled first). 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
            - expired
            - unknown
            - not_placed
          title: Status
          type: string
        time_in_force:
          description: as sent, or the type's default (GTC for limit, FAK for market)
          enum:
            - GTC
            - GTD
            - FOK
            - FAK
            - IOC
            - gtc
            - gtd
            - fok
            - fak
            - ioc
          title: Time In Force
          type: string
        type:
          description: limit or market, as sent
          enum:
            - limit
            - market
          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
        worst_price:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            a market order's bound as sent to the venue: your price, else the
            venue's extreme price; null on a limit order
          title: Worst Price
      required:
        - id
        - client_order_id
        - venue
        - universal_id
        - venue_market_id
        - outcome
        - side
        - type
        - 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:
    ApiKey:
      description: the key's id; public
      in: header
      name: X-Api-Key
      type: apiKey
    ApiSecret:
      description: >-
        the key's secret (tl_live_…), shown once at creation; never log or share
        it
      in: header
      name: X-Api-Secret
      type: apiKey
    ClientId:
      description: the key's own client id (cli_…), different for every key; public
      in: header
      name: X-Client-Id
      type: apiKey

````

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