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

# Fetch Oracle History

> Returns historical Chainlink oracle rounds for a price feed.



## OpenAPI

````yaml /api-reference/openapi.json get /api/feeds/{feed}/fetchOracleHistory
openapi: 3.0.0
info:
  title: PMXT Hosted API
  description: >-
    One API for supported prediction markets. Hosted catalog search in under
    10ms, a unified schema for supported venues, and venue-native trading where
    venues expose writes.
  version: 2.54.0
servers:
  - url: https://api.pmxt.dev
    description: Hosted PMXT (production)
security: []
tags:
  - name: Hosted
    description: >-
      Requires a PMXT API key. These endpoints use the cross-venue catalog and
      have no local equivalent.
  - name: Local Only
    description: >-
      Executed locally by the SDK against the venue. Never proxied through PMXT
      servers.
  - name: Data Feeds
    description: >-
      Auxiliary price and oracle data feeds (Binance, Chainlink).
      CCXT-compatible method names and response shapes.
paths:
  /api/feeds/{feed}/fetchOracleHistory:
    get:
      tags:
        - Data Feeds
      summary: Fetch Oracle History
      description: Returns historical Chainlink oracle rounds for a price feed.
      operationId: feedFetchOracleHistory
      parameters:
        - in: path
          name: feed
          schema:
            type: string
            enum:
              - binance
              - chainlink
          required: true
          description: The data feed provider.
        - in: query
          name: feed
          required: true
          schema:
            type: string
          description: Price feed pair (e.g. BTC/USD)
        - in: query
          name: limit
          required: false
          schema:
            type: integer
          description: Max rounds to return (default 500)
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/FeedOracleRound'
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: |-
            from pmxt.feed_client import FeedClient

            feed = FeedClient("chainlink", pmxt_api_key="YOUR_PMXT_API_KEY")
            rounds = feed.fetch_oracle_history("BTC/USD", limit=10)
            for r in rounds:
                print(f"{r.round_id}: ${r.answer}")
        - lang: javascript
          label: TypeScript
          source: >-
            import { FeedClient } from "pmxtjs";


            const feed = new FeedClient("chainlink", { pmxtApiKey:
            "YOUR_PMXT_API_KEY" });

            const rounds = await feed.fetchOracleHistory("BTC/USD", 10);

            for (const r of rounds) {
              console.log(`${r.roundId}: $${r.answer}`);
            }
components:
  schemas:
    FeedOracleRound:
      type: object
      description: Chainlink oracle price round.
      properties:
        feed:
          type: string
          description: Price feed pair (e.g. BTC/USD)
        roundId:
          type: string
        answer:
          type: number
          description: Oracle price
        startedAt:
          type: integer
        updatedAt:
          type: integer
        answeredInRound:
          type: string
        decimals:
          type: integer
        description:
          type: string
      required:
        - feed
        - roundId
        - answer
        - startedAt
        - updatedAt
        - answeredInRound
        - decimals
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Required when calling the hosted API directly (curl, requests, fetch).
        SDK users pass credentials via constructor params instead.

````