支持的链
按链查看支持的区块链网络、Chain ID与端点地址,同一个API key可跨链调用JSON-RPC与Data API。每条链的可用方法与历史状态窗口以GET /v1/chains为准,超出窗口的请求会被拒绝并且不计费。
BlockVectra 是多链区块链数据服务商:所有支持链提供 JSON-RPC,Data API 在已开放的链上可用。
一个 key,所有链
- 全链通用:同一个 API key 可用于 BlockVectra 支持的所有区块链网络,无需为每条链单独申请 key。
- URL 标明链名:每次请求都通过
{chain}路径段显式指定链。 - 用量跨链合计:账户余额、CU 限流桶与免费档每秒调用数不分链,按跨链合计。
- 价格:详见定价页。
免 key 试用
选择免费公共 RPC 节点,无需 API key 即可调用钱包常用方法。按网络查看公共方法与按 IP 限额,调用示例见快速上手。
URL 模板
调用 JSON-RPC 与 Data API 的标准 URL 结构:
| 服务 | 接入方式 | URL 模板 | 说明 |
|---|---|---|---|
| JSON-RPC | key 放在路径中 | POST /v1/{chain}/{api_key} | 最简形式,适合 curl 与 HTTP 客户端 |
| JSON-RPC | key 放在请求头中 | POST /v1/{chain} | 在 x-api-key: {api_key} 请求头中传入 key |
| Data API | REST 端点 | GET /v1/data/{chain}/… | 在 x-api-key 请求头中传入 key |
| 状态 | 公开状态 | GET /v1/status | 无需 key,返回各已公开链的状态与链头 |
注意:不带链段的请求(如
POST /v1或POST /v1/)返回 HTTP 404 且响应体为空。调用方式详见快速上手。
支持的链矩阵
下表列出 BlockVectra 当前已开放的区块链网络及其服务能力:
逐链查看公开端点、带 key 方法数、订阅类型、发交易能力、状态窗口与日志跨度、数据集、相关测试网和教程。未知字段显示为未知;展开矩阵下方的链可查看该链支持的请求示例。
本表中的状态与日志限制仅适用于使用 API key 的请求。公共端点有各自独立的方法、历史和日志限制,可通过 GET /v1/chains 查看。在公共端点上查询日志前,请先查看 public.methods、public.history_blocks 和 public.logs,并以 public.logs.max_block_range 和 public.logs.max_results 为准,而不是顶层的 max_logs_block_range。
| 链 | {chain} | Chain ID | Tracing | 公开端点 | WebSocket | Data API | 带 key 方法数 | Webhook 推送 | 发送交易 | 发送交易(免 key 公开端点) | 历史状态窗口 | eth_getLogs 单次最大区块跨度 | Data API 数据集 | 相关测试网 | 相关教程 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Arbitrum One RPC 与 Data API | arb_mainnet | 42161 | ✓ | https://api.blockvectra.com/v1/arb_mainnet/public | 支持 (newHeads, logs) | 已开放 | 43 | 支持 · 确认数 1–120(默认 120) Webhook 推送指南 | 支持 | 支持 | 最近 5,000 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Arc RPC | arc_mainnet | 5042 | — | https://api.blockvectra.com/v1/arc_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 未知 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Avalanche C-Chain RPC | avax_mainnet | 43114 | ✓ | https://api.blockvectra.com/v1/avax_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 41 | 不支持 | 支持 | 支持 | 最近 128 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Base RPC 与 Data API | base_mainnet | 8453 | — | https://api.blockvectra.com/v1/base_mainnet/public | 支持 (newHeads, logs) | 已开放 | 39 | 支持 · 确认数 1–519(默认 1) Webhook 推送指南 | 支持 | 支持 | 最近 10,000 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | Base |
| Berachain RPC | berachain_mainnet | 80094 | — | https://api.blockvectra.com/v1/berachain_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 9,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Boba RPC | boba_mainnet | 288 | — | https://api.blockvectra.com/v1/boba_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 80,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| BNB Smart Chain RPC 与 Data API | bsc_mainnet | 56 | — | https://api.blockvectra.com/v1/bsc_mainnet/public | 支持 (newHeads, logs) | 已开放 | 25 | 支持 · 确认数 1–2(默认 1) Webhook 推送指南 | 支持 | 支持 | 最近 100 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Celo RPC | celo_mainnet | 42220 | — | https://api.blockvectra.com/v1/celo_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 864,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| 以太坊 RPC 与 Data API | eth_mainnet | 1 | ✓ | https://api.blockvectra.com/v1/eth_mainnet/public | 支持 (newHeads, logs) | 已开放 | 38 | 支持 · 确认数 1–82(默认 6) Webhook 推送指南 | 支持 | 支持 | 最近 250,000 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Ethereum Sepolia RPC 与 Data API | eth_sepolia | 11155111 | — | https://api.blockvectra.com/v1/eth_sepolia/public | 支持 (newHeads, logs) | 已开放 | 29 | 支持 · 确认数 1–67(默认 6) Webhook 推送指南 | 支持 | 支持 | 未知 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Fraxtal RPC | fraxtal_mainnet | 252 | — | https://api.blockvectra.com/v1/fraxtal_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 10,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Gnosis RPC 与 Data API | gnosis_mainnet | 100 | — | https://api.blockvectra.com/v1/gnosis_mainnet/public | 支持 (newHeads, logs) | 已开放 | 39 | 不支持 | 支持 | 支持 | 最近 262,000 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| HyperEVM RPC 与 Data API | hyperevm_mainnet | 999 | — | https://api.blockvectra.com/v1/hyperevm_mainnet/public | 支持 (newHeads, logs) | 已开放 | 25 | 支持 · 确认数 1–1(默认 1) Webhook 推送指南 | 支持 | 不支持 | 未知 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | HyperEVM 回填与轮询 |
| Ink RPC | ink_mainnet | 57073 | — | https://api.blockvectra.com/v1/ink_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 9,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | Ink 池发现 |
| Katana RPC | katana_mainnet | 747474 | — | https://api.blockvectra.com/v1/katana_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 86,400 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Linea RPC | linea_mainnet | 59144 | — | https://api.blockvectra.com/v1/linea_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 128 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Metal L2 RPC | metall2_mainnet | 1750 | — | https://api.blockvectra.com/v1/metall2_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 10,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Mode RPC | mode_mainnet | 34443 | — | https://api.blockvectra.com/v1/mode_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 10,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| OP Mainnet RPC 与 Data API | op_mainnet | 10 | — | https://api.blockvectra.com/v1/op_mainnet/public | 支持 (newHeads, logs) | 已开放 | 39 | 不支持 | 支持 | 支持 | 最近 1,296,000 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Polygon RPC 与 Data API | polygon_mainnet | 137 | ✓ | https://api.blockvectra.com/v1/polygon_mainnet/public | 支持 (newHeads, logs) | 已开放 | 43 | 支持 · 确认数 1–200(默认 200) Webhook 推送指南 | 支持 | 支持 | 最近 126 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、数据新鲜度 | 未知 | 未知 |
| Robinhood Chain RPC 与 Data API | robinhood_mainnet | 4663 | ✓ | https://api.blockvectra.com/v1/robinhood_mainnet/public | 支持 (newHeads, logs) | 已开放 | 43 | 支持 · 确认数 1–1(默认 1) Webhook 推送指南 | 支持 | 支持 | 最近 900 个区块的历史状态 | 1,000 个区块 | 区块、交易、地址交易、转账、代币元数据、DEX 成交、代币化股票、Trace、数据新鲜度 | 未知 | HoodFi 名称记录 Robinhood Chain 主网 股票代币乘数与指标 代币化股票指标 |
| Robinhood Chain Testnet RPC | robinhood_testnet | 46630 | ✓ | https://api.blockvectra.com/v1/robinhood_testnet/public | 支持 (newHeads, logs) | 暂未开放 | 43 | 支持 · 确认数 1–1(默认 1) Webhook 推送指南 | 支持 | 支持 | 最近 1,023 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 测试网水龙头 Robinhood Chain 测试网入门 |
| Rootstock RPC | rootstock_mainnet | 30 | — | https://api.blockvectra.com/v1/rootstock_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 27 | 不支持 | 支持 | 支持 | 最近 6,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Soneium RPC | soneium_mainnet | 1868 | — | https://api.blockvectra.com/v1/soneium_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 9,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Sonic RPC | sonic_mainnet | 146 | ✓ | https://api.blockvectra.com/v1/sonic_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 43 | 不支持 | 支持 | 支持 | 最近 11,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Unichain RPC | unichain_mainnet | 130 | — | https://api.blockvectra.com/v1/unichain_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 85,500 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| World Chain RPC | world_mainnet | 480 | — | https://api.blockvectra.com/v1/world_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 30,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| X Layer RPC | xlayer_mainnet | 196 | ✓ | https://api.blockvectra.com/v1/xlayer_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 43 | 不支持 | 支持 | 支持 | 最近 250,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
| Zora RPC | zora_mainnet | 7777777 | — | https://api.blockvectra.com/v1/zora_mainnet/public | 支持 (newHeads, logs) | 暂未开放 | 39 | 不支持 | 支持 | 支持 | 最近 10,000 个区块的历史状态 | 1,000 个区块 | 不支持 | 未知 | 未知 |
拿到 key 之后
Arbitrum One
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/arb_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/arb_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/arb_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/arb_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Arc
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/arc_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/arc_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/arc_mainnet'WebSocketAvalanche C-Chain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/avax_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/avax_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/avax_mainnet'WebSocketBase
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/base_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/base_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/base_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/base_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Berachain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/berachain_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/berachain_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/berachain_mainnet'WebSocketBoba
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/boba_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/boba_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/boba_mainnet'WebSocketBNB Smart Chain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/bsc_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/bsc_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/bsc_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/bsc_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Celo
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/celo_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/celo_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/celo_mainnet'WebSocket以太坊
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/eth_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/eth_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/eth_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/eth_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Ethereum Sepolia
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/eth_sepolia' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/eth_sepolia' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/eth_sepolia/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/eth_sepolia'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Fraxtal
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/fraxtal_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/fraxtal_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/fraxtal_mainnet'WebSocketGnosis
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/gnosis_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/gnosis_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/gnosis_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/gnosis_mainnet'WebSocketHyperEVM
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/hyperevm_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/hyperevm_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/hyperevm_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/hyperevm_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Ink
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/ink_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/ink_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/ink_mainnet'WebSocketKatana
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/katana_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/katana_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/katana_mainnet'WebSocketLinea
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/linea_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/linea_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/linea_mainnet'WebSocketMetal L2
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/metall2_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/metall2_mainnet'WebSocketMode
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/mode_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/mode_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/mode_mainnet'WebSocketOP Mainnet
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/op_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/op_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/op_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/op_mainnet'WebSocketPolygon
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/polygon_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/polygon_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/polygon_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/polygon_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Robinhood Chain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/robinhood_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/robinhood_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogs数据 API
curl -fsS 'https://api.blockvectra.com/v1/data/robinhood_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"数据 APIWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/robinhood_mainnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Robinhood Chain Testnet
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/robinhood_testnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/robinhood_testnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/robinhood_testnet'WebSocket创建 Webhook 订阅 · 创建 Webhook 订阅 · 用量与 CU · 充值
Rootstock
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/rootstock_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/rootstock_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/rootstock_mainnet'WebSocketSoneium
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/soneium_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/soneium_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/soneium_mainnet'WebSocketSonic
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/sonic_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/sonic_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/sonic_mainnet'WebSocketUnichain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/unichain_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/unichain_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/unichain_mainnet'WebSocketWorld Chain
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/world_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/world_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/world_mainnet'WebSocketX Layer
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/xlayer_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/xlayer_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/xlayer_mainnet'WebSocketZora
eth_getLogs
set -eu
: "${BLOCKVECTRA_API_KEY:?BLOCKVECTRA_API_KEY is required}"
validate_response='import json,re,sys
response=json.load(sys.stdin)
if not (type(response) is dict and response.get("jsonrpc")=="2.0" and type(response.get("id")) is int and response["id"]==1 and "error" not in response and "result" in response):
sys.exit("Invalid JSON-RPC response")
result=response["result"]
if sys.argv[1]=="head":
if not (type(result) is str and re.fullmatch(r"0x(?:0|[1-9a-fA-F][0-9a-fA-F]*)",result)):
sys.exit("Invalid block quantity")
print(result)
else:
if not (type(result) is list and all(type(log) is dict for log in result)):
sys.exit("Invalid logs result")
print(json.dumps(response,indent=2))'
head_response=$(curl -fsS 'https://api.blockvectra.com/v1/zora_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' -d '{"jsonrpc":"2.0","id":1,"method":"eth_blockNumber","params":[]}')
head=$(printf '%s' "$head_response" | python3 -c "$validate_response" head)
logs_response=$(curl -fsS 'https://api.blockvectra.com/v1/zora_mainnet' -H "x-api-key: $BLOCKVECTRA_API_KEY" -H 'Content-Type: application/json' \
-d "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"eth_getLogs\",\"params\":[{\"fromBlock\":\"$head\",\"toBlock\":\"$head\"}]}")
printf '%s' "$logs_response" | python3 -c "$validate_response" logseth_getLogsWebSocket
echo '{"jsonrpc":"2.0","id":1,"method":"eth_subscribe","params":["newHeads"]}' | websocat --no-close -H="x-api-key: $BLOCKVECTRA_API_KEY" 'wss://api.blockvectra.com/v1/zora_mainnet'WebSocketHyperEVM
HyperEVM 的区块包含 HyperCore 系统交易(发送方地址为 0x2222…2222 或 0x20…,gasPrice 为 0)。
以太坊
- Chain ID:
1 - 链名(URL 中的
{chain}):eth_mainnet,例如POST /v1/eth_mainnet/{api_key}、GET /v1/data/eth_mainnet/…。
JSON-RPC
- 可用方法:每条链可用的方法以
GET /v1/chains的methods.allow/deny为准(参见方法策略),不在范围内的方法返回-32601。 - 只保留近期数据:历史状态窗口以
GET /v1/chains的state_window_blocks(区块数)为准。超出窗口的历史状态查询返回-32011(不计费);超出窗口的区块、收据与日志查询返回-32000 old data not available due to pruning(不计费);按 hash 查询窗口外的交易返回result: null。 eth_getLogs:单次请求的最大区块跨度以GET /v1/chains的max_logs_block_range为准。
Data API
- 只保留近期数据:以太坊数据窗口以
GET /v1/data/chains的coverage.from_block为准。低于起点的区块号或窗口返回422 no_coverage;已移出窗口的交易哈希返回404。 from_block为null时:起点暂时未知。不要把它当作0或完整历史,在它恢复为整数之前不要对以太坊发送历史请求(按区块号、窗口或哈希),这类请求会返回503 unavailable。503 gateway_overloaded:请退避后重试(Retry-After: 1)。- 数据集:以太坊提供的数据集见
GET /v1/data/chains的features,其余返回422 no_coverage(不计费)。地址交易和转账只覆盖这段时间,跨过起点的响应标记为meta.coverage: "partial"。
用程序发现链
可通过以下公开端点查询已支持的链及其状态:
1. 服务状态(GET /v1/status)
公开端点,无需 API key(CORS *),只列出已公开的链,返回各链的状态与索引链头:
curl -s "https://api.blockvectra.com/v1/status"响应示例:
{
"checked_at": "2026-09-28T07:40:00Z",
"gateway": { "status": "ok" },
"chains": [
{
"chain": "robinhood_mainnet",
"name": "Robinhood Chain",
"chain_id": 4663,
"jsonrpc": true,
"data": true,
"status": "ok",
"data_status": "ok",
"sync": { "stage": "synced", "node_block": 74600000, "target_block": null },
"head": {
"block": 74600000,
"time": "2026-09-28T07:39:58Z",
"lag_seconds": 3
}
},
{
"chain": "eth_mainnet",
"name": "Ethereum",
"chain_id": 1,
"jsonrpc": true,
"data": true,
"status": "ok",
"data_status": "ok",
"sync": { "stage": "synced", "node_block": 26010000, "target_block": null },
"head": {
"block": 26010000,
"time": "2026-09-28T07:39:59Z",
"lag_seconds": 1
}
}
]
}每个元素的 name 始终是该链的英文显示名。jsonrpc 与 data 分别表示该链的 JSON-RPC 与 Data API 是否已开放;status 为 "ok" 或 "unavailable"。若某条链正在同步,该链的调用会返回 -32010。/v1/status 的 status 表示 JSON-RPC 是否正常,data_status 表示 Data API 是否正常("ok" / "syncing" / "unavailable");/v1/data/chains 中 coverage.has_data 为 false 表示该链尚无数据。
2. 查询 Data API 链列表(GET /v1/data/chains)
需在 x-api-key 请求头中传入 API key(计费),仅返回 Data API 公开的链,以及每条链支持的能力(features)、数据覆盖的区块范围(coverage)、节点的共识 safe/finalized 标记与其状态(finality)与单请求上限(limits):
curl -s "https://api.blockvectra.com/v1/data/chains" \
-H "x-api-key: $BLOCKVECTRA_API_KEY"响应示例:
{
"data": [
{
"chain": "robinhood_mainnet",
"chain_slug": "ROBINHOOD_MAINNET",
"name": "Robinhood Chain",
"chain_id": 4663,
"chain_external_id": "eip155:4663",
"features": [
"blocks", "transactions", "address_transactions", "transfers", "token_metadata",
"balances", "holders", "nfts", "dex_swaps", "dex_prices", "stocks", "traces", "freshness"
],
"coverage": { "from_block": 0, "traces_from_block": 1000000, "has_data": true },
"finality": { "model": "node_tags", "status": "ok", "safe_block": 74599400, "finalized_block": 74598900 },
"limits": { "max_page_size": 500, "max_window_blocks": 100000, "max_pools_for_token": 200, "max_batch_addresses": 100 }
},
{
"chain": "eth_mainnet",
"chain_slug": "ETH_MAINNET",
"name": "Ethereum",
"chain_id": 1,
"chain_external_id": "eip155:1",
"features": ["blocks", "transactions", "address_transactions", "transfers", "token_metadata", "freshness"],
"coverage": { "from_block": 1000000, "traces_from_block": null, "has_data": true },
"finality": { "model": "node_tags", "status": "stale", "safe_block": 26009950, "finalized_block": 26009900 },
"limits": { "max_page_size": 500, "max_window_blocks": 100000, "max_pools_for_token": 200, "max_batch_addresses": 100 }
}
]
}finality 包含节点的共识标记(model 为 "node_tags")、标记状态(status 为 "ok"、"stale" 或 "unavailable"),以及当前的 safe_block 与 finalized_block(safe_block >= finalized_block,且仅在状态为 "unavailable" 时两者为 null)。
coverage.from_block 是当前已索引的最低区块,为实时读取。当历史追溯至创世区块时为 0。仅当该链尚无任何已索引区块(has_data = false)或暂时无法确定起始高度时为 null:此时代表未知(不可视为 0 或全量历史),针对该链的历史数据请求将返回 503 unavailable。请在运行时从该端点动态读取,不要硬编码。coverage.traces_from_block 是 trace 数据的起始区块;早于它或落在缺口内的 trace 请求返回 422 no_coverage(不计费)。
调用 /v1/data/{chain}/… 时,若链未知或暂未公开,返回 HTTP 404,error.code 为 not_found(不计费;链名必须为全小写 slug)。
最后更新: