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

# Quote

> Simulate a cross-venue fill for a predexon_id without placing an order

## Overview

Simulate filling a single logical order across every routed venue that lists the outcome identified by `predexonId`. The router expands the supplied canonical `predexon_id` to every routed venue listing for that outcome, walks merged fee-inclusive order books, and returns the projected fill price, per-venue breakdown, and fill likelihood.

No order is placed. Quote uses the same routing engine as [Place Market Order](/api-reference/router/place-order), so a quote taken immediately before an order is a reliable preview of what the order will do.

See the [Order Router concept page](/concepts/order-router) for an end-to-end walkthrough of how the router decides which venues to route to.

## Path Parameters

| Param       | Type   | Description                                                                                                                                                                                |
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `accountId` | string | Trading account ID. Must belong to the calling API key. See the [Trading API accounts docs](https://docs.predexon.com/trading-api/accounts/create-account) for how to create and fund one. |

## Query Parameters

| Param        | Type   | Required           | Description                                                                                                    |
| ------------ | ------ | ------------------ | -------------------------------------------------------------------------------------------------------------- |
| `predexonId` | string | Yes                | Canonical `predexon_id` for the outcome. The router expands it to every routed venue listing for that outcome. |
| `side`       | string | Yes                | `buy` or `sell`.                                                                                               |
| `amount`     | number | Required on `buy`  | USD/stablecoin notional to spend. Must be finite and `> 0`. Must not be set on `sell`.                         |
| `size`       | number | Required on `sell` | Number of shares to sell. Must be finite and `> 0`. Must not be set on `buy`.                                  |

## Response Fields

### Top level

| Field             | Type    | Description                                                                                                                                        |
| ----------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| `predexonId`      | string  | Echoes the request `predexonId`.                                                                                                                   |
| `title`           | string  | Human-readable outcome label.                                                                                                                      |
| `outcome`         | string  | Canonical outcome code (e.g. `"atl"`, `"draw"`).                                                                                                   |
| `side`            | string  | Echoes the request `side`.                                                                                                                         |
| `requestedAmount` | string? | Echo of the request `amount`. Present on buy quotes; `null` on sell quotes.                                                                        |
| `requestedSize`   | string? | Echo of the request `size`. Present on sell quotes; `null` on buy quotes.                                                                          |
| `venues[]`        | array   | One entry per **actionable** venue — venues the router could currently route to. Venues without a live streaming book are excluded from the array. |
| `summary`         | object? | Aggregate projected fill. `null` when no venue could host any portion of the order.                                                                |

### Venue entry

| Field                | Type    | Description                                                                                                                                                                |
| -------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `venue`              | string  | `polymarket`, `predict`, `opinion`, or `limitless`.                                                                                                                        |
| `hasPosition`        | boolean | Sell quotes only — true when the account already holds a position on this venue that can be sold.                                                                          |
| `positionSize`       | string? | Size of the existing position on this venue. `null` when `hasPosition` is false (or on buy quotes).                                                                        |
| `bestPrice`          | string  | Top-of-book price on the relevant side.                                                                                                                                    |
| `estimatedFillPrice` | string? | Projected volume-weighted average fill price on this venue. `null` when no fill is projected here.                                                                         |
| `estimatedFillSize`  | string? | Projected shares filled on this venue. `null` when no fill is projected.                                                                                                   |
| `availableLiquidity` | string  | Sum of depth on the relevant side, expressed in shares.                                                                                                                    |
| `feeBpsAtTop`        | number  | Effective venue fee at top of book, in basis points. May be fractional (e.g. `24.6975`). Price-aware — the same venue can return different fees at different price levels. |

### Summary

| Field                    | Type   | Description                                                                   |
| ------------------------ | ------ | ----------------------------------------------------------------------------- |
| `estimatedAvgPrice`      | string | Projected volume-weighted fill price across all venues.                       |
| `estimatedTotalSize`     | string | Projected total shares filled across all venues.                              |
| `fillLikelihood`         | string | `high` (liquidity > 2× requested), `medium` (> 1× and ≤ 2×), or `low` (≤ 1×). |
| `venueBreakdown[]`       | array  | One entry per venue expected to receive allocation.                           |
| `venueBreakdown[].venue` | string |                                                                               |
| `venueBreakdown[].size`  | string | Projected shares on this venue.                                               |
| `venueBreakdown[].price` | string | Projected price on this venue.                                                |

## Errors

Every error response includes a machine-readable `errorCode` alongside the human-readable `error` string.

| Status | `errorCode`             | When                                                                          |
| ------ | ----------------------- | ----------------------------------------------------------------------------- |
| `400`  | `parse_error`           | Missing or invalid `predexonId`, `side`, `amount`, or `size`.                 |
| `404`  | `predexon_not_routable` | No routed venue carries the supplied `predexonId`.                            |
| `503`  | `registry_unavailable`  | Routing registry is temporarily unavailable. Retry with exponential back-off. |

## Example

`GET /api/accounts/acc_8f2e/router/quote?predexonId=px-uvtpjis2k7bj&side=buy&amount=10`

```json theme={null}
{
  "predexonId": "px-uvtpjis2k7bj",
  "title": "Atlanta Hawks",
  "outcome": "atl",
  "side": "buy",
  "requestedAmount": "10",
  "requestedSize": null,
  "venues": [
    {
      "venue": "polymarket",
      "hasPosition": false,
      "positionSize": null,
      "bestPrice": "0.33",
      "estimatedFillPrice": "0.331200",
      "estimatedFillSize": "18.115000",
      "availableLiquidity": "482.500000",
      "feeBpsAtTop": 35
    },
    {
      "venue": "predict",
      "hasPosition": false,
      "positionSize": null,
      "bestPrice": "0.34",
      "estimatedFillPrice": "0.342000",
      "estimatedFillSize": "11.820000",
      "availableLiquidity": "64.000000",
      "feeBpsAtTop": 30
    },
    {
      "venue": "opinion",
      "hasPosition": false,
      "positionSize": null,
      "bestPrice": "0.35",
      "estimatedFillPrice": null,
      "estimatedFillSize": null,
      "availableLiquidity": "6.000000",
      "feeBpsAtTop": 20
    }
  ],
  "summary": {
    "estimatedAvgPrice": "0.335070",
    "estimatedTotalSize": "29.935000",
    "fillLikelihood": "high",
    "venueBreakdown": [
      { "venue": "polymarket", "size": "18.115000", "price": "0.331200" },
      { "venue": "predict", "size": "11.820000", "price": "0.342000" }
    ]
  }
}
```

<Info>
  The router ranks venues by **effective price** — i.e. the quoted price adjusted for each venue's fee. A venue with a lower nominal `bestPrice` but a higher `feeBpsAtTop` can lose to a nominally worse venue with a thinner fee. `feeBpsAtTop` is price-aware, so different levels of the same book can surface different basis-point values.
</Info>

<Info>
  `venues[]` lists only venues the router can actionably route to right now. Venues without a streaming book (infrastructure dropouts) are excluded from the response. The number of entries is therefore the count of routable venues for this outcome, not the size of the cross-venue equivalence set.
</Info>


## OpenAPI

````yaml GET /api/accounts/{accountId}/router/quote
openapi: 3.1.0
info:
  title: Predexon Order Router API
  description: >-
    Unified cross-venue smart order routing across Polymarket, Predict.fun,
    Opinion, and Limitless
  version: 1.0.0
servers:
  - url: https://trade.predexon.com
security:
  - apiKeyAuth: []
paths:
  /api/accounts/{accountId}/router/quote:
    get:
      tags:
        - router
      summary: Quote
      description: >-
        Simulate filling a single logical order across every routed venue that
        offers the outcome identified by `predexonId`. Returns the merged
        fee-inclusive best execution path, per-venue projections, and aggregate
        summary. No order is placed.


        Use this to preview size, price, and per-venue allocation before calling
        Place Order — the request/response semantics mirror the routing logic
        used by `POST /api/accounts/{accountId}/router/orders`.
      operationId: getRouterQuote
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
          description: Account ID. Must belong to the calling API key.
        - name: predexonId
          in: query
          required: true
          schema:
            type: string
          description: >-
            Canonical `predexon_id` for the outcome. The router expands this to
            every routed venue listing for that canonical outcome.
        - name: side
          in: query
          required: true
          schema:
            type: string
            enum:
              - buy
              - sell
          description: Order side.
        - name: amount
          in: query
          required: false
          schema:
            type: number
            format: double
            exclusiveMinimum: 0
          description: >-
            USD/stablecoin notional to spend. **Required when `side=buy`. Must
            not be set when `side=sell`.**
        - name: size
          in: query
          required: false
          schema:
            type: number
            format: double
            exclusiveMinimum: 0
          description: >-
            Number of shares to sell. **Required when `side=sell`. Must not be
            set when `side=buy`.**
      responses:
        '200':
          description: Quote simulated successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
              example:
                predexonId: px-uvtpjis2k7bj
                title: Atlanta Hawks
                outcome: atl
                side: buy
                requestedAmount: '10'
                requestedSize: null
                venues:
                  - venue: polymarket
                    hasPosition: false
                    positionSize: null
                    bestPrice: '0.33'
                    estimatedFillPrice: '0.331200'
                    estimatedFillSize: '18.115000'
                    availableLiquidity: '482.500000'
                    feeBpsAtTop: 35
                  - venue: predict
                    hasPosition: false
                    positionSize: null
                    bestPrice: '0.34'
                    estimatedFillPrice: '0.342000'
                    estimatedFillSize: '11.820000'
                    availableLiquidity: '64.000000'
                    feeBpsAtTop: 30
                  - venue: opinion
                    hasPosition: false
                    positionSize: null
                    bestPrice: '0.35'
                    estimatedFillPrice: null
                    estimatedFillSize: null
                    availableLiquidity: '6.000000'
                    feeBpsAtTop: 20
                summary:
                  estimatedAvgPrice: '0.335070'
                  estimatedTotalSize: '29.935000'
                  fillLikelihood: high
                  venueBreakdown:
                    - venue: polymarket
                      size: '18.115000'
                      price: '0.331200'
                    - venue: predict
                      size: '11.820000'
                      price: '0.342000'
        '400':
          description: Missing or invalid parameter.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                missingPredexonId:
                  value:
                    error: predexonId is required
                    errorCode: parse_error
                invalidSide:
                  value:
                    error: side must be buy or sell
                    errorCode: parse_error
                missingAmount:
                  value:
                    error: amount (>0) required for buy quote
                    errorCode: parse_error
                missingSize:
                  value:
                    error: size (>0) required for sell quote
                    errorCode: parse_error
                sizeOnBuy:
                  value:
                    error: size must not be set for buy quote
                    errorCode: parse_error
        '404':
          description: No routed venue carries the supplied `predexonId`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: predexonId not found or not routable
                errorCode: predexon_not_routable
        '503':
          description: >-
            Routing registry is temporarily unavailable. Retry with exponential
            back-off.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: Registry unavailable (no snapshot loaded)
                errorCode: registry_unavailable
components:
  schemas:
    QuoteResponse:
      type: object
      required:
        - predexonId
        - title
        - outcome
        - side
        - requestedAmount
        - requestedSize
        - venues
        - summary
      properties:
        predexonId:
          type: string
          description: Echoes the request `predexonId`.
        title:
          type: string
          description: Human-readable outcome label (e.g. `"Atlanta Hawks"`).
        outcome:
          type: string
          description: Canonical outcome code (e.g. `"atl"`, `"draw"`).
        side:
          type: string
          enum:
            - buy
            - sell
        requestedAmount:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Echo of the `amount` query parameter (stringified number). Present
            on buy quotes; `null` on sell quotes.
        requestedSize:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Echo of the `size` query parameter (stringified number). Present on
            sell quotes; `null` on buy quotes.
        venues:
          type: array
          description: >-
            One entry per actionable venue — venues the router cannot currently
            route to (no book, or a disconnected feed) are excluded from the
            array entirely.
          items:
            $ref: '#/components/schemas/QuoteVenueEntry'
        summary:
          description: >-
            Aggregate projected fill. `null` when no venue could host any
            portion of the order.
          oneOf:
            - $ref: '#/components/schemas/QuoteSummary'
            - type: 'null'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
        errorCode:
          type: string
          description: >-
            Machine-readable error code for switch-case handling. Present on
            every error response and on a 502 Place Order response. Absent on
            successful responses.
          enum:
            - parse_error
            - registry_unavailable
            - predexon_not_routable
            - insufficient_balance
            - no_allocations
            - all_venues_failed
    QuoteVenueEntry:
      type: object
      description: >-
        Actionable venue — venues the router cannot currently route to (no book,
        or a disconnected feed) are excluded from the array entirely.
      required:
        - venue
        - hasPosition
        - positionSize
        - bestPrice
        - estimatedFillPrice
        - estimatedFillSize
        - availableLiquidity
        - feeBpsAtTop
      properties:
        venue:
          $ref: '#/components/schemas/Venue'
        hasPosition:
          type: boolean
          description: >-
            Sell quotes only — true when the account already holds a position on
            this venue that can be sold.
        positionSize:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Size of the existing position on this venue. `null` when
            `hasPosition` is false (or on buy quotes).
        bestPrice:
          type: string
          description: Top-of-book price on the relevant side.
        estimatedFillPrice:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Projected volume-weighted average fill price on this venue. `null`
            when no fill is projected here.
        estimatedFillSize:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            Projected shares filled on this venue. `null` when no fill is
            projected.
        availableLiquidity:
          type: string
          description: Sum of depth on the relevant side, expressed in shares.
        feeBpsAtTop:
          type: number
          description: >-
            Effective venue fee at the top of book, in basis points. May be
            fractional (e.g. `24.6975`). Price-aware — the same venue can return
            different fees at different price levels.
    QuoteSummary:
      type: object
      required:
        - estimatedAvgPrice
        - estimatedTotalSize
        - fillLikelihood
        - venueBreakdown
      properties:
        estimatedAvgPrice:
          type: string
          description: Projected volume-weighted fill price across all venues.
        estimatedTotalSize:
          type: string
          description: Projected total shares filled across all venues.
        fillLikelihood:
          type: string
          enum:
            - high
            - medium
            - low
          description: >-
            Coarse ratio of available liquidity to requested size. `high` >2×,
            `medium` 1–2×, `low` <1×.
        venueBreakdown:
          type: array
          description: One entry per venue expected to receive allocation.
          items:
            type: object
            required:
              - venue
              - size
              - price
            properties:
              venue:
                $ref: '#/components/schemas/Venue'
              size:
                type: string
              price:
                type: string
    Venue:
      type: string
      enum:
        - polymarket
        - predict
        - opinion
        - limitless
      description: A routed venue.
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Trading key provided by Predexon. The data key used by the Sports
        Discovery API on api.predexon.com is a separate credential.

````