> For the complete documentation index, see [llms.txt](https://txnlab.gitbook.io/haystack-dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://txnlab.gitbook.io/haystack-dev/haystack-api/charts-and-pools.md).

# Charts & Pools

Price candles for an asset, and the liquidity pools that hold it.

All paths are under `https://api.hay.app/api`. The full schemas are in the [OpenAPI specification](https://api.hay.app/info/openapi3.yaml).

## Candles

`GET /getChart?asset=<id>&start=<time>&end=<time>&granularity=<g>`

| Parameter      | Type     | Description                                                          |
| -------------- | -------- | -------------------------------------------------------------------- |
| `asset`        | integer  | Required.                                                            |
| `start`, `end` | RFC 3339 | Required.                                                            |
| `granularity`  | string   | `1m` (default), `5m`, `15m`, `30m`, `1h`, `4h`, `12h`, `1d` or `7d`. |

A range may hold at most 1,500 candles of the granularity, and may always be 31 days: 31 days of `15m` candles or smaller, 62 days of `1h`, 250 days of `4h`, about 4 years of `1d`. A longer range gets `400`. An unknown asset gets `404`.

```bash
curl -H "X-API-Key: $HAY_KEY" "https://api.hay.app/api/getChart?asset=31566704&start=2026-11-01T00:00:00Z&end=2026-11-15T00:00:00Z&granularity=1h"
```

The response is `[{ timestamp, open, high, low, close, algoUsd, usdVol, vol }]`:

* `open`, `high`, `low` and `close` are prices in **ALGO**. Multiply by the candle's `algoUsd`, ALGO's USD price, for USD.
* `usdVol` is the USD volume and `vol` the volume in the token.
* A HayLaunch token still on its bonding curve also has `bondingOpen` and `bondingClose`: its first and last price in the candle in the asset it bonds in, converted to ALGO.

For live updates between fetches, use the [WebSocket](/haystack-dev/haystack-api/websocket.md).

## Pools

`GET /pools?asset=<id>`

The pools holding the asset with more than 1 ALGO of liquidity, deepest first: `[Pool]`. Each pool has:

* `id`, `address`, `protocol` (`TinymanV2`, `Pact`, `PactV2`, ...), `smartContractId` (its app ID), `poolType`, `feeBasisPoints`.
* `asset1Id`, `asset2Id` and their decimals and unit names.
* `holdingsAsset1`, `holdingsAsset2` and `holdingsPool` (LP tokens issued), in base units.
* `liquidityAlgo`: the pool's liquidity in microALGO.

## Rate limits

| Endpoint   | Requests per minute |
| ---------- | ------------------- |
| `getChart` | 150                 |
| `pools`    | 30                  |
