X1.NinjaX1.Ninja

Developer API

Programmatic access to every pool, trade and candle on XDEX. The free plan includes 500,000 requests a month at 60 req/min — sign up with your Solana wallet, no card needed.

Plans

Free

free

Free

Monthly quota
500,000
Rate limit
60/min
API keys
1
Support
Community
Includes:
  • /v1/pools
  • /v1/pools/{address}
  • /v1/trades/{address}
  • /v1/ohlcv/{address}
500K req/mo · 60/min
Get a free key

Starter

starterON-CHAIN

$19/mo

Monthly quota
1,000,000
Rate limit
600/min
API keys
3
Support
Email
Everything in Free, plus:
  • /v1/search
1M req/mo · 600/min
Start on Starter

Pro

proON-CHAIN

$99/mo

Monthly quota
5,000,000
Rate limit
1,500/min
API keys
10
Support
Email, priority
Everything in Starter, plus:
  • /v1/stream/trades
5M req/mo · 1,500/min
Start on Pro

Business

business

$499/mo

Monthly quota
50,000,000
Rate limit
3,000/min
API keys
50
Support
Direct contact
Everything in Pro, plus:
  • dedicated key, custom limits
50M req/mo · 3,000/min
Set up by arrangement, not self-serve yet.
Contact us

The free tier is open. Paid plans are available through on-chain payment in your dashboard; card payments are coming soon. Quota resets on the 1st of each month, UTC.

Base URL & authentication

Base URLhttps://api.x1.ninja

The same routes also answer at https://x1.ninja/api/v1/….

Send your key in the Authorization: Bearer header (or X-API-Key):

curl
curl -H "Authorization: Bearer x1_your_key_here" \
  "https://api.x1.ninja/v1/pools?limit=10"

Keep your key server-side only. Exposing it in a public site or repo lets anyone consume your quota.

Quick examples

Node / TypeScript
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);
Python
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'])

Want runnable files? The starter kit has downloadable Node and Python scripts.

Endpoints

Open an endpoint for its parameters, an example request and the response shape.

No OpenAPI or Postman spec is published yet. The reference below lists every route, its parameters and its response shape.

Sample response · GET /v1/pools?limit=1 (trimmed to key fields)
{
  "pools": [
    {
      "address": "CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR",
      "baseToken": { "symbol": "XNT", "name": "Wrapped XNT", "decimals": 9 },
      "quoteToken": { "symbol": "USDC.X", "name": "USDC.X", "decimals": 6 },
      "priceUsd": 0.24667929791389898,
      "liquidity": 9269.852734,
      "marketCap": 10596201.955301734,
      "volume24h": 18530.271385999953,
      "txns24h": 2533,
      "priceChange24h": -4.411766084200741,
      "holders": 1002
    }
  ],
  "total": 411,
  "totalCount": 1456,
  "offset": 0,
  "limit": 1,
  "xntPriceUsd": 0.24667929791389898,
  "lastUpdated": 1793788369954
}
GET/v1/poolsfreePaginated list of all pools with prices, volume, liquidity, market cap
Parameters
limit
Pools per page, up to 500 (default 500)
offset
Skip this many pools, for paging
sortBy / sortDir
liquidity (default), volume24h, priceUsd, priceChange24h, createdAt; asc | desc
minLiquidity
Minimum liquidity in USD (default 1)
minVolume
Minimum 24h volume in USD
featured
true to return featured pools only
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/pools?limit=10&sortBy=volume24h"
Response
{ pools: Pool[], total, totalCount, offset, limit, xntPriceUsd, lastUpdated }
GET/v1/pools/{address}freeSingle pool — full detail including reserves, token metadata, holders
Parameters
address
Pool address (path)
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/pools/CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR"
Response
{ pool: Pool, xntPriceUsd, lastUpdated } · 404 if the pool is unknown
GET/v1/trades/{address}freeTrade history for a pool (buys + sells + LP events)
Parameters
limit
Trades to return, up to 200 (default 50)
type
all | buys | sells | lp (default all)
minUsd
Skip trades below this USD value
maker
Only trades by this wallet
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/trades/CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR?limit=20&type=buys"
Response
{ trades: Trade[], total, lastUpdated }
GET/v1/ohlcv/{address}freeOHLCV candles for a pool
Parameters
tf
1m | 5m | 15m | 1h | 4h | 1D (default 1h)
limit
Candles to return, up to 300 (default 100)
mode
usd (default) or native quote prices
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/ohlcv/CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR?tf=1h&limit=100"
Response
{ ohlcv: Candle[], timeframe, mode, poolAddress, currentPrice, currentPriceUsd, baseToken, quoteToken, lastUpdated, pending }
GET/v1/searchstarterSearch tokens and pools by symbol, name, or address
Parameters
q
Symbol, name or address
limit
1-50 results (default 20)
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/search?q=XNT&limit=5"
Response
{ results: SearchResult[], total, lastUpdated }
GET/v1/stream/tradesproLive trade stream (Server-Sent Events) for any pool
Parameters
pool
Pool address to stream
Last-Event-ID
Header: resume after this event
Example request
curl -H "Authorization: Bearer $X1_API_KEY" \
  "https://api.x1.ninja/v1/stream/trades?pool=CAJeVEoSm1QQZccnCqYu9cnNF7TTD2fcUA3E5HQoxRvR"
Response
text/event-stream: one trade event per message, heartbeats while quiet

All endpoints return JSON. All successful responses include X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset headers.

Rate limits & errors

401Missing, invalid or disabled key.
403The endpoint is above your plan’s tier.
429Rate limit exceeded. Wait for the Retry-After header before retrying.
503Upstream (on-chain or data store) failure. Retry after the Retry-After header.

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.

Need higher limits or a dedicated setup? Contact us on Telegram.