Data API
Live + historical data across PumpFun, PumpSwap, Meteora DAMM v2, Raydium (CPMM/CLMM/AMM v4) and Orca Whirlpool. One API key, billed in SOL directly from your wallet - no monthly fee, no credit packs.
30-second start
- Get a key on the Account page (connect Phantom → sign → done).
- Fund your wallet with SOL.
- Call any endpoint:
curl "https://api.shrine.trade/metadata?mint=Gc6r…pump" \
-H "x-api-key: pd_xxxxxxxx…"
Auth
Every paid endpoint accepts the key as either:
- Header -
x-api-key: pd_xxxxxxxx…(preferred) - Query string -
?api_key=pd_xxxxxxxx…(when you can't set headers)
WebSocket clients pass it in the Socket.IO handshake:
import { io } from "socket.io-client";
const socket = io("https://api.shrine.trade", {
auth: { api_key: "pd_xxxxxxxx…" },
});
How billing works
- We snapshot your wallet's on-chain SOL balance into a cached value (refreshed at least once a minute).
- Subscribing and the live streams are free. You pay only for OHLCV (each delivered candle and the
ohlcv_historyfetch), metadata lookups, and the sol-price REST read. - Stream usage is metered in small batches every few seconds and charged atomically against that cached balance.
- Your effective balance = wallet balance − charged since last settlement. You see it on the Account page.
- When you top up the wallet, the next balance refresh picks it up. If you run out mid-stream, the server emits a
billing_errorevent and disconnects you.
There's no monthly fee, no rate-limit tier.
Pricing
Most of the API is free: every live stream - prices, trades, new tokens, migrations, SOL/USD - costs nothing. Only OHLCV (the live candle stream and the ohlcv_history fetch), metadata, and the sol-price REST read are billed.
| Event | Per event | Per 1,000 |
|---|---|---|
subscribe - each token_update | Free | Free |
subscribe_trades - each trade | Free | Free |
subscribe_new_tokens - each new_token | Free | Free |
subscribe_migrations - each migration | Free | Free |
subscribe_sol_price - each sol_price | Free | Free |
subscribe_ohlcv - ohlcv candles (charged per 1,000) | 0.000001 SOL | 0.001 SOL |
ohlcv_history - per call | 0.0001 SOL | 0.1 SOL |
GET /metadata (and /lookup) - per call | 0.0001 SOL | 0.1 SOL |
GET /sol-price - per call | 0.0001 SOL | 0.1 SOL |
The two REST reads (/metadata, /sol-price) give 5 calls/min/key free, then bill per call beyond that. OHLCV candles are billed in blocks of 1,000 (0.001 SOL per 1,000). Subscribes, unsubscribes and disconnects are free. Rough mental model: 1 SOL ≈ 10,000 metadata / sol-price / ohlcv_history calls, or 1,000,000 live OHLCV candles.
Errors
All errors are JSON with the same shape:
{ "error": "insufficient_balance", "effective_sol": 0.00000024 }
| Status | error | Meaning |
|---|---|---|
| 400 | mint_or_pool_required | Missing required param. |
| 401 | missing_api_key | No x-api-key header / api_key query param. |
| 401 | unknown_key | API key not recognized. |
| 402 | insufficient_balance | Top up your wallet. |
| 404 | not_found | Pool/mint isn't registered (yet). |
| 502 | authorize_upstream_… / authorize_unavailable | Backend hiccup; safe to retry. |
| 503 | unavailable | GET /sol-price before the first SOL/USD tick (cold start); retry shortly. |
WebSocket subscribe errors come as a callback ack: { error: "…", message: "…" }. If your balance runs out while streaming, the server emits a billing_error event and disconnects.
Limits
| Value | |
|---|---|
| Max concurrent Socket.IO subscriptions per connection | 50 |
OHLCV history limit | 1 – 500 (default 200) |
| Wallet balance refresh | ≤ 60s |