Khối API
blocksĐọc bản ghi khối đã xác nhận theo số khối hoặc mã băm, kèm theo mốc thời gian, số lượng giao dịch và số liệu gas.
Endpoint
| Phương thức | Đường dẫn | Mô tả | CU / Lệnh gọi | USD / 1 triệu lệnh gọi | Lệnh gọi mỗi chu kỳ miễn phí (ước tính) |
|---|---|---|---|---|---|
| GET | /{chain}/blocks/{number} | Lấy khối theo số khối | 5 | $0.50 | 6,000,000 |
| GET | /{chain}/blocks/hash/{hash} | Lấy khối theo mã băm | 5 | $0.50 | 6,000,000 |
Đồng thời chịu giới hạn 25 lệnh gọi mỗi giây.
Các trường phản hồi
GET/{chain}/blocks/{number}
| Trường | Kiểu |
|---|---|
| number | integer |
| hash | string |
| parent_hash | string |
| timestamp | string |
| miner | string |
| gas_limit | integer |
| gas_used | integer |
| base_fee_per_gas | string | null |
| state_root | string |
| transactions_root | string |
| receipts_root | string |
| tx_count | integer |
| size | integer |
| l1_block_number | integer | null |
| extra | object |
GET/{chain}/blocks/hash/{hash}
| Trường | Kiểu |
|---|---|
| number | integer |
| hash | string |
| parent_hash | string |
| timestamp | string |
| miner | string |
| gas_limit | integer |
| gas_used | integer |
| base_fee_per_gas | string | null |
| state_root | string |
| transactions_root | string |
| receipts_root | string |
| tx_count | integer |
| size | integer |
| l1_block_number | integer | null |
| extra | object |
Khả dụng trên các chuỗi
Ví dụ nhanh
curl -s "https://api.blockvectra.com/v1/data/base_mainnet/blocks/1" -H "x-api-key: {api_key}"Tài liệu
Dùng thử miễn phí bộ dữ liệu này
Nhận 30,000,000 CU khi đăng ký, nạp lại sau mỗi 30 ngày.
Các yêu cầu bị từ chối không bị tính phí, và Data API chỉ tính phí cho các phản hồi thành công.