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

# Get a Solana API Key and Make Your First Request

> Sign up for a free Solana Tracker API key and make your first Data API request in a few minutes. The example returns the current SOL price.

## 1. Get an API key

[Sign up for free](https://www.solanatracker.io/account), then open [Data API](https://www.solanatracker.io/account/data-api) in your dashboard and copy your key.

> [!WARNING]
>
> Keep your API key secret. Never commit it to a public repository.

## 2. Make a request

This request gets the current price of SOL. Replace `YOUR_API_KEY` with your key.

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

```javascript JavaScript theme={null}
const mint = "So11111111111111111111111111111111111111112";

const response = await fetch(`https://data.solanatracker.io/price?token=${mint}`, {
  headers: { "x-api-key": "YOUR_API_KEY" },
});

console.log(await response.json());
```

```python Python theme={null}
import requests

response = requests.get(
    "https://data.solanatracker.io/price",
    params={"token": "So11111111111111111111111111111111111111112"},
    headers={"x-api-key": "YOUR_API_KEY"},
)

print(response.json())
```

You get back the price with liquidity and market cap:

```json Response theme={null}
{
  "price": 175.42,
  "priceQuote": 175.42,
  "liquidity": 14187570.69,
  "marketCap": 99213713748.19,
  "lastUpdated": 1760274132867
}
```

## 3. Try more endpoints

Every Data API endpoint uses the same host and header.

| To get | Use |
| - | - |
| The newest tokens | [`GET /tokens/latest`](https://docs.solanatracker.io/data-api/tokens/get-latest-tokens) |
| Details for one token | [`GET /tokens/{tokenAddress}`](https://docs.solanatracker.io/data-api/tokens/get-token-information) |
| The tokens in a wallet | [`GET /wallet/{owner}`](https://docs.solanatracker.io/data-api/wallet/get-wallet-tokens) |
| Price candles for a chart | [`GET /chart/{token}`](https://docs.solanatracker.io/data-api/chart/get-ohlcv-data-for-a-token) |

## 4. Handle errors

| Status | Meaning | What to do |
| - | - | - |
| `401` | Invalid API key | Check the `x-api-key` header. |
| `429` | Rate limit or quota reached | Wait, then retry with exponential backoff. |
| `500` | Server error | Retry. Contact support if it continues. |

## Use another product

Each product has its own way to authenticate. Get the key from the matching page in your dashboard.

| Product | Key from | How to send it |
| - | - | - |
| [Data API](https://docs.solanatracker.io/data-api/overview.md) | [Data API](https://www.solanatracker.io/account/data-api) | Header `x-api-key` |
| [Datastream](https://docs.solanatracker.io/datastream/overview.md) | [Data API](https://www.solanatracker.io/account/data-api) | In the URL: `wss://datastream.solanatracker.io/{apiKey}` |
| [Prediction Markets](https://docs.solanatracker.io/prediction-markets/overview.md) | [Data API](https://www.solanatracker.io/account/data-api) | Header `x-api-key` |
| [Solana RPC](https://docs.solanatracker.io/solana-rpc/index.md) | [Solana RPC](https://www.solanatracker.io/account/shared-rpc) | Query parameter `api_key` |
| [Yellowstone gRPC](https://docs.solanatracker.io/yellowstone-grpc/index.md) | [Yellowstone gRPC](https://www.solanatracker.io/account/yellowstone-grpc) | `x-token` |
| [Raptor Swap API](https://docs.solanatracker.io/raptor/overview.md) | No key needed | Currently free |

Need help? Ask on [Discord](https://discord.gg/JH2e9rR9fc) or email [support@solanatracker.io](mailto:support@solanatracker.io).


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