Advanced Data Stream
Every trade, launch and graduation on BNB Chain's launchpads on one socket, pushed the moment the block holding it is seen: each buy and sell on Flap and four.meme (its classic curves and its OpenFour engine alike) with the trader, the amounts, the price the curve settled at and the market cap that price implies; every new token; every curve that fills and moves to PancakeSwap; and the trades in those PancakeSwap pools afterwards, V2 pairs and Infinity pools both.
Free, no key, no account.
wss://api.shrine.trade/bnb/api/stream/ws
Try it
Choose the launchpads and connect. The most recent event arrives at once, then everything after it streams in live.
Copy this
- JavaScript
- Python
const ws = new WebSocket("wss://api.shrine.trade/bnb/api/stream/ws");
ws.onmessage = (e) => {
const t = JSON.parse(e.data);
// t.type: buy, sell, create or migrate; t.protocol: FLAP, FOURMEME, PANCAKESWAP or UNISWAP (t.engine on four.meme: classic or openfour)
if (t.type === "buy" || t.type === "sell") {
console.log(t.type, t.symbol, t.tokenAmountFormatted, "for", t.quoteAmountFormatted, t.quoteToken, "mcap", t.marketCap);
} else {
console.log(t.type, t.protocol, t.symbol, t.token);
}
};
Save it as stream.js and run node stream.js - no packages needed (Node 22+).
import json
from websockets.sync.client import connect
with connect("wss://api.shrine.trade/bnb/api/stream/ws") as ws:
for raw in ws:
t = json.loads(raw)
# t["type"]: buy, sell, create or migrate
if t["type"] in ("buy", "sell"):
print(t["type"], t["symbol"], t["tokenAmountFormatted"], "for", t["quoteAmountFormatted"], t["quoteToken"], "mcap", t.get("marketCap"))
else:
print(t["type"], t["protocol"], t["symbol"], t["token"])
Save it as stream.py, pip install websockets, then python stream.py.
What you get
A message is one event, classified by type and protocol:
type | protocol | Means |
|---|---|---|
buy / sell | FLAP, FOURMEME | A trade on that launchpad's bonding curve. |
buy / sell | PANCAKESWAP | A trade in the PancakeSwap pool of a graduated token, a V2 pair or an Infinity pool; pool names it, launchpad says where the token came from. |
buy / sell | UNISWAP | A trade of a Flap or four.meme token in a Uniswap v4 pool on BNB Chain, by pool id, the same way. |
create | FLAP, FOURMEME | A token launched on that curve, with everything the launch feed carries. |
migrate | PANCAKESWAP | A curve sold out; the token moved to its PancakeSwap pool. launchpad says where it came from. |
four.meme events carry engine: classic for its original curves, openfour for tokens launched through OpenFour, its modular engine (quoted in BNB, stables or Binance's tokenised assets, migrating to a V2 pair or an Infinity pool). Filter with ?protocols=FLAP,FOURMEME (a launchpad's name matches its curve trades, its launches, its graduations and its tokens' pool trades; PANCAKESWAP and UNISWAP match the pool trades on that venue, PANCAKESWAP the graduations too) and ?actions=buy,sell (any of buy, sell, create, migrate). Omit both for everything.
A trade
{
"type": "buy", "protocol": "FOURMEME", "launchpad": "FOURMEME", "engine": "openfour",
"token": "0x…4444", "name": "Infinity Hook", "symbol": "INFINITY",
"blockNumber": 126580612, "txHash": "0x…", "logIndex": 14, "timestamp": 1791524090,
"quoteToken": "BNB", "quoteDecimals": 18,
"trader": "0x…",
"tokenAmount": "12500000000000000000000000", "tokenAmountFormatted": "12500000",
"quoteAmount": "100000000000000000", "quoteAmountFormatted": "0.1",
"fee": "1000000000000000", "taxBps": 0,
"price": "8037676093166", "priceFormatted": "0.000008037676093166",
"marketCap": "8037.676093166",
"totalSupply": "1000000000000000000000000000",
"tokensInCurve": "612000000000000000000000000", "quoteInCurve": "9100000000000000000"
}
tokenAmountis what moved, 18 decimals;quoteAmountis what the trader paid on a buy or received on a sell, in the quote asset (quoteTokenisBNBor the ERC-20's address,quoteDecimalsits decimals).feeis the launchpad's protocol fee on that trade, andtaxBpsthe token's own tax on that side, in basis points, for a Flap tax token (0 otherwise); the amounts are what the curve moved, with the tax already taken.priceis the quote per token after the trade, as the curve reports it (18-decimal fixed point), andmarketCapis that price timestotalSupply, in the quote asset.tokensInCurveandquoteInCurveare the curve's state after the trade: tokens still for sale and quote raised so far. Flap trades do not carry them.traderis who received the tokens on a buy and who sold on a sell; a router in between is not the trader.- A pool trade (
protocol: "PANCAKESWAP"or"UNISWAP") carriespool, the V2 pair's address or the Infinity or Uniswap v4 pool's id, the amounts the pool moved and the price it left;quoteTokenis the pool's pair asset, which can differ from the curve's quote. It has notrader,fee,tokensInCurveorquoteInCurve.
A launch or a migration
create and migrate carry the same fields as the launch feed: quote asset, tax, graduation thresholds, metadata, the pool once migrated. The type names differ (create for new_launch, migrate for graduated), nothing else does.
Once a token has migrated its trades happen in its PancakeSwap pool, and they stay on this stream as PANCAKESWAP buys and sells; a Flap or four.meme token that someone pools on Uniswap v4 shows up as UNISWAP the same way. Infinity and Uniswap v4 pools are followed by their id from the moment they open; V2 pairs are followed from the migration that opened them, and the last day of migrations is read when the service starts, so a pair that opened before that is not followed.
Notes
- Reconnect on drop. Long-lived sockets die; reconnect and you are re-seeded with the most recent event.
- One socket per IP. A second is turned away with
too_many_connections. An unfiltered socket already carries everything, so one is enough. - Order. Events arrive in block order, and within a block in log order (
logIndex). A busy minute on four.meme is several trades a second; read quickly or filter, a client that falls far behind is skipped forward.