Arbitrum One
Pronto para usar isso em produção?
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
Arbitrum One
O plano gratuito cobre projetos pessoais. O pay-as-you-go escala sem cartão de crédito.
eth_unsubscribe cancels an active WebSocket subscription on Arbitrum One (chain ID 42161) by the ID that eth_subscribe returned, stopping the node from pushing any further notifications for that stream. Arbitrum One is the Optimistic Rollup that settles to Ethereum and pays gas in ETH, and its sequencer streams blocks sub-second, so an unused newHeads or logs subscription keeps delivering a steady flow of messages until you tear it down. Send eth_unsubscribe over the same WebSocket connection you opened against wss://arbitrum.therpc.io/YOUR_API_KEY (the WebSocket form of https://arbitrum.therpc.io/YOUR_API_KEY); the node returns true when it finds and removes the subscription, or false when no such subscription exists.
newHeads subscription when a user navigates away from a live Arbitrum One view, so your app stops processing block notifications it no longer displays.logs stream before opening a new one with updated address/topics filters — for example when switching from monitoring a Camelot pool to an Aave market — so you never run two overlapping streams at once.| # | Nome | Tipo | Obrigatório | Descrição |
|---|---|---|---|---|
| 1 | subscriptionId | string | Sim | The hex subscription ID returned by eth_subscribe. |
| Tipo | Descrição |
|---|---|
| boolean | `true` if the subscription was found and cancelled. `false` if it did not exist. |
Try it live in the Arbitrum One playground.
| Código | Mensagem | Causa |
|---|---|---|
-32602 | invalid subscription id | The subscription ID is malformed or belongs to a different connection. |
-32000 | subscription not found | The subscription was already cancelled or never existed. |
Parâmetros
The hex subscription ID returned by eth_subscribe.