Get started

Quickstart

From zero to your first live Solana event in about five minutes. Grab a key, make one REST call, then open a stream. Every snippet below is copy-paste ready — swap in your key and go.

1. Get an API key

Create a free account in the Anaxer console and open API Keys → Create key. The secret is shown once — copy it somewhere safe. No card required on the free plan.

Keep it server-side. Your key authenticates every request. Store it in an environment variable (ANAXER_API_KEY) and never ship it in browser JavaScript — see Authentication for the details.

2. Your first REST call

The fastest way to confirm your key works: ask for the single most recent token launch. Pass the key as a Bearer token (or the x-api-key header).

curl "https://api.anaxer.com/v1/creations?limit=1" \
  -H "Authorization: Bearer YOUR_KEY"

You'll get back a page of JSON:

{
  "data": [
    {
      "type": "created",
      "source": "pump_fun",
      "mint": "pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn",
      "name": "Pump",
      "symbol": "PUMP",
      "mayhemMode": false,
      "signature": "3Nk7pT2xQeB8mVdR4wLc9fJhY6zS1nGtK5uA3oXvW7q…",
      "slot": 309812345,
      "timestamp": 1751008864000
    }
  ],
  "next": "eyJ0IjoxNzUxMDA4ODY0MDAwLCJp… ",
  "window": { "from": 1751000000000, "to": 1751008869000 }
}

Timestamps are Unix epoch milliseconds and every event carries a Solana slot for ordering. List endpoints return data, an opaque next cursor, and the effective window — see the REST reference for pagination.

3. Your first stream

REST is a snapshot; streams are the live feed. Open one WebSocket, send a subscribemessage, and events push to you in real time (typically under 350 ms from chain confirmation).

With the TypeScript SDK

Install it (Node.js ≥ 20), then subscribe. The SDK handles auth, heartbeat, and auto-reconnect for you.

npm install @anaxer/sdk
import { connect } from "@anaxer/sdk";

const client = connect({ apiKey: process.env.ANAXER_API_KEY! });

// Opens the WebSocket on the first stream() call and keeps it alive.
client
  .stream("creations", { excludeMayhem: true })
  .on("data", (token) => {
    console.log("new launch:", token.symbol, token.mint);
  });

Or test it with no code

Any language with a WebSocket client works. To eyeball the raw feed from a terminal:

# One-off connection test — no code required
npm install -g wscat
wscat -c "wss://api.anaxer.com/v1/stream?key=YOUR_KEY"

# Once connected, send a subscribe message:
> {"subscribe":"creations"}
# → {"type":"subscribed","channel":"creations"}
# …then events stream back as JSON.
Reconnects are your job (unless you use an SDK). If a raw socket drops, reconnect with backoff, re-send your subscribe messages, and backfill anything you missed via the REST list endpoints. The SDK does the first two automatically — see gap recovery.

Which API should I use?

Four ways in, same data and event shapes underneath. Pick by what you're building:

I want to…UseWhy
React to events as they happenWebSocket streamsPush delivery, sub-350ms
Look up or backfill on demandREST APIPull, paginated, retention-bounded
Build a long-running bot or backend@anaxer/sdkTyped, handles reconnect + heartbeat
Give an AI agent (Claude / Cursor) live data@anaxer/mcpDrop-in tools, no glue code

Next steps