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

# Get Market Price

> Retrieve the current best price for a specific token and side (BUY or SELL).



## OpenAPI

````yaml /prediction-market-data-reference/openapi.json get /api/workflows/polymarket/getMarketPrice
openapi: 3.1.0
info:
  title: Prediction Market Data API
  description: >-
    Comprehensive API endpoints for querying data from prediction markets
    supported via workflows.
  version: 1.0.0
  contact:
    name: Swaps.xyz
    url: https://swaps.xyz
servers:
  - url: https://api-v2.swaps.xyz
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/workflows/polymarket/getMarketPrice:
    get:
      summary: Get Market Price
      description: >-
        Retrieve the current best price for a specific token and side (BUY or
        SELL).
      operationId: getMarketPrice
      parameters:
        - name: clobTokenId
          in: query
          required: true
          description: CLOB token ID
          schema:
            type: string
          example: >-
            80746058984644290629624903019922696017323803605256698757445938534814122585786
        - name: side
          in: query
          required: true
          description: Order side (BUY or SELL)
          schema:
            type: string
            enum:
              - BUY
              - SELL
          example: BUY
      responses:
        '200':
          description: Current market price
          content:
            application/json:
              schema:
                type: object
                required:
                  - price
                properties:
                  price:
                    type: string
                    description: Current best price for the specified side
                    example: '0.52'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  responses:
    BadRequest:
      description: Bad request due to missing or invalid parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message
        code:
          type: integer
          description: Error code
        details:
          type: object
          description: Additional error details
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact Swaps.xyz to obtain an API key.

````