POST request to establish the connection and specify the subscription. No further messages are sent by the client on this connection.
Usage
Send onePOST request to the SSE endpoint with a JSON body that defines the subscription.
Endpoints
- Mainnet:
https://toncenter.com/api/streaming/v2/sse - Testnet:
https://testnet.toncenter.com/api/streaming/v2/sse
Request fields
One or more event types to receive:
transactions, actions, trace, trace_invalidated, account_state_change, jettons_change. The event types section and notification schemas section provide the exact payload structure for each event.Wallet or contract addresses to monitor. Accepts valid TON address formats. Optional when subscribing only to a
"trace", otherwise required.Optional list of normalized external message hashes to monitor. Required when subscribing to a
"trace".Optional minimum finality:
"pending", "confirmed", or "finalized". Defaults to "finalized".Optional. If
true, includes address book data in supported notifications.Optional. If
true, includes token metadata (jetton or NFT) in supported notifications.Optional action type filter. Applies only to
"actions". Refer to a list of available action types in API v3.Optional list of action classification types supported by the client. Defaults to
["latest"].- Include
"trace"intypesand providetrace_external_hash_normsto subscribe to a specific trace. - Omit
addresseswhen subscribing only to a"trace".
Examples
Lowest-latency stream of"pending" → "confirmed" → "finalized" finality levels:
keepalive line every 15 seconds:
:.
Known limitations
Rate limit on reconnect (429 error)
If a client reconnects immediately after a disconnect, the previous connection may still be open for ~1 minute. The reconnect attempt receives a 429 error. Use exponential backoff or an enterprise plan API key.POST-only subscription
Despite SSE typically usingGET requests, Streaming API endpoints require a POST with the subscription JSON in the request body.
No invalidation signal for account_state_change or jettons_change
If a "confirmed" account state or jetton balance update is later rolled back, no "trace_invalidated" notification is sent for these event types.
When using "account_state_change" or "jettons_change" at "confirmed" finality, consider waiting for "finalized" for balance-critical flows.
Next steps
- Skim the server notification reference
- Get an API key