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

# Pool Sparklines: batch

> Small price arrays for list rows - one call for up to 100 markets, cross-chain, keyed by pool, one evenly spaced line per market that covers the whole timeframe. Timeframes 1m|5m|30m|1h|24h|7d, native or USD, optional timestamps. Missing pools return [] - we never invent data.

`POST /v1/pool/sparklines` · **1 credit per 25 markets**

Small price arrays for list rows - one call for up to 100 markets in one request, each `{chain, address}` (or `{chain, poolAddress}`) so the batch can span chains. The response is keyed by pool address. One market: [`GET /v1/pool/sparklines`](https://docs.serialized.xyz/endpoints/pool-sparklines), the same line. For token-level sparklines (best pool resolved for you), use [`POST /v1/token/sparklines`](https://docs.serialized.xyz/endpoints/token-sparklines-batch).

| Timeframe | Points | Interval |
| - | - | - |
| `1m` | 30 | 2 s |
| `5m` | 30 | 10 s |
| `30m` | 30 | 1 min |
| `1h` | 30 | 2 min |
| `24h` | 24 | 1 h |
| `7d` | 28 | 6 h |

> [!NOTE]
>
> Formerly `POST /v1/pools/sparklines`. The former path still answers the same call, at the same price, and `markets[]`, the former name of `items[]`, is still accepted (send one of the two).

Every line is a fixed grid: evenly spaced points that cover the whole timeframe, oldest to newest, the last one being the live price. An interval without a trade carries the previous price, and before the first trade of the timeframe a line holds its first price: you always get the full grid, or `[]`.

Two options shape the points:

* `timestamps: true` returns each point as `{ at, value }`, `at` being the start of its interval in unix milliseconds. Dated points start at the first trade of the timeframe, so a market younger than the timeframe returns fewer points.
* `quote: "usd"` returns USD prices on every chain except Story (`evm:1514`: a request with a Story market returns `400`). Native prices are the default on every chain, and `quote` applies to the whole request.

```bash cURL theme={null}
curl -X POST 'https://api.serialized.xyz/v1/pool/sparklines' \
  -H 'Authorization: YOUR_API_KEY' -H 'Content-Type: application/json' \
  -d '{"items": [{"chain": "evm:8453", "address": "0x0ca6485b7e9cf814a3fd09d81672b07323535b64"}], "timeframe": "24h"}'
```

```json Response theme={null}
{
  "data": {
    "0x0ca6485b7e9cf814a3fd09d81672b07323535b64": [
      5.249040755790959e-7,
      5.299419269878368e-7,
      5.341024278723588e-7,
      5.353384270094856e-7,
      5.367245992625111e-7,
      5.382859734840854e-7,
      "…"
    ]
  },
  "meta": {
    "asOf": 1786725098728,
    "timeframe": "24h",
    "quote": "native"
  }
}
```

```json Response (timestamps, usd) theme={null}
{
  "data": {
    "3C5YE97HADPDxZehYq9Cis8AXr9aNyrUsczKzE1nDbW9": [
      { "at": 1790701200000, "value": 2.0211635444550846 },
      { "at": 1790704800000, "value": 2.0451174906709944 },
      { "at": 1790708400000, "value": 2.0222823998521657 },
      { "at": 1790712000000, "value": 2.042120738574924 },
      "…"
    ]
  },
  "meta": {
    "asOf": 1790787309837,
    "timeframe": "24h",
    "quote": "usd"
  }
}
```


## OpenAPI

````yaml openapi.json POST /v1/pool/sparklines
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/sparklines:
    post:
      summary: 'Pool Sparklines: batch'
      description: >-
        Small price arrays for list rows: one call for up to 100 markets, each
        `{chain, address}` so one lot can span chains. The response is keyed by
        pool address. Every timeframe is a fixed grid of evenly spaced points
        that covers the whole window, oldest to newest, the last point being the
        live price: `1m` = 30 points of 2 s, `5m` = 30 of 10 s, `30m` = 30 of 1
        min, `1h` = 30 of 2 min, `24h` = 24 of 1 h, `7d` = 28 of 6 h. An
        interval without a trade carries the previous price, and before the
        first trade of the window a line holds its first price: a series is
        always the full grid, or `[]`. Prices are native by default; `quote:
        "usd"` serves them in dollars (every chain except Story, `evm:1514`).
        `timestamps: true` returns `{ at, value }` points instead of bare
        numbers, from the first trade of the window on: a market younger than
        the timeframe returns fewer points. An unknown pool returns `[]` - we
        never invent data. One market: `GET /v1/pool/sparklines`. For
        token-level sparklines (the best pool resolved for you, curve history
        stitched in), use `POST /v1/token/sparklines`.
      operationId: pool-sparklines-batch
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                items:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    required:
                      - chain
                    properties:
                      chain:
                        type: string
                      address:
                        description: Pool / market address (or poolAddress)
                        type: string
                      poolAddress:
                        description: >-
                          Pool / market address: the explicit name of address,
                          either one
                        type: string
                  description: >-
                    1 to 100 of `{chain, address}` (or `{chain, poolAddress}`)
                    pools, across chains. Billed as one call per 25 markets: up
                    to 25 markets cost 1 credit, 26 to 50 cost 2 credits, and so
                    on. Each item takes `address` or its other name,
                    `poolAddress`.
                  example:
                    - chain: evm:8453
                      address: 0x0ca6…
                  x-default:
                    - chain: evm:8453
                      address: 0x0ca6…
                markets:
                  minItems: 1
                  maxItems: 100
                  description: >-
                    The former name of `items`, still accepted: send one of the
                    two.
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    required:
                      - chain
                    properties:
                      chain:
                        type: string
                      address:
                        description: Pool / market address (or poolAddress)
                        type: string
                      poolAddress:
                        description: >-
                          Pool / market address: the explicit name of address,
                          either one
                        type: string
                timeframe:
                  default: 24h
                  description: '`1m`|`5m`|`30m`|`1h`|`24h`|`7d`. Default `24h`.'
                  type: string
                  example: 24h
                  x-default: 24h
                quote:
                  default: native
                  description: >-
                    `native` (default) or `usd`: `usd` serves each point in
                    dollars, on every chain except Story (`evm:1514`).
                  anyOf:
                    - type: string
                      enum:
                        - native
                    - type: string
                      enum:
                        - usd
                  example: native
                  x-default: native
                timestamps:
                  default: false
                  description: >-
                    `true` returns each point as `{ at, value }`, `at` being the
                    start of the point's interval in unix milliseconds, from the
                    first trade of the window on. Default `false`: bare numbers,
                    always the full grid.
                  type: boolean
                  example: true
                  x-default: 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.