BNB Smart Chain
هل أنت مستعد لاستدعاء هذا في الإنتاج؟
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
BNB Smart Chain
الخطة المجانية تغطي المشاريع الشخصية. الدفع حسب الاستخدام يتوسع دون بطاقة.
On BNB Smart Chain, the BNB-settled network with three-second blocks, streaming clients open live feeds through eth_subscribe over a WebSocket connection. eth_unsubscribe closes one of those feeds. Give it the subscription ID that eth_subscribe previously returned and the node stops pushing notifications for it, whether that feed was a newHeads stream of incoming blocks or a logs stream of BEP-20 events. The method is WebSocket-only and means nothing over plain HTTP. Open the socket at https://bsc.therpc.io/YOUR_API_KEY on chain ID 56, and the call replies with a boolean telling you whether the subscription existed and was cancelled.
newHeads block feed the instant a user leaves a live BSC explorer view, so the socket stops delivering updates nobody is watching.| # | الاسم | النوع | مطلوب | الوصف |
|---|---|---|---|---|
| 1 | subscriptionId | string | نعم | The hex subscription ID returned by eth_subscribe. |
| النوع | الوصف |
|---|---|
| boolean | `true` if the subscription was found and cancelled. `false` if it did not exist. |
Try it live in the BNB Smart Chain playground.
| الكود | الرسالة | السبب |
|---|---|---|
-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. |
المعاملات
The hex subscription ID returned by eth_subscribe.