Appearance
Quickstart
Get from zero to your first event in a few minutes.
You need Node.js with a WebSocket-capable runtime, or Python 3.10+ with the websockets package. Browser WebSockets work for experiments, but production keys should stay server-side.
1. Create an API key
- Sign in at tessium.dev.
- Open the dashboard.
- Create a key. The free plan needs no payment details.
2. Connect
Open a WebSocket to the stream endpoint and pass your key as a query parameter:
wss://api.tessium.dev/stream?key=YOUR_API_KEY3. Subscribe
Send a JSON subscribe frame after the socket opens. This example watches every new token on pump.fun:
For the Python example, install its only dependency:
bash
pip install websocketsts
const ENDPOINT = 'wss://api.tessium.dev/stream?key=YOUR_API_KEY'
const ws = new WebSocket(ENDPOINT)
ws.onopen = () =>
ws.send(
JSON.stringify({
op: 'subscribe',
stream: 'launches',
params: { platforms: ['pumpfun'] },
id: 1,
}),
)
ws.onmessage = (e: MessageEvent) => {
const message = JSON.parse(e.data as string)
if (message.op === 'ack') console.log('subscribed:', message.sub)
if (message.op === 'event') console.log(message.data)
}python
import asyncio, json, websockets
ENDPOINT = "wss://api.tessium.dev/stream?key=YOUR_API_KEY"
SUB = {
"op": "subscribe",
"stream": "launches",
"params": {"platforms": ["pumpfun"]},
"id": 1,
}
async def main():
async with websockets.connect(ENDPOINT) as ws:
await ws.send(json.dumps(SUB))
async for message in ws:
frame = json.loads(message)
if frame["op"] == "ack":
print("subscribed:", frame["sub"])
elif frame["op"] == "event":
print(frame["data"])
asyncio.run(main())4. Read the event
The server first acknowledges the subscription:
json
{ "op": "ack", "id": 1, "sub": "ln_1" }Events then arrive with "op": "event". A launch looks like this:
json
{
"op": "event",
"sub": "ln_1",
"stream": "launches",
"cursor": "436312304:15:0",
"data": {
"slot": 436312304,
"signature": "2ypWH1eZ...",
"blockTime": 1785482177,
"protocol": "pumpfun",
"mint": "3hz7...pump",
"creator": "9GXm...",
"bondingCurve": "79Pe...",
"name": "Example Token",
"symbol": "EXMP"
}
}You are live
The ack confirms that the subscription is open. Receiving the first event confirms the complete path from Solana to your consumer.
You are connected once the ack arrives. Persist each event's cursor after processing it so you can replay a short disconnect.