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

# Market Candles

> Historical OHLCV for one market, addressed by pool. Same engine, intervals (1s to 1M) and candle shape as `/v1/token/ohlcv` - here the pool IS the market (no curve stitching, no aggregation), for exact per-market charts.

`GET /v1/pool/ohlcv` · **5 credits**

Historical OHLCV for one market, addressed by pool. Same engine, intervals (1s to 1M) and candle shape as [`/v1/token/ohlcv`](/endpoints/candles-ohlcv) - the difference is scope: this endpoint charts exactly one pool, with no curve stitching or multi-pool aggregation. A page of `/v1/pool/ohlcv` is byte-identical to `/v1/token/ohlcv?pools=<this pool>`. Each candle carries `volume` (traded value on the quote side, native asset or USD with `quote=usd`), `volumeToken` (traded amount in units of the token, never converted) and `trades` (number of swaps executed against the market in the bucket; a transaction that swaps twice counts twice, like its volume).

<Note>An unknown pool returns `404` (never a silently-empty 200). The time axis is dense by default (flat zero-volume candles where the pool did not trade), so a dormant pool is carried forward at its last close; pass `fill=false` to get its last traded candles instead. `meta.nextEndTime`, when present, is the next `endTime` to page a very deep scan and always points at real history; otherwise page with `oldestTime - 1` (`meta.oldestTime` and `meta.newestTime` are `null` on an empty page). Every candle opens at the close of the previous traded candle, the first candle of a page included, so paging backwards yields one continuous series (exact in the native series; with `quote=usd` each candle is converted at its own window's SOL/USD rate, so consecutive USD opens step by the rate's move between windows). `endTime` and `from` are unix seconds; a value in milliseconds is accepted too and normalized (candle `time` is always seconds). Up to 2000 candles per page. `1w` candles are epoch-aligned weeks (Thursday to Thursday, UTC) and `1M` candles are calendar months (UTC); `7d` and `30d` are accepted aliases.</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://api.serialized.xyz/v1/pool/ohlcv?chain=evm:8453&address=0x0ca6485b7e9cf814a3fd09d81672b07323535b64&interval=5m&limit=300' \
    -H 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "time": 1786715700,
        "open": 5.4747109625568e-7,
        "high": 5.4747124708872e-7,
        "low": 5.4747109625568e-7,
        "close": 5.4747124708872e-7,
        "volume": 0.000042612402192036,
        "volumeToken": 77.84,
        "trades": 13
      },
      {
        "time": 1786716000,
        "open": 5.4747124708872e-7,
        "high": 5.4749102229931e-7,
        "low": 5.4747124708872e-7,
        "close": 5.4749102229931e-7,
        "volume": 0.013277451554902,
        "volumeToken": 24251.37,
        "trades": 30
      }
    ],
    "meta": {
      "asOf": 1786716301220,
      "interval": "5m",
      "count": 300,
      "oldestTime": 1786626000,
      "newestTime": 1786716000,
      "hasMore": true,
      "quote": "native",
      "pools": ["0x0ca6485b7e9cf814a3fd09d81672b07323535b64"]
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.json GET /v1/pool/ohlcv
openapi: 3.1.0
info:
  title: Serialized Data API
  description: >-
    On-chain data for trading apps - tokens, candles, token filters. Built on
    our own indexers. 18 EVM chains + Solana, live.
  version: 0.1.0
servers:
  - url: https://demo.serialized.xyz
    description: 'Demo: no key needed, read endpoints, rate-limited per IP'
  - url: https://api.serialized.xyz
    description: 'Production: your API key in the Authorization header'
security:
  - apiKey: []
  - {}
paths:
  /v1/pool/ohlcv:
    get:
      summary: Market Candles
      description: >-
        Historical OHLCV for one market, addressed by pool. Same engine and
        intervals as `/v1/token/ohlcv` (1s to 1M), deep backfill.
      operationId: market-candles
      parameters:
        - schema:
            type: string
            x-default: evm:8453
          in: query
          name: chain
          required: true
          description: Public chain id - `evm:<id>` or `solana`.
          example: evm:8453
        - schema:
            type: string
            x-default: '0x0ca6485b7e9cf814a3fd09d81672b07323535b64'
          in: query
          name: address
          required: true
          description: >-
            Pool / pair address (the stable market id on its chain - Uniswap V4
            poolIds supported).
          example: '0x0ca6485b7e9cf814a3fd09d81672b07323535b64'
        - schema:
            default: 5m
            type: string
            x-default: 5m
          in: query
          name: interval
          required: true
          description: >-
            1s|5s|15s|30s|1m|3m|5m|15m|30m|1h|2h|4h|6h|12h|1d|1w|1M (default
            5m). `1w` buckets are epoch-aligned weeks (Thursday 00:00 UTC to
            Thursday); `1M` buckets are calendar months (UTC). `7d` and `30d`
            are accepted aliases; `meta.interval` echoes the canonical key.
          example: 5m
        - schema:
            minimum: 1
            maximum: 2000
            default: 200
            type: integer
            x-default: 300
          in: query
          name: limit
          required: false
          description: >-
            Candles per page, 1-2000 (default 200). Honoured whenever the
            history allows it, however quiet the token is.
          example: 300
        - schema:
            minimum: 0
            type: integer
          in: query
          name: endTime
          required: false
          description: >-
            Unix seconds, inclusive upper bound (pagination: prev oldestTime -
            1); a millisecond value is accepted and normalized. At most 1 day
            ahead.
        - schema:
            minimum: 0
            type: integer
            x-default: 1755000000
          in: query
          name: from
          required: false
          description: >-
            Unix seconds, inclusive lower bound (scans stop there); a
            millisecond value is accepted and normalized.
          example: 1755000000
        - schema:
            default: native
            anyOf:
              - type: string
                enum:
                  - native
              - type: string
                enum:
                  - usd
            x-default: native
          in: query
          name: quote
          required: false
          description: >-
            usd serves the candle as it traded in dollars, every swap at the
            SOL/USD rate of its own minute (available on Solana); volume follows
            the quote, volumeToken never does
          example: native
        - schema:
            default: true
            type: boolean
            x-default: true
          in: query
          name: fill
          required: false
          description: >-
            Dense time axis (default true): a flat zero-volume candle for every
            bucket without a trade. `false` returns traded buckets only.
          example: true
      responses:
        '200':
          description: Standard `{ data, meta }` envelope.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: Your raw API key (not needed on the demo server).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.