Streams
The market, live.
On one socket.
Subscribe over Socket.IO and get new tokens, trades, prices, migrations, SOL/USD, a wallet's tokens and 1-second candles on pump.fun, PumpSwap, Bonk, StonkFun, Meteora, Raydium and Orca. Most of it needs no key and no account. For the whole market, the Advanced Data Stream sends one event per transaction on every launchpad, over one WebSocket.
Live streams on every plan, most with no key. The Advanced Data Stream from Lite.
- 12:04:31new_token$GLOW · pump.funsupply 1B
- 12:04:31buy$GLOW · 7xKX…gAsU0.42 SOL
- 12:04:32token_update$MOTH · PumpSwapmcap $48.2K
- 12:04:32sell$RUNE · 9AiX…yvZG1.10 SOL
- 12:04:33migration$KOI · pump.fun → PumpSwapnew_pool
- 12:04:33ohlcv$MOTH · 1s candlev 5.12
- 12:04:34wallet_trade$FERN · isTarget2.00 SOL
- 12:04:34new_token$BOLT · Bonkquote USD1
- 12:04:35sol_priceSOL/USD$148.20
- 12:04:35sell$GLOW · 3Stp…8ypn0.05 SOL
- 12:04:31new_token$GLOW · pump.funsupply 1B
- 12:04:31buy$GLOW · 7xKX…gAsU0.42 SOL
- 12:04:32token_update$MOTH · PumpSwapmcap $48.2K
- 12:04:32sell$RUNE · 9AiX…yvZG1.10 SOL
- 12:04:33migration$KOI · pump.fun → PumpSwapnew_pool
- 12:04:33ohlcv$MOTH · 1s candlev 5.12
- 12:04:34wallet_trade$FERN · isTarget2.00 SOL
- 12:04:34new_token$BOLT · Bonkquote USD1
- 12:04:35sol_priceSOL/USD$148.20
- 12:04:35sell$GLOW · 3Stp…8ypn0.05 SOL
01The streams
Pick what you follow.
Every live stream is a Socket.IO event on https://sol.shrine.trade, each its own subscription on the same connection. Subscribe inside connect: Socket.IO reconnects by itself, and a fresh connection starts with no subscriptions. The step-by-step guide has it in Python too.
subscribe_new_tokens: every launch on the launchpads you pick, with its mint, pool, quote and supply, and the name, symbol and creator when the create carries them. No key.
const socket = io("https://sol.shrine.trade"); // no key, no account
socket.on("connect", () => {
socket.emit("subscribe_new_tokens", { protocols: ["PUMPFUN"] });
});
socket.on("new_token", (t) => console.log(t.symbol ?? "", t.mint));
// new_token
{
"protocol": "PUMPFUN",
"mint": "3StpvEPanQtd25SvBamVjvyRaawNapjUTmygnVsPpump",
"pool": "Hm9HUNoF3Ua2tSZM1Uzk6HM6tS5LxmR8p7wtxUeYcD6E",
"name": "Mayhem",
"symbol": "Venum",
"decimals": 6,
"quote": "So11111111111111111111111111111111111111112",
"creator": "7ZbfkTHfyeMdXt98sdvJHT2kY9hrYntJm2A5aepK8ypn",
"uri": "https://ipfs.io/ipfs/Qmdq5na6…",
"supply": 1000000000,
"timestamp": 1779825514
}
subscribe_trades: every buy and sell on a coin, on its bonding curve or its pool, with the wallet, the side, both amounts and the signature, in order. Pass a mint or a pool.
socket.emit("subscribe_trades", { pool: "4mBL…" });
socket.on("trade", (t) =>
console.log(t.is_buy ? "BUY" : "SELL", t.token_amount, t.wallet));
// trade
{
"protocol": "PUMPSWAP",
"pool": "4mBLRPUyfE7CvxmXiGJx5WA51isanbxpdbdPjFuuBzmY",
"mint": "Gc6rNxGnoQt6vCfhNzn5iJnPBu1V38GZfdYERfnXpump",
"signature": "c9asMSPXxiEYC4RQ…",
"is_buy": true,
"token_amount": 153285714.285714,
"quote_amount": 5.0,
"wallet": "9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG",
"timestamp": 1779812627
}
subscribe: a token_update each time a pool's last-trade price changes, with the price, the market cap and both in US dollars. Pass a mint or a pool.
socket.emit("subscribe", { mint: "Gc6rNxGnoQt…pump" });
socket.on("token_update", (u) => console.log(u.pool, u.price, u.mcapUSD));
// token_update
{
"pool": "4mBLRPUyfE7CvxmXiGJx5WA51isanbxpdbdPjFuuBzmY",
"price": 0.000000033,
"mcap": 32.62,
"quote": "So11111111111111111111111111111111111111112",
"priceUSD": 0.0000049,
"mcapUSD": 4893.0,
"time": 1779812627
}
subscribe_migrations: the moment a pump.fun coin graduates to PumpSwap, with the old and the new pool address.
socket.emit("subscribe_migrations", { protocols: ["PUMPFUN"] });
socket.on("migration", (m) => console.log(m.mint, m.old_pool, m.new_pool));
// migration
{
"protocol": "PUMPFUN",
"mint": "Gc6r…pump",
"old_pool": "<bonding curve>",
"new_pool": "<pumpswap pool>",
"tx": "<signature>",
"time": 1779812627
}
subscribe_wallet: name a wallet and get every trade of every token it has traded, by anyone, its own included. A token it trades while you listen joins at once.
socket.emit("subscribe_wallet", {
wallet: "9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG",
minSol: 0.5, // other wallets' trades of at least 0.5 SOL
lookbackMinutes: 10, // "has traded" = in the last 10 minutes
});
socket.on("wallet_trade", (t) => console.log(t.isTarget, t.sol_amount, t.mint));
// wallet_trade
{
"protocol": "PUMPSWAP",
"mint": "Gc6rNxGnoQt6vCfhNzn5iJnPBu1V38GZfdYERfnXpump",
"is_buy": true,
"token_amount": 153285714.285714,
"sol_amount": 5.0,
"wallet": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"target": "9AiXyDfy6cKieVPgwyfsNS37HypoS8k7ju2CV3WnyvZG",
"isTarget": false,
"timestamp": 1779812627
}
subscribe_ohlcv: live OHLCV for a pool, at most one update a second, in the tuple format chart libraries expect. Candles take a key; on Free, the free one from the dashboard opens one token at a time.
const socket = io("https://sol.shrine.trade", {
auth: { api_key: "sk_…" }, // free key: one token; plan key: every token
});
socket.emit("subscribe_ohlcv", { pool: "4mBL…" });
socket.on("ohlcv", (rows) => {
for (const [t, o, h, l, c, v] of rows) console.log(new Date(t), c, v);
});
// ohlcv: [timestamp_ms, open, high, low, close, volume]
[[1779812627000, 0.000000033, 0.000000034,
0.000000033, 0.000000034, 5.12]]
02Two ways in
A few coins, free. The whole market, from Lite.
The live streams follow what you name: launchpads, coins, pools or a wallet. The Advanced Data Stream sends every transaction on every launchpad we index, in one connection.
On every plan
Live streams
Socket.IO subscriptions on one connection: new tokens, trades, prices, migrations, SOL/USD, a wallet's tokens and 1-second candles.
- No key and no account for most of them
- 50 tokens per connection, prices, trades and candles together
- 2 sockets per stream type without a key, more on a paid plan
- Live candles with a key: on Free, the free one from the dashboard, for one token at a time
From Lite
Advanced Data Stream
One event per transaction, for every transaction on every launchpad we index: trades, launches, migrations, liquidity and fee claims. For copy-trading, scam filtering and anything that needs the whole market rather than one pool.
- Every token in one connection, or only the protocols and actions you name
- Trades with the pool's reserves, a per-swap breakdown and every trader involved
- Launches with the mint and freeze authorities
- Resume with
sinceSlotfrom any slot of the last 24 hours - The same events in the free hourly archive, apart from a few venues sent live only
03Advanced Data Stream
The whole market. One WebSocket.
A plain WebSocket, the fastest way in, or the Socket.IO event stream. Messages with a type are about the socket; every other one is an event. Comes with Lite, Developer and Professional.
import WebSocket from "ws";
const ws = new WebSocket(
"wss://sol.shrine.trade/api/stream/ws" +
"?key=sk_…&actions=buy,sell,create"
);
ws.on("message", (raw) => {
const e = JSON.parse(raw);
if (e.type) return; // connected, resumed, pong, subscribed, lagged
console.log(e.action, e.protocol, e.mint, e.quoteAmount);
});
// a trade event, from the docs (trimmed)
{
"signature": "…", "block": 445627693, "timestamp": 1788976012,
"action": "buy", "protocol": "PUMPFUN", "launchpad": "PUMPFUN",
"pool": "…", "mint": "…", "quoteMint": "So111…",
"tokenAmount": 31952.74, "quoteAmount": 0.0161,
"price": 0.000000504, "marketCapQuote": 504.1,
"tokensInPool": 1041000000, "quoteInPool": 30.5,
"priorityFeeLamports": 150000, "tipLamports": 1000000,
"tradersInvolved": ["…"],
"breakdown": [{ "trader": "…", "action": "buy", … }]
}
- Everything, or a filter.Leave
protocolsandactionsout for every event, or name the ones you want. Send a new filter on the open socket to change it. - Resume from a slot.
blockis the slot. Reconnect withsinceSlotset to the last one you handled and everything since is sent first, from any slot of the last 24 hours, then the live events. - The pool's reserves.
tokensInPoolandquoteInPool, as the launchpad reports them, with every amount also raw, exact at any size. - What it paid to land.Every event carries its transaction's priority fee and tip, with the compute-unit price and limit it set.
- Every trader involved.The fee payer is not always the trader: for copy-trading use
tradersInvolved. Several swaps in one transaction come with a per-swapbreakdown.
04Plans
Free to listen. The firehose from Lite.
The live streams need no key on Free, except candles, which take the free key from the dashboard. Your plan's key, in the handshake as auth: { api_key }, raises the limits and opens the Advanced Data Stream.
| Free | Lite | Developer | Professional | |
|---|---|---|---|---|
| Price, trades, SOL price, new tokens and migrations streams | 2 sockets | 5 sockets | 15 sockets | 30 sockets |
| Wallet stream | 1 wallet, 20 tokens | 25 wallets, 100 tokens each | 250 wallets, 500 tokens each | 1,000 wallets, 500 tokens each |
| Wallet transactions | 1 wallet | 25 wallets | 250 wallets | 1,000 wallets |
| Live candles | 1 token, 1 socket, free key from the dashboard | every token, 3 sockets | every token, 10 sockets | every token, 15 sockets |
| Advanced Data Stream | – | 2 sockets | 5 sockets | 10 sockets |
| 24-hour replay | – | 1 socket | 3 sockets | 5 sockets |
On every plan, one connection follows up to 50 tokens on the live streams, prices, trades and candles together. Every limit is in Plans and limits. Prices are on the pricing page.
Do I need an API key?
Not for most streams. New tokens, trades, prices, migrations, SOL/USD and the wallet stream work without a key or an account. Live candles need a key: on Free, the free one you make on the dashboard, for one token at a time. The Advanced Data Stream needs a key from Lite, Developer or Professional.
How many tokens can one connection follow?
50 per connection on every plan, prices, trades and candles together. Without a key you can open 2 sockets per stream type, more on a paid plan. For every trade on every token in one connection, use the Advanced Data Stream.
What happens when my connection drops?
Socket.IO reconnects by itself, but a fresh connection starts with no subscriptions, so subscribe inside the connect handler, as the example does. On the Advanced Data Stream, reconnect with sinceSlot set to the last block you handled: everything since that slot is sent first, up to 24 hours back, then the live events.
Which launchpads do the streams cover?
pump.fun, PumpSwap, Bonk and StonkFun (Raydium LaunchLab), Meteora DBC and DAMM v2, Raydium (CPMM, CLMM and AMM v4) and Orca Whirlpool. The new token stream takes any of PUMPFUN, PUMPSWAP, METEORA, RAYDIUM, ORCA, BONK and STONKFUN. Migrations come from pump.fun to PumpSwap.
Is the Advanced Data Stream on Socket.IO too?
Yes, as the Socket.IO event stream, for clients that already speak Socket.IO or want other streams on the same connection. It passes through one more service on our side, so it arrives about 1 to 2 ms after the plain WebSocket at the median.
The live streams are free, most with no key. The Advanced Data Stream comes with every paid plan.