eth_getBlockByHash

EthereumC1

Returns block information by block hash. Like eth_getBlockByNumber, the second parameter selects full transaction objects or hashes.

Endpoint
POST https://api.1st-node.com/v1/ethereum/rpc

Parameters

NameTypeDescription
hashDATA, 32 bytesBlock hash.
fullTxBooleantrue for full transaction objects, false for hashes.

Returns

Object — the block, or null if not found.

Request

curl https://api.1st-node.com/v1/ethereum/rpc \
  -H "Authorization: Bearer $ONE_KEY" \
  -H "content-type: application/json" \
  -d '{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": ["0xbf2…", false]
}'
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getBlockByHash",
  "params": ["0xbf2…", false]
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": { "number": "0x12d4e2a", "hash": "0xbf2…", "transactions": ["0x…"] }
}
More blocks methods on Ethereum

Ethereum API

チャージして、キーを取得し、リリース。

セルフサーブ。暗号資産またはカードで支払い。クレジットで従量課金——重いプリミティブは高く、単純なものは安価。

APIキーを取得