Skip to main content

Endpoint & subscription

Connect, send a subscription, get an acknowledgment ("event": "subscribed"), then matching events as ledgers close. Ignore {"event":"ping"} keepalives, and unsubscribe with {"type":"unsubscribe","authorization":"YOUR_API_KEY","payload":{"subscriptionId":"..."}}. Multiple subscriptions share one socket; the subscriptionId echoed on every frame routes each event back to the subscription that matched it. Filters run server-side; operators are eq, neq, lt, lte, gt, gte, in, nested with and / or — see the filters reference.

Stellar address forms

Five address forms appear in the frames, and casing matters in filters:

Swaps

Stream every swap

Response:
Reading a swap: amount0/amount1 are decimal-adjusted deltas — positive is what the trader paid into the pool, negative is what they received — with rawAmount0/rawAmount1 as the on-ledger integers and amountUSD/priceUSDToken0/priceUSDToken1 pre-computed. transactionSenderAddress is the trading account, and transactionSwapsCount tells you how many legs the transaction has (path payments produce several).

Swaps on one pool

Classic AMM market — lowercase lp: form:
Soroswap and Aquarius markets are C… contracts — same filter, uppercase address:

Swaps over $100 on one pool

and an amount threshold onto the pool:
Drop the pool clause to get every swap over $100 network-wide — a one-line whale feed.

Swaps by venue

All classic-AMM trades — works the same with soroswap, aquarius, aquarius-stable, aquarius-concentrated:

A wallet’s trades

Swaps identify the trader as transactionSenderAddress:

Transfers

Stream every transfer

Response:
Reading a transfer: transactionFrom/transactionTo are the envelope-level source and destination accounts; from/to are the transfer leg itself — a G… account, a C… contract, an lp: pool, or the zero address on mints and burns. contract is the asset moved and amount is the raw on-ledger integer — divide by 10⁷ for XLM and classic assets. transactionFees is in stroops.
Transfers cover every token movement on the network — including mints, burns and pool deposits — and amountUSD is 0 whenever the asset has no reliable price. Put USD thresholds on swaps and raw-amount thresholds on transfers.

A wallet’s transfers, both directions

Transfers filter on the envelope fields — or the two directions:

All movements of one token

Native XLM via the sentinel — or any classic asset by its CODE:ISSUER:

Whale transfers — 1,000+ XLM

Raw units: 1,000 XLM = 10¹⁰ stroops. In live testing this caught a 22,500 XLM movement within seconds:
Filter on the right wallet field per event type. It’s transactionSenderAddress on swaps but transactionFrom/transactionTo on transfers — they are not interchangeable. The transfer leg fields from/to (and swapSenderAddress on swaps) appear in every frame for client-side use but do not match in server-side filters.

Putting it together — a pool watcher

Big-swap alerts on one market plus an XLM whale feed, on a single socket. Runs as-is with Node 22+ or Bun:

Going further