WebSocket
A real-time feed of tracked-wallet trades. As each tracked wallet buys or sells, the trade is pushed to you within seconds.
wss://api.prysmatic-sol.xyz/ws
Connecting
Authenticate with your API key in the Sec-WebSocket-Protocol header — not in the
URL, so it never appears in proxy logs:
Sec-WebSocket-Protocol: bearer, <API_KEY>
The server accepts the connection echoing only bearer, never the key. The
connection is refused if the key is unknown or the balance is zero.
import asyncio, json, websockets
async def main():
async with websockets.connect(
"wss://api.prysmatic-sol.xyz/ws",
subprotocols=["bearer", "<API_KEY>"],
) as ws:
await ws.send(json.dumps({"action": "subscribe", "channels": ["trades"]}))
async for raw in ws:
msg = json.loads(raw)
if msg.get("channel") == "trades":
print(msg["data"])
asyncio.run(main())
Subscribing
Send a subscribe message for the trades channel:
{ "action": "subscribe", "channels": ["trades"] }
Filtering by wallet
You usually don't want every wallet — and you don't want to pay for trades you don't
care about. Add a wallets list (aliases from the Wallets API) and
you'll only receive — and only be charged for — trades from those wallets:
{ "action": "subscribe", "channels": ["trades"], "wallets": ["W12", "W37", "W205"] }
- Omit
wallets(or send an empty list) to receive all tracked wallets. - Re-sending
subscribereplaces the filter, so you can change your watchlist at any time.
A trade from a wallet outside your filter is never delivered and never costs credits.
Unsubscribing
{ "action": "unsubscribe", "channels": ["trades"] }
Trade payload
{
"channel": "trades",
"data": {
"block_time": 1781404511,
"wallet": "W240",
"side": "buy",
"mint": "4Sm4YsjRrvSRQ4x1P86ncqumV3ZVgXxtFMKjiL8vpump",
"token_amount": "20415437641764",
"decimals": 6,
"sol_amount": 4.063765757,
"quote_mint": "So11111111111111111111111111111111111111112",
"quote_amount": "4063765757",
"program": "pump.fun"
}
}
walletis an opaque alias, never a real address.sol_amountis already in SOL (not lamports).block_time,token_amount, andquote_amountare display-salted.signature,slot, andpoolare never included.
Credits and limits
- Each delivered payload consumes 1 credit.
- Only the
tradeschannel is available to API-key clients. - One active connection per API key. If you open a second one with the same key, the
first is dropped with
{"type":"superseded"}. - When your balance is spent, the server sends
{"type":"balance_exhausted"}and closes the connection. Top up from the dashboard and reconnect.