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

# Open Interest Time Series

> Get historical open interest data for a market

Fetch historical open interest for a market. Open interest represents total outstanding positions (can increase or decrease, unlike cumulative volume).

<Tip>**Free & Unlimited.** This endpoint does not count toward your monthly usage limits on any plan.</Tip>


## OpenAPI

````yaml GET /v2/polymarket/markets/{condition_id}/open_interest
openapi: 3.1.0
info:
  title: Predexon API
  description: Prediction market data aggregation and matching API
  version: 2.0.0
servers:
  - url: https://api.predexon.com
security:
  - apiKey: []
paths:
  /v2/polymarket/markets/{condition_id}/open_interest:
    get:
      tags:
        - polymarket
      summary: Get Market Open Interest Time Series
      description: >-
        Provide historical open interest (total value of tokens circulating from
        split, merge, redeem, and conversion events) with min granularity day.
      operationId: >-
        get_market_open_interest_time_series_v2_polymarket_markets__condition_id__open_interest_get
      parameters:
        - name: condition_id
          in: path
          required: true
          schema:
            type: string
            description: Condition ID for the market
            title: Condition Id
          description: Condition ID for the market
        - name: granularity
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/PnLGranularity'
            description: Time granularity
            default: day
          description: Time granularity
        - name: start_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: Unix timestamp (seconds) for start
            title: Start Time
          description: Unix timestamp (seconds) for start
        - name: end_time
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: Unix timestamp (seconds) for end
            title: End Time
          description: Unix timestamp (seconds) for end
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MarketOpenInterestTimeSeriesResponse'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
components:
  schemas:
    PnLGranularity:
      type: string
      enum:
        - day
        - week
        - month
        - year
        - all
      title: PnLGranularity
      description: PnL granularity enum.
    MarketOpenInterestTimeSeriesResponse:
      properties:
        condition_id:
          type: string
          title: Condition Id
        market_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Market Id
          description: Market ID
        granularity:
          $ref: '#/components/schemas/PnLGranularity'
        start_time:
          type: integer
          title: Start Time
        end_time:
          type: integer
          title: End Time
        open_interest_over_time:
          items:
            $ref: '#/components/schemas/OpenInterestDataPoint'
          type: array
          title: Open Interest Over Time
      type: object
      required:
        - condition_id
        - granularity
        - start_time
        - end_time
        - open_interest_over_time
      title: MarketOpenInterestTimeSeriesResponse
      description: Market open interest time series endpoint response.
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    OpenInterestDataPoint:
      properties:
        timestamp:
          type: integer
          title: Timestamp
          description: Unix timestamp in seconds
        open_interest_usd:
          anyOf:
            - type: number
            - type: 'null'
          title: Open Interest Usd
          description: >-
            Total value of tokens circulating from split, merge, redeem, and
            conversion events (USD)
      type: object
      required:
        - timestamp
      title: OpenInterestDataPoint
      description: Individual open interest data point.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````