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

> 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/pools/sparklines` · **1 per market credit**

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

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

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 Solana, each point converted at the SOL/USD rate of its own time. Native prices are the default on every chain, and `quote` applies to the whole request.

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

<ResponseExample>
  ```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"
    }
  }
  ```
</ResponseExample>


## OpenAPI

````yaml openapi.json POST /v1/pools/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/pools/sparklines:
    post:
      summary: Pool Sparklines
      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"` converts each point at the SOL/USD rate of its own time (Solana).
        `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. For token-level sparklines (the best pool resolved
        for you, curve history stitched in), use `POST /v1/token/sparklines`.
      operationId: pool-sparklines
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              required:
                - markets
              properties:
                markets:
                  minItems: 1
                  maxItems: 100
                  type: array
                  items:
                    additionalProperties: false
                    type: object
                    required:
                      - chain
                      - address
                    properties:
                      chain:
                        type: string
                      address:
                        type: string
                  description: >-
                    1 to 100 of `{chain, address}` pools, across chains. Billed
                    per market.
                  example:
                    - chain: evm:8453
                      address: 0x0ca6…
                  x-default:
                    - chain: evm:8453
                      address: 0x0ca6…
                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` converts each point at
                    the SOL/USD rate of its own time; available on Solana.
                  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.