هذه الصفحة غير متوفرة حاليًا بلغتك المحلية. نحن نعمل جاهدين على إضافة المزيد من اللغات. شاكرين تفهمك ودعمك المستمر لنا.
- What's New
- Service Overview
- Getting Started
- User Guide
- User Guide (Staking Nodes)
-
Developer Guide
-
Ethereum Node Engine
- Introduction
- JSON-RPC API Request Examples
- Application Development
- Smart Contract Development
-
Ethereum APIs
- Dedicated Edition
-
Shared Edition
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- net_version
- net_listening
- TRON Node Engine
-
Polygon PoS
- Polygon PoS Introduction
- HTTP Request Examples
- WebSocket Request Examples
-
Polygon PoS APIs
- Dedicated Edition
-
Shared Edition
-
Ethereum JSON-RPC APIs
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_getTransactionReceiptsByBlock
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_getRootHash
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- Polygon JSON-RPC APIs
-
Ethereum JSON-RPC APIs
-
Arbitrum
- Arbitrum Introduction
- HTTP Request Examples
- WebSocket Request Examples
-
Arbitrum APIs
-
Shared Edition
-
Ethereum JSON-RPC APIs
- eth_blocknumber
- eth_getBlockByNumber
- eth_getUncleByBlockNumberAndIndex
- eth_getUncleByBlockHashAndIndex
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_syncing
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_createAccessList
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
-
Ethereum JSON-RPC APIs
-
Shared Edition
-
BNB Smart Chain
- BNB Smart Chain Introduction
- HTTP Request Examples
- WebSocket Request Examples
-
BNB Smart Chain APIs
- Dedicated Edition
-
Shared Edition
- eth_blocknumber
- eth_getBlockByNumber
- eth_hashrate
- eth_getUncleCountByBlockNumber
- eth_getUncleCountByBlockHash
- eth_getBlockByHash
- eth_getTransactionByHash
- eth_getTransactionCount
- eth_getTransactionByBlockHashAndIndex
- eth_getTransactionByBlockNumberAndIndex
- eth_getBlockTransactionCountByHash
- eth_getBlockTransactionCountByNumber
- eth_syncing
- eth_getTransactionReceipt
- eth_sendRawTransaction
- eth_call
- eth_mining
- eth_estimateGas
- eth_feeHistory
- eth_maxPriorityFeePerGas
- eth_gasPrice
- eth_getBalance
- eth_subscribe
- eth_unsubscribe
- eth_getStorageAt
- eth_accounts
- eth_getCode
- eth_getProof
- eth_getLogs
- eth_getFilterChanges
- eth_getFilterLogs
- eth_newBlockFilter
- eth_newFilter
- eth_newPendingTransactionFilter
- eth_uninstallFilter
- eth_chainId
- web3_sha3
- web3_clientVersion
- txpool_status
- net_listening
- net_version
- Batch Requests
-
Ethereum Node Engine
- API Reference
-
FAQs
-
APIs
- How Do I Determine Whether Flow Control Is Triggered for an API?
- What Are the Flow Control Policies for Full Nodes?
- How Many Methods Can Be Included in a JSON-RPC Batch Request for the Dedicated Version?
- How Many WebSocket Connections Can Be Made Each Time?
- How Do I Use HTTP Endpoints and Authentication Credentials to Access Nodes?
- Staking Nodes
-
APIs
- General Reference
Copied.
eth_subscribe
Introduction
This API creates a new subscription for particular events. The node returns a subscription ID. For each event that matches the subscription, a notification with relevant data is sent together with the subscription ID. It consumes 120 CUs.
Parameter Description
Parameter |
Type |
Description |
---|---|---|
Event type |
String |
The type of event to listen to. |
Optional parameters |
String |
Optional parameters to include to describe the type of event to listen to (e.g. newHeads, newPendingTransactions, logs). |
Return Value
While the subscription is active, you will receive events formatted as an object described below:
- jsonrpc: always 2.0.
- method: always eth_subscription.
- params: an object with the following fields:
- subscription: the subscription ID returned by the API that creates this subscription. This ID will be attached to all received events and can also be used to cancel the subscription using eth_unsubscribe.
- result: an object whose contents vary depending on the event type.
Request
wscat -c wss://your-http-endpoint/v1/<API-KEY> -x '{"jsonrpc":"2.0", "id": 1, "method": "eth_subscribe", "params": ["logs"]}'
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot