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

# Solana Token Price API and OHLCV Charts

> Query Solana token prices, historical OHLCV candles, timestamp prices, and batch price snapshots with the Solana Tracker Data API.

Use a price snapshot for the current value and OHLCV candles for chart history. For a live chart, load the history first, then update it with a Datastream price subscription.

## Live price

The [price endpoint](https://docs.solanatracker.io/data-api/price/get-token-price.md) returns the current price for any token.

```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}`);
```

## Multiple token prices

Use the [multi-price endpoint](https://docs.solanatracker.io/data-api/price/get-multiple-token-prices.md) to fetch several price snapshots in one request.

```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"] }'
```

## OHLCV chart data

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

![Example Solana token chart with price candles, volume bars, and holder data](https://mintcdn.com/solanatracker/ZM5vWoSAJUJFeh6A/images/guides/solana-chart.png?fit=max\&auto=format\&n=ZM5vWoSAJUJFeh6A\&q=85\&s=c292dc1b0f1e9e141d3e1e0b907c5f49)

```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}`);
});
```

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

### Outlier removal

OHLCV responses remove extreme outliers by default. Set `removeOutliers=false` when you need the unfiltered series:

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

Keep the same outlier setting across requests so adjacent chart windows use the same filtering rules.

### Pool-specific charts

For tokens with multiple pools, use the [pool-specific OHLCV endpoint](https://docs.solanatracker.io/data-api/chart/get-ohlcv-data-for-a-tokenpool-pair.md) 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

Use the [timestamp price endpoint](https://docs.solanatracker.io/data-api/price/get-price-at-specific-timestamp.md) to request a historical price near a given 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](https://docs.solanatracker.io/data-api/price/get-historic-price-information.md) 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](https://docs.solanatracker.io/data-api/price/get-lowest-and-highest-price-in-time-range.md) 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

> [card] [Liveline Chart](https://github.com/solanatracker/solana-liveline-chart-example)
>
> Minimal real-time line chart using the Datastream WebSocket.

> [card] [TradingView Advanced Chart](https://github.com/solanatracker/solana-tradingview-advanced-chart-example)
>
> Full TradingView integration with real-time candle updates.

> [card] [Live prices](https://docs.solanatracker.io/guides/datastream-prices.md)
>
> Stream real-time prices and build live updating charts.

> [card] [Token overview](https://docs.solanatracker.io/guides/token-research.md)
>
> Full token lookup: stats, holders, trades, and events.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.