Developer API
Programmatic access to every pool, trade, candle, and wallet on XDEX. Free tier available — sign up with your Solana wallet.
Plans
| Free | StarterSOON | ProSOON | |
|---|---|---|---|
| Price | Free | $19/mo | $99/mo |
| Monthly quota | 500,000 req | 1,000,000 req | 5,000,000 req |
| Rate limit | 60 req/min | 600 req/min | 1,500 req/min |
| Endpoints | Pools, trades, OHLCV | + search, higher quota | + live trade stream |
| Support | Community | Email, priority |
Free tier is open today — sign up with your wallet and start building. Paid tiers are pricing-finalized and launch shortly. Quota resets the 1st of each month UTC.
Base URL & authentication
https://api.x1.ninjaEvery request must include your API key in the Authorization header:
curl -H "Authorization: Bearer x1_your_key_here" \
https://api.x1.ninja/v1/pools?limit=10Keep your key server-side only. Exposing it in a public site or repo lets anyone consume your quota.
Quick examples
const res = await fetch('https://api.x1.ninja/v1/pools?limit=10', {
headers: { 'Authorization': `Bearer ${process.env.X1_API_KEY}` },
});
const { pools } = await res.json();
console.log(pools[0].baseToken.symbol, '@', pools[0].priceUsd);import os, requests
r = requests.get(
'https://api.x1.ninja/v1/pools',
params={'limit': 10},
headers={'Authorization': f'Bearer {os.environ["X1_API_KEY"]}'},
)
for p in r.json()['pools']:
print(p['baseToken']['symbol'], p['priceUsd'])Endpoints
| Method | Path | Description | Min tier |
|---|---|---|---|
| GET | /v1/pools | Paginated list of all pools with prices, volume, liquidity, market cap | free |
| GET | /v1/pools/{address} | Single pool — full detail including reserves, token metadata, holders | free |
| GET | /v1/trades/{address} | Trade history for a pool (buys + sells + LP events) | free |
| GET | /v1/ohlcv/{address} | OHLCV candle data (1m / 5m / 15m / 1h / 4h / 1D) | free |
| GET | /v1/search | Search tokens and pools by symbol, name, or address | starter |
| GET | /v1/stream/trades | Live trade stream (Server-Sent Events) for any pool | pro |
All endpoints return JSON. All successful responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.
Rate limits & errors
- Exceeding your rate limit returns HTTP
429with aRetry-Afterheader. - Invalid or disabled keys return HTTP
401. - Requests to an endpoint above your tier return HTTP
403. - Upstream (on-chain) failures return HTTP
503withRetry-After: 60.
Fair use
Free-tier keys are for evaluation, hobby projects, and small integrations. Abusive patterns — scraping everything repeatedly, sharing a key across many clients, bypassing tier limits — will result in the key being revoked. Build something legitimate and we'll support you.
