> ## Documentation Index
> Fetch the complete documentation index at: https://docs.solanatracker.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Price & Charts

> Fetch live Solana token prices, historical OHLCV candles, price at timestamp, and multi-token price snapshots with the Solana Tracker Data API.

The Data API provides several ways to get token prices: a single live price, historical chart candles, and bulk multi-token lookups.

## Live Price

The [price endpoint](/data-api/get-token-price) returns the current price for any token.

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.solanatracker.io/price?token=So11111111111111111111111111111111111111112" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch(
    "https://data.solanatracker.io/price?token=So11111111111111111111111111111111111111112",
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  const { price } = await res.json();
  console.log(`SOL: $${price}`);
  ```
</CodeGroup>

***

## Multiple Token Prices

Need prices for a batch of tokens? Use the [multi-price endpoint](/data-api/get-multiple-token-prices) to fetch them all at once instead of making individual requests.

<CodeGroup>
  ```bash GET (comma-separated) theme={null}
  curl "https://data.solanatracker.io/price/multi?tokens=So111...112,38Pgz...pump" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```bash POST (JSON body) theme={null}
  curl -X POST "https://data.solanatracker.io/price/multi" \
    -H "x-api-key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "tokens": ["So111...112", "38Pgz...pump"] }'
  ```
</CodeGroup>

***

## OHLCV Chart Data

The [OHLCV endpoint](/data-api/get-ohlcv-data-for-a-token) returns candlestick data for charting. OHLCV means open, high, low, close, and volume.

<img src="https://mintcdn.com/solanatracker/ZM5vWoSAJUJFeh6A/images/guides/solana-chart.png?fit=max&auto=format&n=ZM5vWoSAJUJFeh6A&q=85&s=c292dc1b0f1e9e141d3e1e0b907c5f49" alt="Example Solana token chart with price candles, volume bars, and holder data" width="3064" height="1440" data-path="images/guides/solana-chart.png" />

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://data.solanatracker.io/chart/{token}?type=1h&time_from=1710000000&time_to=1710086400" \
    -H "x-api-key: YOUR_API_KEY"
  ```

  ```javascript JavaScript theme={null}
  const token = "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump";

  const res = await fetch(
    `https://data.solanatracker.io/chart/${token}?type=1h&time_from=1710000000&time_to=1710086400`,
    { headers: { "x-api-key": "YOUR_API_KEY" } }
  );
  const candles = await res.json();

  candles.forEach(c => {
    console.log(`${new Date(c.time * 1000).toISOString()}: O=${c.open} H=${c.high} L=${c.low} C=${c.close} V=${c.volume}`);
  });
  ```
</CodeGroup>

### Candle Intervals

| `type` value | Interval   |
| ------------ | ---------- |
| `1s`         | 1 second   |
| `5s`         | 5 seconds  |
| `15s`        | 15 seconds |
| `1m`         | 1 minute   |
| `3m`         | 3 minutes  |
| `5m`         | 5 minutes  |
| `15m`        | 15 minutes |
| `30m`        | 30 minutes |
| `1h`         | 1 hour     |
| `2h`         | 2 hours    |
| `4h`         | 4 hours    |
| `6h`         | 6 hours    |
| `8h`         | 8 hours    |
| `12h`        | 12 hours   |
| `1d`         | 1 day      |
| `3d`         | 3 days     |
| `1w`         | 1 week     |
| `1mn`        | 1 month    |

### Pool-Specific Charts

For tokens with multiple pools, use the [pool-specific OHLCV endpoint](/data-api/get-ohlcv-data-for-a-token-pool-pair) to get candles from a specific pool:

```bash theme={null}
curl "https://data.solanatracker.io/chart/{token}/{pool}?type=1h" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## Historical Prices

### Price at a Specific Time

The [timestamp price endpoint](/data-api/get-price-at-specific-timestamp) returns what a token was worth at an exact point in time.

```bash theme={null}
curl "https://data.solanatracker.io/price/history/timestamp?token={token}&timestamp=1710000000" \
  -H "x-api-key: YOUR_API_KEY"
```

### Price History (Time Series)

The [price history endpoint](/data-api/get-historic-price-information) returns historical price data points.

```bash theme={null}
curl "https://data.solanatracker.io/price/history?token={token}" \
  -H "x-api-key: YOUR_API_KEY"
```

### Price Range (High/Low)

The [price range endpoint](/data-api/get-lowest-and-highest-price-in-time-range) returns the minimum and maximum price within a time window.

```bash theme={null}
curl "https://data.solanatracker.io/price/history/range?token={token}&time_from=1710000000&time_to=1710086400" \
  -H "x-api-key: YOUR_API_KEY"
```

***

## Example: Build a Price Dashboard

```javascript theme={null}
const token = "38PgzpJYu2HkiYvV8qePFakB8tuobPdGm2FFEn7Dpump";
const headers = { "x-api-key": "YOUR_API_KEY" };

// Current price
const { price } = await fetch(
  `https://data.solanatracker.io/price?token=${token}`, { headers }
).then(r => r.json());

// Last 24h candles (1 hour intervals)
const now = Math.floor(Date.now() / 1000);
const candles = await fetch(
  `https://data.solanatracker.io/chart/${token}?type=1h&time_from=${now - 86400}&time_to=${now}`, { headers }
).then(r => r.json());

// ATH
const ath = await fetch(
  `https://data.solanatracker.io/tokens/${token}/ath`, { headers }
).then(r => r.json());

console.log(`Current: $${price}`);
console.log(`24h candles: ${candles.length}`);
console.log(`ATH: $${ath.highest}`);
```

### Open-Source Chart Examples

<CardGroup cols={2}>
  <Card title="Liveline Chart" href="https://github.com/solanatracker/solana-liveline-chart-example">
    Minimal real-time line chart using the Datastream WebSocket.
  </Card>

  <Card title="TradingView Advanced Chart" href="https://github.com/solanatracker/solana-tradingview-advanced-chart-example">
    Full TradingView integration with real-time candle updates.
  </Card>
</CardGroup>

<CardGroup cols={2}>
  <Card title="Live Prices (WebSocket)" href="/guides/datastream-prices">
    Stream real-time prices and build live updating charts.
  </Card>

  <Card title="Token Research" href="/guides/token-research">
    Full token lookup: stats, holders, trades, and events.
  </Card>
</CardGroup>
