# chart

Each token page (`/t/0x…`) has a price/market-cap chart with ten timeframes.

## What's being plotted

You toggle between two series:

* **Price** — USDC per token (1e-6 scale, \~$0.00001 at the floor).
* **Market cap** — `price × 1,000,000,000` (the full supply). MC is the more comparable number across tokens.

## OHLC and volume

Each candle is open / high / low / close + volume per interval. Both pre-grad (bonding curve) and post-grad (Uni V2) data feed the same chart — no gap at graduation.

## Timeframes

`1m · 5m · 15m · 30m · 1H · 1D · 4D · 1W · 30D · 1M`

Backed by an aggregated query against the indexed `Trade` table. Candles are computed on-the-fly from raw trades, so historical resolution stays exact.

## Live updates

The token page subscribes to the curve's `Bought` / `Sold` events via WebSocket (and post-grad, to the Uni V2 pair's `Swap` event). New trades land on the chart within \~1 block — sub-second on Base.

## Why MC pre-grad can look different from "spot price × supply"

The bonding curve has a virtual-liquidity AMM. The displayed market cap is computed from `marketCapUSDC()` on the curve, which uses the constant-product formula with the virtual reserves baked in. It always lands somewhere between $3.8k (just-launched) and \~$13k (right at graduation). Multiplying the displayed spot price by the full 1B supply would over-estimate by \~5–10% because of the curvature.

## Post-grad MC

We pull the **live** Uni V2 market cap from DexScreener (cached 30s) rather than the cached on-chain figure. The home list's "Trending" sort uses this live value, so a graduated token with $87k FDV on Uni V2 outranks a $13k stale-DB value on a different token.

## Stat panels around the chart

| Stat              | Source                                                          |
| ----------------- | --------------------------------------------------------------- |
| **Liquidity**     | Pre-grad: curve `getReserveUSDC()`. Post-grad: Uni V2 reserves. |
| **MC**            | `marketCapUSDC()` view pre-grad; DexScreener FDV post-grad.     |
| **Vol 24h**       | Sum of `usdcAmount` on `Trade` rows in the last 24h.            |
| **Holders count** | Distinct addresses with non-zero balance in the `Holder` table. |
| **Trades**        | Indexed `Trade` row count.                                      |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://basefun.gitbook.io/basefun-docs/chart.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
