> ## 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 OHLCV

> Returns OHLCV candle data for a symbol.



## OpenAPI

````yaml /api-reference/openapi.json get /api/feeds/{feed}/fetchOHLCV
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}/fetchOHLCV:
    get:
      tags:
        - Data Feeds
      summary: Fetch OHLCV
      description: Returns OHLCV candle data for a symbol.
      operationId: feedFetchOHLCV
      parameters:
        - in: path
          name: feed
          schema:
            type: string
            enum:
              - binance
              - chainlink
          required: true
          description: The data feed provider.
        - in: query
          name: symbol
          required: true
          schema:
            type: string
          description: Trading pair
        - in: query
          name: timeframe
          required: false
          schema:
            type: string
            default: 1h
          description: Candle interval (e.g. 1m, 5m, 1h, 1d)
        - in: query
          name: since
          required: false
          schema:
            type: integer
          description: Start timestamp in ms
        - in: query
          name: limit
          required: false
          schema:
            type: integer
          description: Max candles to return
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    items:
                      type: array
                      items:
                        type: number
                      minItems: 6
                      maxItems: 6
                    description: >-
                      Array of [timestamp, open, high, low, close, volume]
                      tuples
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: python
          label: Python
          source: >-
            from pmxt.feed_client import FeedClient


            feed = FeedClient("binance", pmxt_api_key="YOUR_PMXT_API_KEY")

            candles = feed.fetch_ohlcv("BTC/USDT", timeframe="1m",
            since=1700000000000, limit=3)

            for timestamp, open_, high, low, close, volume in candles:
                print(timestamp, close)
        - lang: javascript
          label: TypeScript
          source: >-
            import { FeedClient } from "pmxtjs";


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

            const candles = await feed.fetchOHLCV("BTC/USDT", "1m",
            1700000000000, 3);

            for (const [timestamp, _open, _high, _low, close, _volume] of
            candles) {
              console.log(timestamp, close);
            }
components:
  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.

````