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

# Bundled market snapshot

> Returns market plus optional sections. Default include is lean: price,midpoint. Pass include=all or an explicit list for the full bundle. Sets X-Cache header. Path {ticker} accepts Kalshi ticker or Polymarket condition_id (CLOB token ids for some book endpoints).



## OpenAPI

````yaml /prediction-markets/openapi.json get /v1/markets/{ticker}/snapshot
openapi: 3.1.0
info:
  title: Prediction Market API (Beta)
  description: >-
    Unified **beta** prediction market API for Kalshi and Polymarket — markets,
    events, full historical trades and candlesticks, orderbooks, crypto up/down
    windows, and Polymarket wallet analytics. Read/market-data only.


    **Auth:** pass your Data API key in the `x-api-key` header.


    **Conventions:** response bodies use camelCase. Query params are snake_case
    (camelCase aliases accepted where noted).


    **Caching:** SWR endpoints may set `X-Cache` (`HIT` | `HIT-STALE` | `MISS`).
    Busy backends may return `503` with `SERVICE_BUSY`.


    **Realtime:** join `pm:*` rooms on
    `wss://datastream.solanatracker.io/{apiKey}` (same Datastream hub as other
    products — see Datastream → Prediction Markets).
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://prediction-market-api.solanatracker.io
    description: Public beta
security:
  - apiKey: []
tags:
  - name: Exchange
    description: Exchange status
  - name: Events
    description: >-
      Cross-exchange event groupings (Kalshi event_ticker, Polymarket Gamma
      grouped/negRisk events). Includes metadata: image, icon, description,
      tags, and nested markets with groupItemTitle.
  - name: Crypto
    description: >-
      Polymarket crypto up/down (Chainlink) Price to Beat, final price, chart
      history, and series windows.
  - name: Meta
    description: Categories, series, sports, live data
  - name: Markets
    description: Market data, orderbooks, candles
  - name: Trades
    description: Trade feeds
  - name: Accounts
    description: Polymarket wallet analytics (FIFO PnL)
  - name: Leaderboard
    description: Top wallet PnL rankings (Polymarket; Kalshi has no public wallets)
  - name: Stats
    description: Platform statistics
paths:
  /v1/markets/{ticker}/snapshot:
    get:
      tags:
        - Markets
      summary: Bundled market snapshot
      description: >-
        Returns market plus optional sections. Default include is lean:
        price,midpoint. Pass include=all or an explicit list for the full
        bundle. Sets X-Cache header. Path {ticker} accepts Kalshi ticker or
        Polymarket condition_id (CLOB token ids for some book endpoints).
      operationId: get_market_snapshot_path
      parameters:
        - name: ticker
          in: path
          description: Kalshi ticker or Polymarket condition_id
          required: true
          schema:
            type: string
        - name: exchange
          in: query
          description: Force exchange; auto-detect if omitted
          required: false
          schema:
            type: string
        - name: include
          in: query
          description: >-
            Comma-separated sections:
            price,midpoint,spread,oi,orderbook,trades,related — or all (default
            price,midpoint)
          required: false
          schema:
            type: string
        - name: trades_limit
          in: query
          description: Max recent trades when include has trades (default 50, max 200)
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: orderbook_depth
          in: query
          description: Orderbook levels per side (default 10, max 50)
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: related_limit
          in: query
          description: Max related markets (default 10, max 50)
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
      responses:
        '200':
          description: Market snapshot
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketSnapshotResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '408':
          description: Request timeout
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorBody'
components:
  schemas:
    MarketSnapshotResponse:
      type: object
      description: Bundled market detail for the market detail page.
      required:
        - market
      properties:
        market:
          $ref: '#/components/schemas/UnifiedMarket'
        midpoint:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/MidpointResponse'
        openInterest:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OpenInterestResponse'
        orderbook:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/OrderbookSnapshot'
        price:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PriceSnapshot'
        recentTrades:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/PaginatedTrades'
        related:
          type:
            - array
            - 'null'
          items:
            $ref: '#/components/schemas/UnifiedMarket'
        spread:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SpreadResponse'
    ApiErrorBody:
      type: object
      description: Standard API error response envelope.
      required:
        - error
        - code
      properties:
        code:
          type: integer
          format: int32
          description: HTTP status code (duplicated for convenience).
          minimum: 0
        error:
          type: string
        errorCode:
          type:
            - string
            - 'null'
          description: >-
            Stable machine-readable code: RATE_LIMITED, SERVICE_BUSY,
            BAD_REQUEST, NOT_FOUND, INTERNAL.
    UnifiedMarket:
      type: object
      description: >-
        A single market in normalized form.


        Polymarket markets in grouped events include `eventId`, `eventSlug`,
        `groupItemTitle`,

        `description`, `image`, and `icon`. Kalshi markets include `eventTicker`
        and optional `kalshi` metadata.
      required:
        - id
        - exchange
        - marketKind
        - title
        - slug
        - status
        - outcomes
        - volume
        - pricingMode
        - isTradable
        - hasDepth
      properties:
        category:
          type:
            - string
            - 'null'
          description: Category/tag for this market.
        clobTokenIds:
          type: array
          items:
            type: string
          description: |-
            Polymarket CLOB outcome token IDs, ordered to match `outcomes`.
            Use these IDs for `pm:market:polymarket:{tokenId}:*` realtime rooms.
        closeDate:
          type:
            - string
            - 'null'
          description: ISO-8601 market close / expiry time.
        collectionId:
          type:
            - string
            - 'null'
          description: Official multivariate/collection id when present.
        comboEligible:
          type: boolean
          description: Whether this market can be selected as one leg in a combo builder.
        comboGroup:
          type:
            - string
            - 'null'
          description: UI grouping key for combo builders.
        createdAt:
          type:
            - string
            - 'null'
          description: ISO-8601 creation time.
        description:
          type:
            - string
            - 'null'
          description: Long-form market description (Polymarket Gamma).
        eventId:
          type:
            - string
            - 'null'
          description: Polymarket Gamma event id (numeric string, e.g. "30615").
        eventSlug:
          type:
            - string
            - 'null'
          description: Polymarket event slug (e.g. "world-cup-winner").
        eventTicker:
          type:
            - string
            - 'null'
          description: Kalshi event_ticker for grouping related markets.
        eventTitle:
          type:
            - string
            - 'null'
          description: >-
            Canonical parent event title (distinct from the child market/group
            title).
        exchange:
          $ref: '#/components/schemas/Exchange'
          description: Source exchange.
        gammaMarketId:
          type:
            - string
            - 'null'
          description: Polymarket Gamma numeric market id (distinct from condition_id).
        groupItemTitle:
          type:
            - string
            - 'null'
          description: Label within a grouped Polymarket event (e.g. "France").
        hasDepth:
          type: boolean
          description: Whether the indexed orderbook currently has executable depth.
        icon:
          type:
            - string
            - 'null'
          description: Market icon URL (Polymarket Gamma).
        id:
          type: string
          description: >-
            Unique identifier within its exchange (ticker for Kalshi,
            condition_id for Polymarket).
        image:
          type:
            - string
            - 'null'
          description: Market image URL (Polymarket Gamma).
        isTradable:
          type: boolean
          description: Whether the market can currently accept orders or RFQs.
        legCount:
          type: integer
          description: Number of component markets in a combo.
          minimum: 0
        legs:
          type: array
          items:
            $ref: '#/components/schemas/MarketLeg'
          description: Structured combo legs. Empty for ordinary markets.
        line:
          type:
            - number
            - 'null'
          format: double
          description: Numeric spread/total threshold where applicable.
        liquidity:
          type:
            - number
            - 'null'
          format: double
          description: Available liquidity (Polymarket only).
        marketKind:
          $ref: '#/components/schemas/MarketKind'
          description: Product shape. Kalshi multivariate/parlay products are `combo`.
        materializationState:
          type:
            - string
            - 'null'
          description: Materialization state for prebuilt/multivariate contracts.
        openInterest:
          type:
            - integer
            - 'null'
          format: int64
          description: Open interest in contracts (Kalshi only).
          minimum: 0
        outcomeIndex:
          type:
            - integer
            - 'null'
          format: int32
          description: >-
            Selected outcome index when this market was resolved by
            outcome-token asset ID.
          minimum: 0
        outcomeLabel:
          type:
            - string
            - 'null'
          description: >-
            Selected outcome label when this market was resolved by
            outcome-token asset ID.
        outcomes:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedOutcome'
          description: Possible outcomes with current prices (0.0–1.0 probability).
        parentEventUrl:
          type:
            - string
            - 'null'
          description: Parent multivariate event URL for combo products.
        pricingMode:
          $ref: '#/components/schemas/PricingMode'
          description: Price discovery mechanism.
        rawTitle:
          type:
            - string
            - 'null'
          description: >-
            Original exchange title when the API supplies a normalized display
            title.
        seriesTicker:
          type:
            - string
            - 'null'
          description: Machine series ticker supplied by Kalshi.
        seriesTitle:
          type:
            - string
            - 'null'
          description: Canonical series title when supplied by the exchange.
        settlementRule:
          type:
            - string
            - 'null'
          description: Settlement semantics for combo products.
        slug:
          type: string
          description: 'URL-safe slug (Kalshi: lowercase ticker, Polymarket: slug field).'
        sportsMarketType:
          type:
            - string
            - 'null'
          description: >-
            Exchange-native sports market type (moneyline, totals, spread,
            etc.).
        status:
          type: string
          description: 'Market status: "active", "closed", "settled".'
        tags:
          type: array
          items:
            type: string
          description: Normalized discovery tags.
        ticker:
          type:
            - string
            - 'null'
          description: Raw Kalshi ticker. `id` remains the cross-exchange identifier.
        title:
          type: string
          description: Human-readable title/question.
        tradeCount24h:
          type:
            - integer
            - 'null'
          format: int64
          description: Rolling 24-hour trade count from the indexed tape (when available).
          minimum: 0
        url:
          type:
            - string
            - 'null'
          description: Direct link to the market on its native platform.
        volume:
          type: number
          format: double
          description: Total all-time volume (USD).
        volume24h:
          type:
            - number
            - 'null'
          format: double
          description: Rolling 24-hour volume (USD, if available).
    MidpointResponse:
      allOf:
        - $ref: '#/components/schemas/DataProvenance'
        - type: object
          required:
            - marketId
            - exchange
            - timestamp
          properties:
            exchange:
              $ref: '#/components/schemas/Exchange'
            marketId:
              type: string
            midpoint:
              type:
                - number
                - 'null'
              format: double
            timestamp:
              type: string
      description: Midpoint price for a market.
    OpenInterestResponse:
      allOf:
        - $ref: '#/components/schemas/DataProvenance'
        - type: object
          required:
            - marketId
            - exchange
            - uniqueHolders
            - totalVolumeTokens
            - totalTrades
          properties:
            exchange:
              $ref: '#/components/schemas/Exchange'
            marketId:
              type: string
            openInterest:
              type:
                - integer
                - 'null'
              format: int64
              description: Authoritative open interest when the exchange publishes it.
              minimum: 0
            totalTrades:
              type: integer
              format: int64
              description: Total number of trades (activity proxy, not OI).
              minimum: 0
            totalVolumeTokens:
              type: number
              format: double
              description: Total token volume traded (activity proxy, not OI).
            uniqueHolders:
              type: integer
              format: int64
              description: >-
                Unique addresses that have traded this market (activity proxy,
                not OI).
              minimum: 0
      description: Aggregated open interest for a market.
    OrderbookSnapshot:
      allOf:
        - $ref: '#/components/schemas/DataProvenance'
          description: Serving provenance.
        - type: object
          required:
            - marketId
            - exchange
            - bids
            - asks
            - timestamp
          properties:
            asks:
              type: array
              items:
                $ref: '#/components/schemas/PriceLevel'
              description: Best ask levels.
            bids:
              type: array
              items:
                $ref: '#/components/schemas/PriceLevel'
              description: Best bid levels.
            exchange:
              $ref: '#/components/schemas/Exchange'
              description: Source exchange.
            marketId:
              type: string
              description: Market identifier.
            midpoint:
              type:
                - number
                - 'null'
              format: double
              description: 'Mid-price: (best_bid + best_ask) / 2.'
            spread:
              type:
                - number
                - 'null'
              format: double
              description: 'Spread: best ask - best bid.'
            timestamp:
              type: string
              description: ISO-8601 timestamp of the snapshot.
      description: Orderbook snapshot for a market.
    PriceSnapshot:
      allOf:
        - $ref: '#/components/schemas/DataProvenance'
        - type: object
          required:
            - marketId
            - exchange
            - timestamp
          properties:
            ask:
              type:
                - number
                - 'null'
              format: double
              description: Best ask price.
            bid:
              type:
                - number
                - 'null'
              format: double
              description: Best bid price.
            change24h:
              type:
                - number
                - 'null'
              format: double
              description: 24h price change as decimal (-0.05 = -5%).
            exchange:
              $ref: '#/components/schemas/Exchange'
            lastTradePrice:
              type:
                - number
                - 'null'
              format: double
              description: Last traded price.
            marketId:
              type: string
            price:
              type:
                - number
                - 'null'
              format: double
              description: |-
                Display price (0.0–1.0). For Polymarket this is the UI chance:
                mid when spread ≤ 10¢, else last trade.
            timestamp:
              type: string
              description: ISO-8601 timestamp.
            volume24h:
              type:
                - number
                - 'null'
              format: double
              description: 24h volume.
      description: Current price snapshot for a market.
    PaginatedTrades:
      type: object
      required:
        - data
        - count
        - hasMore
      properties:
        count:
          type: integer
          minimum: 0
        cursor:
          type:
            - string
            - 'null'
        data:
          type: array
          items:
            $ref: '#/components/schemas/UnifiedTrade'
        hasMore:
          type: boolean
    SpreadResponse:
      allOf:
        - $ref: '#/components/schemas/DataProvenance'
        - type: object
          required:
            - marketId
            - exchange
            - timestamp
          properties:
            ask:
              type:
                - number
                - 'null'
              format: double
            bid:
              type:
                - number
                - 'null'
              format: double
            exchange:
              $ref: '#/components/schemas/Exchange'
            marketId:
              type: string
            spread:
              type:
                - number
                - 'null'
              format: double
            timestamp:
              type: string
      description: Spread for a market.
    Exchange:
      type: string
      enum:
        - polymarket
        - kalshi
    MarketLeg:
      type: object
      required:
        - label
        - side
      properties:
        eventDate:
          type:
            - string
            - 'null'
        exclusionGroup:
          type:
            - string
            - 'null'
          description: Exclusion/conflict group for mutually exclusive legs.
        label:
          type: string
        lifecycleStatus:
          type:
            - string
            - 'null'
          description: 'Per-leg lifecycle: open, suspended, settled, void.'
        officialLegId:
          type:
            - string
            - 'null'
          description: Official exchange leg/position identifier when available.
        positionId:
          type:
            - string
            - 'null'
          description: Exchange-native position/outcome id for this leg.
        side:
          $ref: '#/components/schemas/MarketLegSide'
        sport:
          type:
            - string
            - 'null'
        underlyingMarketId:
          type:
            - string
            - 'null'
        underlyingTitle:
          type:
            - string
            - 'null'
    MarketKind:
      type: string
      enum:
        - binary
        - categorical
        - combo
    UnifiedOutcome:
      type: object
      description: A single binary or multi-category outcome with a price.
      required:
        - label
        - price
      properties:
        label:
          type: string
          description: >-
            Outcome label (Yes/No, or custom e.g. country name in grouped
            markets).
        price:
          type: number
          format: double
          description: Current probability (0.0–1.0).
    PricingMode:
      type: string
      enum:
        - orderbook
        - rfq
    DataProvenance:
      type: object
      description: Provenance for market-data responses.
      required:
        - source
        - stale
        - estimated
      properties:
        estimated:
          type: boolean
          description: True when the value is derived/estimated rather than authoritative.
        indexedAt:
          type:
            - string
            - 'null'
          description: Local index timestamp when known.
        source:
          type: string
          description: 'Serving source: `indexed`, `upstream`, `unavailable`.'
        sourceUpdatedAt:
          type:
            - string
            - 'null'
          description: Upstream/source event timestamp when known.
        stale:
          type: boolean
          description: True when the payload is older than the freshness SLO.
        unavailableReason:
          type:
            - string
            - 'null'
          description: Why the payload is missing or incomplete.
    PriceLevel:
      type: object
      description: A single price level in an orderbook.
      required:
        - price
        - size
      properties:
        price:
          type: number
          format: double
          description: Price (0.0–1.0 probability).
        size:
          type: number
          format: double
          description: Quantity available at this price.
    UnifiedTrade:
      type: object
      description: A single trade in normalized form.
      required:
        - id
        - exchange
        - marketId
        - price
        - quantity
        - side
        - timestampMs
      properties:
        countFp:
          type:
            - string
            - 'null'
          description: Official Kalshi count_fp string (lossless contract quantity).
        eventId:
          type:
            - string
            - 'null'
          description: Parent event id (Polymarket Gamma id / Kalshi event_ticker).
        eventSlug:
          type:
            - string
            - 'null'
          description: Parent event slug when available.
        eventTitle:
          type:
            - string
            - 'null'
          description: Canonical parent event title.
        exchange:
          $ref: '#/components/schemas/Exchange'
        groupItemTitle:
          type:
            - string
            - 'null'
          description: Label within a grouped event (for example, "Spain").
        id:
          type: string
          description: 'Trade ID (Kalshi: trade_id, Polymarket: tx_hash:log_index).'
        image:
          type:
            - string
            - 'null'
          description: Market or event image URL for feed cards.
        isCombo:
          type:
            - boolean
            - 'null'
          description: True for Polymarket combinatorial (combo) outcomes.
        marketId:
          type: string
          description: Market identifier (Kalshi ticker or Polymarket asset_id).
        noPrice:
          type:
            - number
            - 'null'
          format: double
          description: Kalshi no-leg reference price (same as `price` when side is no).
        noPriceDollars:
          type:
            - string
            - 'null'
          description: Official Kalshi no_price_dollars string (lossless).
        outcomeIndex:
          type:
            - integer
            - 'null'
          format: int32
          description: Direct outcome index for this traded outcome token.
          minimum: 0
        outcomeLabel:
          type:
            - string
            - 'null'
          description: Direct outcome label for this traded outcome token.
        price:
          type: number
          format: double
          description: Execution price for the taker outcome (0.0–1.0).
        quantity:
          type: number
          format: double
          description: Number of contracts / quantity.
        quantityE2:
          type:
            - integer
            - 'null'
          format: int64
          description: Quantity in hundredths of a contract (Kalshi v2).
        side:
          type: string
          description: >-
            Taker outcome: "yes" or "no" (Kalshi and Polymarket per-market),
            "buy"/"sell" (Polymarket global without enrichment).
        timestampMs:
          type: integer
          format: int64
          description: Unix timestamp in milliseconds.
        traderAddress:
          type:
            - string
            - 'null'
          description: >-
            Wallet that initiated the trade (Polymarket taker; Kalshi is
            anonymous).
        traderUsername:
          type:
            - string
            - 'null'
          description: >-
            Public Polymarket username for `traderAddress`; null for
            anonymous/private profiles.
        txHash:
          type:
            - string
            - 'null'
          description: Transaction hash (Polymarket only).
        yesPrice:
          type:
            - number
            - 'null'
          format: double
          description: Kalshi yes-leg reference price (same as `price` when side is yes).
        yesPriceDollars:
          type:
            - string
            - 'null'
          description: Official Kalshi yes_price_dollars string (lossless).
        yesPriceE6:
          type:
            - integer
            - 'null'
          format: int64
          description: Price in millionths of a dollar (Kalshi v2).
    MarketLegSide:
      type: string
      enum:
        - 'yes'
        - 'no'
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Solana Tracker Data API key

````