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

# Token Candles

> Chart-ready candles from 1s to 1M. By default the candles of the pool we price the token from (its reference market), with a bonding-curve history stitched in front so the series is continuous across the migration; or aggregate an explicit set of up to 50 pools. Wick-outlier clamping and candle connecting included. On Base, the forming candle folds preconfirmed (flashblocks) swaps ~2.5s before block commit.

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

<Tip>**Live**: the [`ohlcv`](/streams/live-candles-ohlcv) stream channel pushes the forming candle of the same series, then each closed candle (restricted access: enabled per API key on request).</Tip>

Chart-ready candles from 1s to 1M. **By default, one market**: the pool we price the token from (rank 1 of `/v1/token/pools`), resolved at request time, and, for a token that graduated from a bonding curve, its curve history stitched in front of the current pool so the series is continuous across the migration. `meta.pools` lists the pool(s) the page was built from. Pass `pools=` to aggregate an explicit set instead (≤50). Wick-outlier clamping and candle connecting are applied server-side. On Base, the forming candle folds preconfirmed (flashblocks) swaps \~2.5s before block commit.

<Note>An unknown token returns `404`. Prices are native-quoted by default (`meta.quote: "native"`); on Solana pass `quote=usd` for USD candles, otherwise multiply by the native USD price.</Note>

<Note>Native coins (`0x0000…0000` and `0xeeee…eeee` on every chain, Solana included, the wrapped native such as WETH or WBNB, and the SOL mint) are charted in USD: the candles of the coin's main USD market, named in `meta.pools`, with `meta.quote: "usd"`, `volume` in USD and `volumeToken` in units of the coin. Omit `quote` or pass `quote=usd`; `quote=native` returns `400` (a coin priced in itself is always 1). `pools` accepts the coin's USD markets, the first rows of [`/v1/token/pools`](/endpoints/token-pools). The native coin of a chain whose native is itself a USD stablecoin (Tempo, Arc, Stable) returns `404`; its wrapped token keeps its own candles.</Note>

<Note>Two volumes per candle. `volume` is the traded value on the quote side, in the chain's native asset (ETH, SOL, BNB...) or in USD with `quote=usd`. `volumeToken` is the traded amount in units of the token itself (the base-asset volume of a Binance kline); it is never converted, whatever `quote` is. Both count exactly the same trades, and `trades` is how many: the number of swaps executed against the market in the bucket (0 on a filled candle). It counts swaps, not transactions: a transaction that swaps twice on the market counts twice, exactly as its volume does; unique transactions are the `txns` of the stats endpoints.</Note>

<Note>Intervals run from `1s` to `1M`. `1w` candles are epoch-aligned weeks, Thursday 00:00 UTC to Thursday (the standard weekly bucket); `1M` candles are calendar months in UTC (1st of the month 00:00 UTC, 28 to 31 days). `7d` and `30d` are accepted as aliases of `1w` and `1M`, and so are `1min`, `5min`, `15min`, `30min` and `60` (Mobula-style); `meta.interval` always echoes the canonical key.</Note>

<Note>`quote=usd` serves the candle as it traded in dollars: every swap is valued at the SOL/USD rate of its own minute, so open, high, low, close and `volume` are the USD figures of the trades themselves, whatever the interval (a daily or weekly candle is not converted at one rate).</Note>

<Note>The time axis is dense by default: every bucket up to `endTime` is present, and a bucket without a trade is a flat zero-volume candle at the previous close. Pass `fill=false` for a sparse axis with traded buckets only. `limit` is honoured whenever the token's history allows it, however quiet the token is.</Note>

<Note>Every candle opens at the close of the previous traded candle, the first candle of a page included (its open is the close of the last traded candle before the page): paging backwards yields one continuous series, and a given bucket has the same `open` whatever page it lands on. Only the very first candle of the token's history, or the first candle at or after a `from` you set, opens at its own first trade. The chaining is 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 - most visible on tokens that are flat in USD terms.</Note>

<Note>`meta.nextEndTime` appears when a page ends early on a very deep scan - pass it as the next `endTime` to keep paging; it always points at real history, never at an empty stretch. Otherwise page with `oldestTime - 1` while `meta.hasMore` is true. `meta.oldestTime` and `meta.newestTime` are `null` on an empty page. `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. Historical pages are immutable and cached, so pagination is fast and deterministic.</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl 'https://api.serialized.xyz/v1/token/ohlcv?chain=evm:8453&address=0x4ed4e862860bed51a9570b96d89af5e1b0efefed&interval=1h&limit=24' \
    -H 'Authorization: YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": [
      {
        "time": 1786694400,
        "open": 5.4670969692593e-7,
        "high": 5.4748839531073e-7,
        "low": 5.4670969692593e-7,
        "close": 5.4748839531073e-7,
        "volume": 0.22006777918571868,
        "volumeToken": 402251.74,
        "trades": 39
      },
      {
        "time": 1786701600,
        "open": 5.4748839531073e-7,
        "high": 5.4748839531073e-7,
        "low": 5.4747109625568e-7,
        "close": 5.4747109625568e-7,
        "volume": 0.004838309934296527,
        "volumeToken": 8837.29,
        "trades": 27
      },
      {
        "time": 1786716000,
        "open": 5.4747109625568e-7,
        "high": 5.4747124708872e-7,
        "low": 5.4747109625568e-7,
        "close": 5.4747124708872e-7,
        "volume": 0.000042612402192036,
        "volumeToken": 77.84,
        "trades": 13
      }
    ],
    "meta": {
      "asOf": 1786724320540,
      "interval": "1h",
      "count": 24,
      "oldestTime": 1786586400,
      "newestTime": 1786716000,
      "hasMore": true,
      "quote": "native",
      "pools": ["0x0ca6485b7e9cf814a3fd09d81672b07323535b64"]
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.json GET /v1/token/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/token/ohlcv:
    get:
      summary: Token Candles
      description: >-
        Chart-ready candles from 1s to 1M. One market by default (the pool we
        price the token from, tracked across a bonding-curve migration, curve
        history stitched in front), or an explicit set of up to 50 pools
        aggregated. Wick-outlier clamping and candle connecting included. On
        Base, the forming candle includes preconfirmed (flashblocks) swaps ~2.5s
        before block commit.
      operationId: candles-ohlcv
      parameters:
        - schema:
            type: string
            x-default: evm:8453
          in: query
          name: chain
          required: true
          description: Public chain id - `evm:<id>` or `solana` (`solana:solana` accepted).
          example: evm:8453
        - schema:
            type: string
            x-default: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed'
          in: query
          name: address
          required: true
          description: Token address (EVM hex, case-insensitive).
          example: '0x4ed4e862860bed51a9570b96d89af5e1b0efefed'
        - schema:
            type: string
            x-default: '0x0ca6485b7e9cf814a3fd09d81672b07323535b64'
          in: query
          name: pools
          required: false
          description: >-
            Optional CSV of pool addresses (≤50) to aggregate; default: the pool
            we price the token from, tracked across a bonding-curve migration.
          example: '0x0ca6485b7e9cf814a3fd09d81672b07323535b64'
        - schema:
            default: 5m
            type: string
            x-default: 1h
          in: query
          name: interval
          required: false
          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, the standard weekly bucket); `1M` buckets are calendar
            months (1st of the month 00:00 UTC). `7d` and `30d` are accepted as
            aliases of `1w` and `1M`; `meta.interval` always echoes the
            canonical key.
          example: 1h
        - schema:
            minimum: 1
            maximum: 2000
            default: 200
            type: integer
            x-default: 24
          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: 24
        - schema:
            minimum: 0
            type: integer
          in: query
          name: endTime
          required: false
          description: >-
            Unix seconds, inclusive upper bound (at most 1 day ahead; a
            millisecond value is accepted and normalized). Paginate back with
            the previous `meta.oldestTime - 1` while `meta.hasMore` is true.
        - schema:
            minimum: 0
            type: integer
          in: query
          name: from
          required: false
          description: >-
            Unix seconds, inclusive lower bound (scans stop there); a
            millisecond value is accepted and normalized.
        - schema:
            anyOf:
              - type: string
                enum:
                  - native
              - type: string
                enum:
                  - usd
            x-default: usd
          in: query
          name: quote
          required: false
          description: >-
            `native` (default) or `usd` (Solana) - usd serves the candle as it
            traded in dollars: every swap is valued at the SOL/USD rate of its
            own minute, so open, high, low, close and `volume` are the USD
            figures of the trades themselves, whatever the interval.
            `volumeToken` (units of the token) is never converted.
          example: usd
        - 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.