Last updated on October 24, 2023
1 min read
API 方法(JSON-RPC、REST、WebSockets 等)
每個節點都有自己的一套與區塊鍊網絡交互的方法。 您可以在此處找到 GetBlock 支持的每個節點的文檔。 選擇所需的節點,然後點擊“API 文檔”部分中提供的方法的鏈接。
例如,您可以獲取有關以太坊網絡中最後一個區塊的信息,如下所示:
curl --location --request POST 'https://go.getblock.io//' \ --header 'Content-Type: application/json' \ --data-raw '{ "id": "blockNumber", "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["latest", false] }'
Previous
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }
Next
{ "overview": "Overview", "guides": "Guides", "get-started": "Get Started", "rpc-service": "Nodes Methods", "getblock-explorer": "Explorer API", "getblock-tracker": "Tracker API", "nodes-endpoints": "Nodes Endpoints" }