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

# Get Prediction Market Price

> Get current prices for all outcomes of a prediction market, including bid/ask spread.

<Warning>**Alpha** — This endpoint is part of the Prediction Markets API, currently in early access. May change without notice.</Warning>

At least one of `marketId` or `outcomeId` must be provided.

### Query Parameters

<ParamField query="platform" type="string" required>
  The prediction market platform (e.g., `polymarket`).
</ParamField>

<ParamField query="marketId" type="string">
  The platform-specific market identifier. For Polymarket this is the `conditionId`
  (hex hash, e.g. `0x1ddc0e7d...`), not the numeric Gamma ID. Optional when
  `outcomeId` is provided.
</ParamField>

<ParamField query="outcomeId" type="string">
  Outcome token ID. When provided alone (without `marketId`), returns the price
  for this outcome directly. When provided with `marketId`, filters the market's
  outcomes to this one.
</ParamField>

### Response

<ResponseField name="data" type="object">
  Price data for the market.

  <Expandable title="Price Data">
    <ResponseField name="marketId" type="string">Market identifier.</ResponseField>
    <ResponseField name="platform" type="string">Platform name.</ResponseField>
    <ResponseField name="timestamp" type="number">Timestamp of the price snapshot.</ResponseField>

    <ResponseField name="outcomes" type="array">
      Array of outcome price objects.

      <Expandable title="PriceData">
        <ResponseField name="outcomeId" type="string">Outcome token ID.</ResponseField>
        <ResponseField name="priceUSD" type="number">Mid price (0 to 1).</ResponseField>
        <ResponseField name="bestBidUSD" type="number">Best bid price.</ResponseField>
        <ResponseField name="bestAskUSD" type="number">Best ask price.</ResponseField>
        <ResponseField name="spreadUSD" type="number">Bid-ask spread.</ResponseField>
        <ResponseField name="timestamp" type="number">Price timestamp.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="reference" type="object | null">
      Live reference-feed snapshot — only populated for UpDown markets backed by an external price oracle. `null` for binary outcome markets.

      <Expandable title="MarketReference">
        <ResponseField name="type" type="string">Reference source: `chainlink_streams`, `binance_spot`, or `pyth`.</ResponseField>
        <ResponseField name="symbol" type="string">Reference symbol (e.g., `btc/usd`, `btcusdt`).</ResponseField>
        <ResponseField name="marketType" type="string">UpDown bucket: `updown_5m`, `updown_15m`, `updown_1h`, `updown_4h`, `updown_1d`, `updown_weekly`.</ResponseField>

        <ResponseField name="priceToBeat" type="object | null">
          Reference price captured at the window OPEN.

          <Expandable title="PricePoint">
            <ResponseField name="price" type="number">Reference price in USD.</ResponseField>
            <ResponseField name="timestamp" type="string">Capture time (ISO 8601).</ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="finalPrice" type="object | null">Reference price captured at the window CLOSE. Same shape as `priceToBeat`.</ResponseField>
        <ResponseField name="current" type="object | null">Latest reference price seen by our ingest. Same shape as `priceToBeat`.</ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="hostname" type="string">
  Server hostname that handled the request.
</ResponseField>

<ResponseField name="took" type="number">
  Request processing time in milliseconds.
</ResponseField>

### Usage Example

```bash theme={null}
curl -X GET "https://api.mobula.io/api/2/pm/market/price?platform=polymarket&marketId=0x1234..."
```

### Example Response

```json theme={null}
{
  "data": {
    "marketId": "0x1234...",
    "platform": "polymarket",
    "timestamp": 1709913600000,
    "outcomes": [
      { "outcomeId": "71321...", "priceUSD": 0.35, "bestBidUSD": 0.34, "bestAskUSD": 0.36, "spreadUSD": 0.02, "timestamp": 1709913600000 },
      { "outcomeId": "71322...", "priceUSD": 0.65, "bestBidUSD": 0.64, "bestAskUSD": 0.66, "spreadUSD": 0.02, "timestamp": 1709913600000 }
    ]
  },
  "hostname": "api-node-1",
  "took": 12
}
```


## OpenAPI

````yaml GET /2/pm/market/price
openapi: 3.0.0
info:
  version: 1.0.0
  title: Mobula Prediction Markets API
  description: >-
    Documentation of the Mobula Prediction Markets API.


    The PM API is currently served from a dedicated host:
    `pm-api-prod-eu.mobula.io`.

    All endpoints below require an API key (same key as the main Mobula API).


    Parameter names below are the **canonical names enforced by the API

    controllers** (Zod-validated). Following the wrong name (e.g. `?market=...`

    instead of `?platform=...&marketId=...`) returns `HTTP 400`.
servers:
  - url: https://pm-api-prod-eu.mobula.io/api/
    description: PM Production API (requires API key)
security: []
tags:
  - name: V2 - PM Market
    description: Prediction market data — details, prices, order book, trades, OHLCV
  - name: V2 - PM Discovery
    description: Search, trending, categories, live markets
  - name: V2 - PM Wallet
    description: Wallet prediction-market positions, balances, PnL, activity, status
paths:
  /2/pm/market/price:
    get:
      tags:
        - V2 - PM Market
      summary: Get Prediction Market Price
      description: >
        Get current prices for all outcomes of a prediction market (or a single
        outcome).


        Required: `platform` + **one of** (`marketId`, `outcomeId`). When only
        `outcomeId`

        is provided the API resolves the parent market internally; when only
        `marketId`

        is provided every outcome of that market is returned.
      parameters:
        - $ref: '#/components/parameters/Platform'
        - name: marketId
          in: query
          required: false
          description: CTF conditionId (required if `outcomeId` is not provided).
          schema:
            type: string
            pattern: ^0x[0-9a-fA-F]{64}$
            example: '0xd86a816093fcd0a0e1ca440bc5ce199bd3c5a8d6139e044b076958164f8c5423'
        - name: outcomeId
          in: query
          required: false
          description: Outcome token id (required if `marketId` is not provided).
          schema:
            type: string
            pattern: ^[0-9]+$
      responses:
        '200':
          description: Outcome prices
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
components:
  parameters:
    Platform:
      name: platform
      in: query
      required: true
      description: >-
        Prediction market platform. Today only `polymarket` is supported; any
        other value returns 400.
      schema:
        type: string
        enum:
          - polymarket
        example: polymarket

````