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

> ## Agent Instructions
> To integrate AGG, start with Quickstart: REST (https://docs.agg.market/quickstart/rest), then Order lifecycle & statuses (https://docs.agg.market/concepts/order-lifecycle).
> Track every trade until it reaches a terminal status. Before retrying a failed or timed-out call, read Errors, retries & idempotency (https://docs.agg.market/concepts/errors).
> The API reference is generated from https://docs.agg.market/openapi/openapi.json.

# Get execution status

> Returns quote-scoped execution progress, execution-plan step state, and terminal order leg results.



## OpenAPI

````yaml /openapi/openapi.json get /execution/status
openapi: 3.0.2
info:
  title: AGG API
  version: 1.0.0
  description: >-
    Prediction market aggregator REST API — authentication, users, venue events,
    venue markets, orderbooks, charts, and execution workflows.
servers:
  - url: https://api.agg.market
    description: Production
security: []
tags:
  - name: Authentication
    description: Sign users in and manage their session tokens.
  - name: Markets
    description: Find events, markets and outcomes to trade.
  - name: Market Data
    description: Live orderbooks, prices, charts and scores for those markets.
  - name: Trading
    description: Quote, place, sign, track and cancel orders.
  - name: Portfolio
    description: A user's orders, positions, balances and activity.
  - name: Funding
    description: Deposit addresses, withdrawals, balance refills and fiat on-ramp.
  - name: Users
    description: The signed-in user's profile, linked accounts, KYC and venue keys.
  - name: Hosted Venue Accounts
    description: Provision, fund and withdraw from venue accounts hosted for the user.
  - name: Webhooks
    description: Configure and operate webhook delivery to your server.
  - name: Partner Admin
    description: Server-side reads across your app's users, orders and analytics.
  - name: Paper Trading
    description: Simulated accounts and orders for testing without real funds.
  - name: News
    description: News feeds linked to markets.
  - name: Correlated Markets
    description: Markets related to a given market and the effect of its resolution.
paths:
  /execution/status:
    get:
      tags:
        - Trading
      summary: Get execution status
      description: >-
        Returns quote-scoped execution progress, execution-plan step state, and
        terminal order leg results.
      operationId: getExecutionStatus
      parameters:
        - name: quoteId
          in: query
          required: true
          schema:
            minLength: 1
            type: string
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - live
              - paper
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                required:
                  - executionId
                  - quoteId
                  - orderIds
                  - overallState
                  - terminal
                  - errorReason
                  - pollAfterMs
                  - dagProgress
                  - steps
                  - orders
                properties:
                  executionId:
                    description: Execution id; `null` until execution starts.
                    type: string
                    nullable: true
                  quoteId:
                    description: The quote being executed.
                    type: string
                  orderIds:
                    description: Orders created for this trade.
                    type: array
                    items:
                      type: string
                  overallState:
                    $ref: '#/components/schemas/ExecutionOverallState'
                  terminal:
                    description: '`true` once nothing will change; stop polling.'
                    type: boolean
                  errorReason:
                    description: Readable reason the trade failed.
                    type: string
                    nullable: true
                  pollAfterMs:
                    description: >-
                      Suggested wait before the next poll, in milliseconds;
                      `null` when terminal.
                    minimum: 0
                    type: integer
                    nullable: true
                  dagProgress:
                    description: >-
                      Progress of the trade's execution plan; `null` until the
                      plan exists.
                    type: object
                    required:
                      - dagRunId
                      - totalSteps
                      - currentSequence
                      - currentStepType
                      - completedSequences
                      - stepTypes
                      - status
                      - errorReason
                    properties:
                      dagRunId:
                        description: Id of the execution plan.
                        type: string
                      totalSteps:
                        minimum: 0
                        description: Number of steps in the plan.
                        type: integer
                      currentSequence:
                        minimum: 0
                        description: '`sequence` of the step running now.'
                        type: integer
                      currentStepType:
                        description: >-
                          `stepType` of the step running now. Machine name of
                          the execution step. Open set, for logging and support
                          rather than display; render `label` instead. Examples:
                          `order-submit`, `request-signature`,
                          `request-transaction`, `bridge-submit`,
                          `polymarket-finalize`.
                        type: string
                        nullable: true
                      completedSequences:
                        description: '`sequence` numbers of the finished steps.'
                        type: array
                        items:
                          minimum: 1
                          type: integer
                      stepTypes:
                        description: >-
                          Map of `sequence` to `stepType`. Machine name of the
                          execution step. Open set, for logging and support
                          rather than display; render `label` instead. Examples:
                          `order-submit`, `request-signature`,
                          `request-transaction`, `bridge-submit`,
                          `polymarket-finalize`.
                        type: object
                        additionalProperties:
                          type: string
                      status:
                        description: State of the execution plan.
                        type: string
                        enum:
                          - running
                          - completed
                          - failed
                      errorReason:
                        description: Readable reason the plan failed.
                        type: string
                        nullable: true
                    nullable: true
                  steps:
                    description: >-
                      Execution steps, for a progress display. Group rows by
                      `groupId`.
                    type: array
                    items:
                      $ref: '#/components/schemas/ExecutionStatusStep'
                  orders:
                    description: One entry per order.
                    type: array
                    items:
                      $ref: '#/components/schemas/ExecutionStatusOrder'
                  pendingSignatures:
                    description: >-
                      Self-custody only: requests waiting for the user's wallet,
                      including ones raised after the fill call. Answer them on
                      POST /execution/fill/{quoteId}/signatures.
                    type: array
                    items:
                      $ref: '#/components/schemas/PendingSignature'
              example:
                executionId: cmf3r1a4k00c6mw0l9d3h5tsy
                quoteId: k2r8v5n1x7c4m9t3b6q0w2za
                orderIds:
                  - cmf3r1a2b00c4mw0lq8y7e3uj
                  - cmf3r1a3c00c5mw0lt2k9w6nd
                overallState: filled
                terminal: true
                errorReason: null
                pollAfterMs: null
                dagProgress:
                  dagRunId: cmf3r1a4k00c6mw0l9d3h5tsy
                  totalSteps: 2
                  currentSequence: 2
                  currentStepType: null
                  completedSequences:
                    - 1
                    - 2
                  stepTypes:
                    '1': polymarket-order
                    '2': limitless-order
                  status: completed
                  errorReason: null
                steps:
                  - sequence: 1
                    stepType: polymarket-order
                    status: completed
                    attempt: 1
                    startedAt: '2026-09-29T15:04:12.310Z'
                    completedAt: '2026-09-29T15:04:14.052Z'
                    errorReason: null
                    orderIds:
                      - cmf3r1a2b00c4mw0lq8y7e3uj
                    kind: fill
                    groupId: polymarket
                    groupStatus: completed
                    label: Buy on Polymarket
                  - sequence: 2
                    stepType: limitless-order
                    status: completed
                    attempt: 1
                    startedAt: '2026-09-29T15:04:12.318Z'
                    completedAt: '2026-09-29T15:04:15.470Z'
                    errorReason: null
                    orderIds:
                      - cmf3r1a3c00c5mw0lt2k9w6nd
                    kind: fill
                    groupId: limitless
                    groupStatus: completed
                    label: Buy on Limitless
                orders:
                  - orderId: cmf3r1a2b00c4mw0lq8y7e3uj
                    venue: polymarket
                    status: filled
                    event: filled
                    filledAmountRaw: '15300000'
                    actualSharesRaw: '30000000'
                    executionPriceRaw: '0.51'
                    txHash: >-
                      0x9c1e5b7a3d2f8c6e4a0b9d7f5c3e1a8b6d4f2c0e9a7b5d3f1c8e6a4b2d0f9c7e
                    updatedAt: '2026-09-29T15:04:14.052Z'
                  - orderId: cmf3r1a3c00c5mw0lt2k9w6nd
                    venue: limitless
                    status: filled
                    event: filled
                    filledAmountRaw: '9630000'
                    actualSharesRaw: '18000000'
                    executionPriceRaw: '0.535'
                    txHash: >-
                      0x3a6d9f2c5e8b1d4a7c0f3e6b9d2a5c8f1e4b7d0a3c6f9e2b5d8a1c4f7e0b3d6a
                    updatedAt: '2026-09-29T15:04:15.470Z'
        '400':
          description: '400'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '401':
          description: '401'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '403':
          description: '403'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
        '404':
          description: '404'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorMessage'
      security:
        - appId: []
          bearerAuth: []
components:
  schemas:
    ExecutionOverallState:
      description: >-
        Overall state of the trade. In progress: `created`, `routing`,
        `quoting`, `placing`, `confirming`. Terminal (`terminal: true`):
        `filled`, `partially_filled`, `failed`, `cancelled`, `expired`.
      type: string
      enum:
        - created
        - routing
        - quoting
        - placing
        - confirming
        - filled
        - partially_filled
        - failed
        - cancelled
        - expired
    ExecutionStatusStep:
      type: object
      required:
        - sequence
        - stepType
        - status
        - attempt
        - startedAt
        - completedAt
        - errorReason
        - orderIds
        - kind
        - groupId
        - groupStatus
        - label
      properties:
        sequence:
          minimum: 0
          description: >-
            Position of the step in the plan, from 1. `0` is the "order
            submitted" step shown before the plan exists.
          type: integer
        stepType:
          description: >-
            Machine name of the execution step. Open set, for logging and
            support rather than display; render `label` instead. Examples:
            `order-submit`, `request-signature`, `request-transaction`,
            `bridge-submit`, `polymarket-finalize`.
          type: string
        status:
          description: Status of this step.
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
            - skipped
        attempt:
          minimum: 0
          description: Retry count for this step.
          type: integer
        startedAt:
          description: When the step started.
          format: date-time
          type: string
          nullable: true
        completedAt:
          description: When the step finished.
          format: date-time
          type: string
          nullable: true
        errorReason:
          description: Readable reason the step failed.
          type: string
          nullable: true
        orderIds:
          description: >-
            Orders (from `orders[]`) this step funds or executes. Empty when the
            step is not tied to one order. A step funding two orders lists both;
            show it under each.
          type: array
          items:
            type: string
        kind:
          description: >-
            What the step does, for display: `submit` (order accepted), `setup`
            (one-time wallet or venue setup), `bridge` (moving funds across
            chains), `fill` (trading on a venue), `internal` (bookkeeping;
            returned so `sequence` has no gaps, not meant to be shown).
          type: string
          enum:
            - submit
            - setup
            - bridge
            - fill
            - internal
        groupId:
          description: >-
            Steps with the same `groupId` are one display row; show one line per
            group.
          type: string
        groupStatus:
          description: >-
            Status of the whole display row, the same on every step in the
            group; use it as is.
          type: string
          enum:
            - pending
            - in_progress
            - completed
            - failed
            - skipped
        label:
          description: >-
            Ready-to-show row text for the current `groupStatus`, e.g. "Bridging
            342 USDC from Ethereum to Polygon". Same on every step in the group;
            empty for `internal` steps. Use `kind`, `orderIds` and `bridge` to
            compose your own.
          type: string
        bridge:
          description: 'Only on `kind: "bridge"` steps.'
          type: object
          required:
            - amount
            - tokenSymbol
            - fromChain
            - toChain
          properties:
            amount:
              description: >-
                Amount bridged, as a human-readable decimal string in token
                units, e.g. "58.5".
              type: string
            tokenSymbol:
              description: Token bridged, e.g. "USDC".
              type: string
            fromChain:
              description: Source chain name, e.g. "Ethereum".
              type: string
            toChain:
              description: Destination chain name, e.g. "Polygon".
              type: string
    ExecutionStatusOrder:
      type: object
      required:
        - orderId
        - venue
        - status
        - event
        - updatedAt
      properties:
        orderId:
          description: Order id.
          type: string
        venue:
          allOf:
            - $ref: '#/components/schemas/Venue'
          description: Venue the order is on.
        status:
          $ref: '#/components/schemas/OrderStatus'
        event:
          description: Terminal outcome of the order; `null` while it is in flight.
          nullable: true
          type: string
          enum:
            - filled
            - partial_fill
            - failed
        filledAmountRaw:
          description: >-
            USD actually filled: cost on a buy, proceeds on a sell. USD in
            6-decimal atomic units, as an integer string (1000000 = $1.00).
          type: string
        remainingAmountRaw:
          description: >-
            Only on `partial_fill`: order amount minus `filledAmountRaw`. For
            market buys, USD in 6-decimal atomic units, as an integer string
            (1000000 = $1.00). Not meaningful for limit or sell orders, whose
            order amount is in shares.
          type: string
        quotedSharesRaw:
          description: >-
            Shares the quote promised. Shares in 6-decimal atomic units, as an
            integer string (1000000 = 1 share).
          type: string
        actualSharesRaw:
          description: >-
            Shares actually bought or sold. Shares in 6-decimal atomic units, as
            an integer string (1000000 = 1 share).
          type: string
        quotedToWinRaw:
          description: >-
            Payout if the outcome wins, per the quote. USD in 6-decimal atomic
            units, as an integer string (1000000 = $1.00).
          type: string
        actualToWinRaw:
          description: >-
            Payout if the outcome wins, based on actual fills. USD in 6-decimal
            atomic units, as an integer string (1000000 = $1.00).
          type: string
        quotedPriceRaw:
          description: >-
            Quoted price. Price per share from 0 to 1, as a decimal string (e.g.
            "0.53").
          type: string
        executionPriceRaw:
          description: >-
            Average fill price. Price per share from 0 to 1, as a decimal string
            (e.g. "0.53"). Precision varies by venue.
          type: string
        partialFillReason:
          description: >-
            Why a `partial_fill` stopped short. Open set: known values are
            `venue_capacity`, `price_slipped`, `venue_cancelled`,
            `venue_expired`, `venue_closed`, `user_cancelled`, `timeout`,
            `clearinghouse_capacity`, `native_remainder_voided`.
          type: string
        errorReason:
          description: Readable reason the order failed.
          type: string
        venueOrderId:
          description: The venue's own order id.
          type: string
        txHash:
          description: Settlement transaction hash.
          type: string
        updatedAt:
          format: date-time
          description: Time of the last change.
          type: string
    PendingSignature:
      description: >-
        One request the user's wallet must sign (or send) before execution
        continues.
      type: object
      required:
        - stepId
        - type
        - venue
        - signerAddress
        - payload
        - expiresAt
      properties:
        stepId:
          description: >-
            Id of the execution step waiting on this request. Send it back
            verbatim.
          type: string
        type:
          $ref: '#/components/schemas/SignatureRequestType'
        venue:
          description: >-
            Who the request is for. Open set: usually a venue (`polymarket`,
            `hyperliquid`); `relay` for a bridge transfer and `referral` for a
            referral payout.
          type: string
        signerAddress:
          description: >-
            Address that must sign (or send) this request. For Hyperliquid it
            may be the user's approved agent address.
          type: string
        chainId:
          description: >-
            Chain the request is for, when set. Often absent: read the chain
            from `payload.domain.chainId` or `payload.chainId`.
          type: number
        payload:
          description: >-
            The data to sign or send, verbatim. Shape depends on `type`:
            `eip712`: viem-style typed data `{ domain, types, primaryType,
            message }`; sign it with signTypedData. `personal_sign`: either a
            string message, or `{ raw: "0x…" }` meaning sign those raw bytes
            (`signMessage({ message: { raw } })`). `transaction`: `{ chainId,
            to, value, data }` where `chainId` is a decimal string, `value` a
            decimal wei string and `data` hex; broadcast it from `signerAddress`
            and return `txHash`. `hl_l1_action`: EIP-712 typed data for a
            Hyperliquid action (primary type `Agent`, chainId 1337); sign with
            signTypedData. `eip7702_authorization`: `{ contractAddress, chainId,
            nonce }` (numbers for `chainId` and `nonce`); sign the EIP-7702
            authorization for them. `safe_tx`: `{ domain, types, primaryType:
            "SafeTx", message, safeTxHash }`; sign the raw 32-byte `safeTxHash`
            with personal_sign (`signMessage({ message: { raw: safeTxHash }
            })`), not with signTypedData.
        expiresAt:
          description: >-
            ISO-8601. After this the request is void and the trade must be
            re-quoted.
          type: string
        purpose:
          description: >-
            Why the request is asked for, when known; for display and routing
            only. Open set. Known values: `funding`, `funding_and_fee`, `fee` (a
            self-custody funding batch), `app_fee` (the app fee),
            `referral_payout` (an app-paid referral, signed by
            `referralPayerAddress`; read `type`, it is a `transaction` on EVM
            chains and an `eip712` on HyperCore), `hl_referral` (a partner
            referral code for the user's Hyperliquid account; see `optional`).
          type: string
        optional:
          description: >-
            `true` when the trade proceeds without this request, e.g. `purpose:
            "hl_referral"`. If your signer declines it, skip it and submit the
            rest.
          type: boolean
    ErrorMessage:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    Venue:
      type: string
      enum:
        - kalshi
        - polymarket
        - limitless
        - opinion
        - predict
        - pred
        - tiprun
        - probable
        - myriad
        - hyperliquid
        - novig
        - prophetx
        - betdex
    OrderStatus:
      description: >-
        Order lifecycle status. In flight: `pending` (accepted, funds being
        checked), `signing`, `pending_bridge` (funds moving to the venue's
        chain), `submitting`, `submitted` (sent to the venue, awaiting
        confirmation). Resting limit orders: `open`, `partially_filled_open`,
        `cancel_pending` (cancel requested, awaiting the venue). Terminal:
        `filled`, `partial_fill` (the unfilled rest will not fill; see
        `partialFillReason`), `failed`, `expired`, `cancelled`.
      type: string
      enum:
        - pending
        - signing
        - pending_bridge
        - submitting
        - submitted
        - open
        - partially_filled_open
        - cancel_pending
        - filled
        - partial_fill
        - failed
        - expired
        - cancelled
    SignatureRequestType:
      description: >-
        What to do with `payload`. `eip712`: sign typed data. `personal_sign`:
        sign a message (EIP-191). `transaction`: broadcast a transaction and
        return its hash. `solana_transaction`: sign a Solana transaction (not
        currently issued). `hl_l1_action`: sign a Hyperliquid action's typed
        data. `eip7702_authorization`: sign an EIP-7702 authorization (a raw
        digest many wallets cannot produce; if yours cannot, fill with
        `approveMode: "user_broadcast"` instead of throwing). `safe_tx`: a
        Polymarket Safe transaction; see `payload`.
      type: string
      enum:
        - eip712
        - personal_sign
        - transaction
        - solana_transaction
        - hl_l1_action
        - eip7702_authorization
        - safe_tx
  securitySchemes:
    appId:
      type: apiKey
      in: header
      name: x-app-id
      description: Your application ID. Required for all app-tier and user-tier routes.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT access token returned by POST /auth/verify. Required for user-tier
        routes.

````