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

# Indicative executable price for a size

> Walks the visible book for one outcome: a BUY takes the asks from the lowest price up, a SELL takes the bids from the highest price down, until `size` is filled or the next level is beyond `limitPrice`. Only the first 100 levels of the side are walked: a size beyond that depth reports the quantity within them with `capped: true`, while a size beyond a shallower book reports the whole book with `capped: false`. Indicative only: the book can change before an order is placed, and `tradable` is false on a market that is not `OPEN` or while trading on its contract generation is halted. The walk is exact over the levels as `/orderbook` serves them (quantities on 8 decimal places), not over the matcher's raw depth. A market the matcher does not run answers an empty book (`bookEmpty: true`); a matcher that cannot be read answers `503 orderbook_unavailable`. Refusals: `400 invalid_side`, `400 invalid_size`, `400 invalid_limit_price`, `400 invalid_outcome`, `400 outcome_required`, `404 market_not_found`. `Cache-Control: no-store`.



## OpenAPI

````yaml /api-reference/openapi.json get /api/markets/{symbol}/executable-price
openapi: 3.1.0
info:
  title: PredictStreet API
  description: >-
    Client-facing HTTP API for the PredictStreet prediction-market platform.
    **Partner kinds.** Every authenticated endpoint except the partner-level
    platform reads (`/api/platform/status`, `/notices`, `/maintenance`) resolves
    a request's *effective wallet* from the partner row. `single_wallet`
    partners bind to one `associatedWallet` set at creation. `multi_wallet`
    partners declare the actor on every request via an `X-User-Wallet:
    0x<40-hex>` header. See the [Partner kinds](/auth/api-keys#partner-kinds)
    doc for the full contract.
  version: '2026-06-16'
  contact:
    name: PredictStreet partners
    email: partners@predictstreet.com
servers:
  - url: https://core.api.dev.predictstreet.sde.adifoundation.ai
    description: Testnet (partner integrator API — final domain TBD)
security: []
tags:
  - name: Deposits
    description: >-
      Gasless USDC deposit relay - submit a signed EIP-2612 permit and the
      platform broadcasts the on-chain deposit for you (no gas).
  - name: Events
    description: >-
      Polymarket-style event grouping with football metadata (group, stage,
      teams, tags).
  - name: Tags
    description: Curated tag taxonomy used to filter events.
  - name: Markets
    description: 'Public market data: list, detail, orderbook, trades, OHLC.'
  - name: Crypto
    description: >-
      Crypto price markets: the underlying-asset price curve and Up/Down series
      navigation. The markets themselves are ordinary binary markets — list them
      through /api/markets and /api/events.
  - name: Orders
    description: >-
      Signed-order place / cancel / read. Requires `X-Api-Key` with
      `orders:read` / `orders:write` scope; every write additionally requires an
      EIP-712 signature over the order.
  - name: Portfolio
    description: >-
      Balances, positions, trades, fees, vault info for the key's
      `associatedWallet`. Requires `X-Api-Key` with `portfolio:read` scope.
  - name: Matches
    description: >-
      A match groups several events into one fixture/card (1X2 + first-scorer +
      over-under under one matchup).
  - name: Vault
    description: >-
      Backend co-signatures for ERC-1155 split / merge, and recovery for
      off-chain locks when the corresponding chain tx never confirmed. Requires
      `X-Api-Key` with `vault:write` scope plus an EIP-712 signature over the
      operation.
  - name: Leaderboard
    description: Public ranked leaderboard across PnL / volume buckets.
  - name: Search
    description: Global search across users, events, and matches.
  - name: Withdrawal Security
    description: >-
      Self-service withdrawal 2FA (TOTP) and withdrawal-address whitelist. Same
      endpoints serve the web app (user sessions) and API-key integrators.
      Mutations need `vault:write`, reads `portfolio:read`. Both are opt-in per
      wallet and only gate withdrawals once the platform enables
      withdrawal-security enforcement.
  - name: Platform
    description: >-
      Platform reference data and state. The contract registry and the fee
      configuration are public and need no key. The freeze flag (`/status`),
      active notices (`/notices`) and maintenance windows (`/maintenance`) need
      a partner API key in `X-Api-Key`.
paths:
  /api/markets/{symbol}/executable-price:
    get:
      tags:
        - Markets
      summary: Indicative executable price for a size
      description: >-
        Walks the visible book for one outcome: a BUY takes the asks from the
        lowest price up, a SELL takes the bids from the highest price down,
        until `size` is filled or the next level is beyond `limitPrice`. Only
        the first 100 levels of the side are walked: a size beyond that depth
        reports the quantity within them with `capped: true`, while a size
        beyond a shallower book reports the whole book with `capped: false`.
        Indicative only: the book can change before an order is placed, and
        `tradable` is false on a market that is not `OPEN` or while trading on
        its contract generation is halted. The walk is exact over the levels as
        `/orderbook` serves them (quantities on 8 decimal places), not over the
        matcher's raw depth. A market the matcher does not run answers an empty
        book (`bookEmpty: true`); a matcher that cannot be read answers `503
        orderbook_unavailable`. Refusals: `400 invalid_side`, `400
        invalid_size`, `400 invalid_limit_price`, `400 invalid_outcome`, `400
        outcome_required`, `404 market_not_found`. `Cache-Control: no-store`.
      operationId: MarketsController_executablePrice
      parameters:
        - $ref: '#/components/parameters/MarketSymbol'
        - name: side
          in: query
          required: true
          description: '`BUY` or `SELL`; anything else answers `400 invalid_side`.'
          schema:
            type: string
            enum:
              - BUY
              - SELL
        - name: size
          in: query
          required: true
          description: >-
            Positive decimal number of shares: at most 14 integer digits and 18
            decimal places; no sign, exponent, spaces or leading zeros. Anything
            else, or zero, answers `400 invalid_size`.
          schema:
            type: string
        - name: limitPrice
          in: query
          required: false
          description: >-
            Decimal price strictly between 0 and 1 (`0.` and 1 to 18 decimal
            places). Levels beyond it are not used. Anything else answers `400
            invalid_limit_price`.
          schema:
            type: string
        - name: outcome
          in: query
          required: false
          description: >-
            Outcome index, digits only, as on `/orderbook`: anything else, or an
            index the market does not have, answers `400 invalid_outcome`.
            Required on a market of more than two outcomes (`400
            outcome_required` when omitted); on a two-outcome (binary) market an
            omitted `outcome` means 0.
          schema:
            type: integer
            minimum: 0
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutablePriceDto'
        '400':
          description: >-
            `invalid_side`, `invalid_size`, `invalid_limit_price`,
            `invalid_outcome` or `outcome_required`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: >-
            `market_not_found`: unknown symbol or a market that is not publicly
            visible.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: >-
            Rate limited (`markets-ip`, 600/min per IP, shared with the other
            `/api/markets/*` reads).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '503':
          description: >-
            `orderbook_unavailable`: the matching engine's book could not be
            read; retry.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - {}
components:
  parameters:
    MarketSymbol:
      name: symbol
      in: path
      required: true
      description: >-
        Market symbol, e.g. `UAE-CUP-FINAL-20260425`. Used by sub-resource
        endpoints (`/orderbook`, `/trades`, `/ohlc`, `/traders`). The root
        market-detail endpoint `/api/markets/{slug}` accepts the slug instead —
        see `MarketSlug`.
      schema:
        type: string
  schemas:
    ExecutablePriceDto:
      type: object
      properties:
        executableQty:
          type: string
          description: >-
            Quantity the visible book can fill now, at most the requested size
            and within the limit price (decimal string, exact over the served
            levels; "0" when nothing).
        totalCost:
          type: string
          description: >-
            Total paid for a BUY, or received for a SELL, for `executableQty`:
            USDC, 6 decimal places, rounded against the caller (a BUY's cost up,
            a SELL's proceeds down); "0.000000" when nothing is executable.
        avgPrice:
          type: string
          nullable: true
          description: >-
            Volume-weighted average price per share: the exact cost over
            `executableQty`, 8 decimal places (the price grid), rounded to
            nearest with ties to even; null when nothing is executable.
        levelsConsumed:
          type: array
          items:
            $ref: '#/components/schemas/ExecutablePriceLevelDto'
          description: The book levels used, best first, with the quantity taken from each.
        bookEmpty:
          type: boolean
          description: >-
            True when the side of the book being walked has no levels at all. A
            cut read that served no level (every level it returned was too small
            to show) is not empty: `capped` then says whether deeper levels may
            lie within the limit.
        capped:
          type: boolean
          description: >-
            True when `size` outlasted every level walked and the read of that
            side was cut (at its 100-level cap, or otherwise truncated), so
            deeper levels may exist within the limit price and more may be
            executable than `executableQty`. False when the size was filled, the
            limit price stopped the walk, the limit price is at or before the
            last price the cut read returned, the side holds no more levels
            (book exhausted), or the side has no levels at all (`bookEmpty`: the
            two are never both true).
        tradable:
          type: boolean
          description: >-
            True when the market is `OPEN` and trading on its contract
            generation is not halted, so an order can take the price now. False
            on any other status (PRE_MARKET, PAUSED, SUSPENDED, CLOSED,
            PENDING_RESOLUTION …) or while the market's contract generation is
            halted: the walk still reports the resting levels, but no order can
            take them (PRE_MARKET accepts only resting LIMIT GTC orders). The
            status can lag a status change by a few seconds.
      required:
        - executableQty
        - totalCost
        - avgPrice
        - levelsConsumed
        - bookEmpty
        - capped
        - tradable
    ErrorEnvelope:
      type: object
      description: >-
        Error body returned by every API error (same shape as `Error`). Branch
        on `error.code`, not on `message`.
      required:
        - status
        - error
      properties:
        status:
          type: integer
          description: HTTP status, repeated in the body.
          example: 400
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable code.
              example: bad_request
            message:
              type: string
            trace_id:
              type: string
              description: Request trace id; quote it to support. May be absent.
            retryAfterSec:
              type: integer
              description: >-
                Seconds to wait before retrying, when the server says so (also
                sent as the `Retry-After` header).
            retryable:
              type: boolean
              description: >-
                Whether the same request may be sent again as it is. Absent when
                the server does not say.
            details:
              type: object
              additionalProperties: true
              description: Extra structured context thrown with the error.
    ExecutablePriceLevelDto:
      type: object
      properties:
        price:
          type: string
          description: >-
            Price level, spelled as `GET /api/markets/{symbol}/orderbook` serves
            it (8 decimal places, e.g. `0.60000000`).
        quantity:
          type: string
          description: >-
            Quantity taken from this level (decimal string, exact over the level
            as served).
      required:
        - price
        - quantity

````

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