Skip to main content

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

  1. Get a key on the Account page (connect Phantom → sign → done).
  2. Fund your wallet with SOL.
  3. 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

  1. We snapshot your wallet's on-chain SOL balance into a cached value (refreshed at least once a minute).
  2. Subscribing and the live streams are free. You pay only for OHLCV (each delivered candle and the ohlcv_history fetch), metadata lookups, and the sol-price REST read.
  3. Stream usage is metered in small batches every few seconds and charged atomically against that cached balance.
  4. Your effective balance = wallet balance − charged since last settlement. You see it on the Account page.
  5. When you top up the wallet, the next balance refresh picks it up. If you run out mid-stream, the server emits a billing_error event 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.

EventPer eventPer 1,000
subscribe - each token_updateFreeFree
subscribe_trades - each tradeFreeFree
subscribe_new_tokens - each new_tokenFreeFree
subscribe_migrations - each migrationFreeFree
subscribe_sol_price - each sol_priceFreeFree
subscribe_ohlcv - ohlcv candles (charged per 1,000)0.000001 SOL0.001 SOL
ohlcv_history - per call0.0001 SOL0.1 SOL
GET /metadata (and /lookup) - per call0.0001 SOL0.1 SOL
GET /sol-price - per call0.0001 SOL0.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 }
StatuserrorMeaning
400mint_or_pool_requiredMissing required param.
401missing_api_keyNo x-api-key header / api_key query param.
401unknown_keyAPI key not recognized.
402insufficient_balanceTop up your wallet.
404not_foundPool/mint isn't registered (yet).
502authorize_upstream_… / authorize_unavailableBackend hiccup; safe to retry.
503unavailableGET /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 connection50
OHLCV history limit1 – 500 (default 200)
Wallet balance refresh≤ 60s