เชนที่รองรับ

เครือข่ายบล็อกเชนที่รองรับ, Chain ID, โครงสร้าง URL และความพร้อมใช้งานของฟีเจอร์ ตรวจสอบ endpoint, เมธอด และความครอบคลุมของชุดข้อมูลในแต่ละเชน

BlockVectra คือผู้ให้บริการข้อมูลบล็อกเชนแบบมัลติเชน: รองรับ JSON-RPC ในทุกเชนที่เราสนับสนุน และรองรับ Data API ในเชนที่เปิดให้บริการ

คีย์เดียว ใช้ได้ทุกเชน

  • คีย์เดียวใช้ได้ทุกเครือข่าย: API key เดียวกันสามารถใช้ได้กับทุกเครือข่ายบล็อกเชนที่ BlockVectra รองรับ โดยไม่ต้องแยกคีย์ตามเชน
  • ระบุเชนใน URL: ทุกคำขอจะระบุชื่อเชนอย่างชัดเจนผ่านส่วนพาธ {chain}
  • การใช้งานรวมข้ามเชน: ยอดคงเหลือของบัญชี, บักเก็ตจำกัดอัตรา Compute Unit (CU) และขีดจำกัดคำขอต่อวินาทีของแพ็กเกจฟรีจะแชร์ร่วมกันในทุกเชน
  • ราคา: ดูที่ หน้าแสดงราคา

ทดลองใช้โดยไม่ต้องมี API key

เลือก public RPC endpoint ฟรี สำหรับเมธอดของกระเป๋าเงินโดยไม่ต้องใช้ API key โดยมีการแสดงรายการเมธอดสาธารณะและขีดจำกัดต่อ IP แยกตามเครือข่าย โปรดดู เริ่มต้นใช้งานอย่างรวดเร็ว สำหรับตัวอย่างการเรียกใช้งาน

เทมเพลต URL

โครงสร้าง URL มาตรฐานสำหรับการเรียกใช้ JSON-RPC และ Data API:

บริการโหมดเทมเพลต URLหมายเหตุ
JSON-RPCคีย์ในพาธPOST /v1/{chain}/{api_key}รูปแบบที่ง่ายที่สุด แนะนำสำหรับ curl และ HTTP client
JSON-RPCคีย์ในส่วนหัวPOST /v1/{chain}ส่งคีย์ในส่วนหัวคำขอ x-api-key: {api_key}
Data APIREST endpointGET /v1/data/{chain}/…ส่งคีย์ในส่วนหัวคำขอ x-api-key
StatusสถานะสาธารณะGET /v1/statusไม่ต้องใช้คีย์ ส่งคืนสถานะและบล็อกล่าสุดของแต่ละเชนสาธารณะ

หมายเหตุ: คำขอที่ไม่มีส่วนระบุเชน (เช่น POST /v1 หรือ POST /v1/) จะส่งคืน HTTP 404 พร้อมเนื้อหาว่างเปล่า (empty body) ดูรายละเอียดการตั้งค่าได้ที่ เริ่มต้นใช้งานอย่างรวดเร็ว

เมทริกซ์เชนที่รองรับ

เครือข่ายบล็อกเชนที่พร้อมใช้งานในปัจจุบันบน BlockVectra พร้อมความสามารถในการให้บริการ:

แสดง endpoint, เมธอดที่ใช้ API key, การสมัครรับข้อมูล (subscription), การส่งธุรกรรม, ขีดจำกัดของสถานะและบันทึก (logs), ชุดข้อมูล, เทสต์เน็ตที่เกี่ยวข้อง และคู่มือแยกตามแต่ละเชน ข้อมูลที่ไม่ทราบจะยังคงแสดงว่าไม่ทราบ สามารถขยายดูรายละเอียดของเชนใต้เมทริกซ์เพื่อดูตัวอย่างคำขอที่เชนนั้นรองรับ

เชน{chain}Chain IDTracingEndpoint สาธารณะWebSocketData APIจำนวนเมธอดที่ใช้ API keyWebhook pushส่งธุรกรรมส่งธุรกรรม (endpoint สาธารณะแบบไม่ต้องใช้ API key)ช่วงประวัติสถานะช่วงบล็อกสูงสุดของ eth_getLogsชุดข้อมูล Data APItestnet ที่เกี่ยวข้องคู่มือที่เกี่ยวข้อง
RPC และ Data API ของ arb_mainnetarb_mainnet42161✓https://api.blockvectra.com/v1/arb_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ43รองรับ · การยืนยัน 1–120 (ค่าเริ่มต้น 120)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 5,000 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC ของ arc_mainnetarc_mainnet5042—https://api.blockvectra.com/v1/arc_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับไม่ระบุ1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ avax_mainnetavax_mainnet43114✓https://api.blockvectra.com/v1/avax_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน41ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 128 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC และ Data API ของ base_mainnetbase_mainnet8453—https://api.blockvectra.com/v1/base_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ39รองรับ · การยืนยัน 1–519 (ค่าเริ่มต้น 1)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 10,000 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุBase
RPC ของ berachain_mainnetberachain_mainnet80094—https://api.blockvectra.com/v1/berachain_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 9,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ boba_mainnetboba_mainnet288—https://api.blockvectra.com/v1/boba_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 80,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC และ Data API ของ bsc_mainnetbsc_mainnet56—https://api.blockvectra.com/v1/bsc_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ25รองรับ · การยืนยัน 1–2 (ค่าเริ่มต้น 1)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 100 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC ของ celo_mainnetcelo_mainnet42220—https://api.blockvectra.com/v1/celo_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 864,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC และ Data API ของ Ethereumeth_mainnet1✓https://api.blockvectra.com/v1/eth_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ38รองรับ · การยืนยัน 1–82 (ค่าเริ่มต้น 6)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 250,000 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC และ Data API ของ eth_sepoliaeth_sepolia11155111—https://api.blockvectra.com/v1/eth_sepolia/publicรองรับ (newHeads, logs)เปิดให้บริการ29รองรับ · การยืนยัน 1–67 (ค่าเริ่มต้น 6)
คู่มือ Webhook push
รองรับรองรับไม่ระบุ1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC ของ fraxtal_mainnetfraxtal_mainnet252—https://api.blockvectra.com/v1/fraxtal_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 10,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC และ Data API ของ gnosis_mainnetgnosis_mainnet100—https://api.blockvectra.com/v1/gnosis_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 262,000 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC และ Data API ของ HyperEVMhyperevm_mainnet999—https://api.blockvectra.com/v1/hyperevm_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ25รองรับ · การยืนยัน 1–1 (ค่าเริ่มต้น 1)
คู่มือ Webhook push
รองรับไม่รองรับไม่ระบุ1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุการดึงข้อมูลย้อนหลังและการโพลล์ HyperEVM
RPC ของ ink_mainnetink_mainnet57073—https://api.blockvectra.com/v1/ink_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 9,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุInk pool discovery
RPC ของ katana_mainnetkatana_mainnet747474—https://api.blockvectra.com/v1/katana_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 86,400 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ linea_mainnetlinea_mainnet59144—https://api.blockvectra.com/v1/linea_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 128 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ metall2_mainnetmetall2_mainnet1750—https://api.blockvectra.com/v1/metall2_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 10,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ mode_mainnetmode_mainnet34443—https://api.blockvectra.com/v1/mode_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 10,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC และ Data API ของ op_mainnetop_mainnet10—https://api.blockvectra.com/v1/op_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 1,296,000 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC และ Data API ของ polygon_mainnetpolygon_mainnet137✓https://api.blockvectra.com/v1/polygon_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ43รองรับ · การยืนยัน 1–200 (ค่าเริ่มต้น 200)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 126 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, ความสดใหม่ของข้อมูลไม่ระบุไม่ระบุ
RPC และ Data API ของ Robinhood Chainrobinhood_mainnet4663✓https://api.blockvectra.com/v1/robinhood_mainnet/publicรองรับ (newHeads, logs)เปิดให้บริการ43รองรับ · การยืนยัน 1–1 (ค่าเริ่มต้น 1)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 900 บล็อกล่าสุด1,000 บล็อกบล็อก, ธุรกรรม, ธุรกรรมของแอดเดรส, การโอน, เมทาดาตาของโทเค็น, การสวอป DEX, หุ้นโทเค็น, Trace, ความสดใหม่ของข้อมูลไม่ระบุHoodFi name records
Robinhood Chain

ตัวคูณโทเค็นหุ้น

หุ้นโทเค็น
RPC ของ robinhood_testnetrobinhood_testnet46630✓https://api.blockvectra.com/v1/robinhood_testnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน43รองรับ · การยืนยัน 1–1 (ค่าเริ่มต้น 1)
คู่มือ Webhook push
รองรับรองรับสถานะย้อนหลังสำหรับ 1,023 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุคู่มือ testnet faucet
คู่มือเริ่มต้นสำหรับ Robinhood Chain Testnet
RPC ของ rootstock_mainnetrootstock_mainnet30—https://api.blockvectra.com/v1/rootstock_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน27ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 6,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ soneium_mainnetsoneium_mainnet1868—https://api.blockvectra.com/v1/soneium_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 9,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ sonic_mainnetsonic_mainnet146✓https://api.blockvectra.com/v1/sonic_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน43ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 11,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ unichain_mainnetunichain_mainnet130—https://api.blockvectra.com/v1/unichain_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 85,500 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ world_mainnetworld_mainnet480—https://api.blockvectra.com/v1/world_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 30,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ xlayer_mainnetxlayer_mainnet196✓https://api.blockvectra.com/v1/xlayer_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน43ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 250,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ
RPC ของ zora_mainnetzora_mainnet7777777—https://api.blockvectra.com/v1/zora_mainnet/publicรองรับ (newHeads, logs)ยังไม่พร้อมใช้งาน39ไม่รองรับรองรับรองรับสถานะย้อนหลังสำหรับ 10,000 บล็อกล่าสุด1,000 บล็อกไม่รองรับไม่ระบุไม่ระบุ

ขั้นตอนถัดไปเมื่อมี API key

arb_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/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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/arb_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

avax_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

base_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/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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/base_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

boba_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

bsc_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/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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/bsc_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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

การใช้งานและ CU · เติมเงิน

Ethereum

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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/eth_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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 · เติมเงิน

eth_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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/eth_sepolia/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

gnosis_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/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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/gnosis_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

HyperEVM

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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/hyperevm_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

katana_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

linea_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

metall2_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

mode_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

op_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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/op_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

polygon_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/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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/polygon_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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" logs
eth_getLogs

Data API

curl -fsS 'https://api.blockvectra.com/v1/data/robinhood_mainnet/status/freshness' -H "x-api-key: $BLOCKVECTRA_API_KEY"
Data API

WebSocket

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_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" logs
eth_getLogs

WebSocket

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_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

soneium_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

sonic_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

unichain_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

world_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

xlayer_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

zora_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/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" logs
eth_getLogs

WebSocket

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'
WebSocket

การใช้งานและ CU · เติมเงิน

HyperEVM

บล็อก HyperEVM รวมธุรกรรมระบบของ HyperCore (จากแอดเดรส 0x2222…2222 หรือ 0x20…, gasPrice 0)

Ethereum

  • Chain ID: 1
  • ชื่อเชน ({chain} ใน URL): eth_mainnet เช่น POST /v1/eth_mainnet/{api_key} หรือ GET /v1/data/eth_mainnet/…

JSON-RPC

  • เมธอด: เมธอดที่พร้อมใช้งานสำหรับแต่ละเชนจะกำหนดโดย methods.allow / deny ใน GET /v1/chains (ดู นโยบายเมธอด) เมธอดที่อยู่นอกเหนือขอบเขตดังกล่าวจะส่งคืน -32601
  • เฉพาะข้อมูลล่าสุด: หน้าต่างสถานะย้อนหลังจะกำหนดโดย state_window_blocks ใน GET /v1/chains การค้นหาสถานะย้อนหลังที่อยู่นอกหน้าต่างจะส่งคืน -32011 (ไม่คิดค่าบริการ); การค้นหาบล็อก, ใบเสร็จ (receipt) และบันทึก (log) นอกหน้าต่างจะส่งคืน -32000 old data not available due to pruning (ไม่คิดค่าบริการ); การค้นหาธุรกรรมด้วยแฮชนอกหน้าต่างจะส่งคืน result: null
  • eth_getLogs: ช่วงบล็อกสูงสุดต่อคำขอกำหนดโดย max_logs_block_range ใน GET /v1/chains

Data API

  • เฉพาะข้อมูลล่าสุด: ความครอบคลุมของข้อมูล Ethereum กำหนดโดย coverage.from_block ใน GET /v1/data/chains หมายเลขบล็อกหรือช่วงที่ต่ำกว่าจุดเริ่มต้นจะส่งคืน 422 no_coverage; แฮชธุรกรรมที่หลุดออกจากหน้าต่างไปแล้วจะส่งคืน 404
  • เมื่อ from_block เป็น null: จุดเริ่มต้นจะไม่ทราบค่าชั่วคราว อย่าถือว่าเป็น 0 หรือเป็นประวัติทั้งหมด และอย่าส่งคำขอย้อนหลัง (ตามหมายเลขบล็อก, ช่วง หรือแฮช) สำหรับ Ethereum จนกว่าค่านี้จะกลับมาเป็นจำนวนเต็มอีกครั้ง คำขอเหล่านี้จะส่งคืน 503 unavailable
  • 503 gateway_overloaded: ลองใหม่อีกครั้งพร้อม backoff (Retry-After: 1)
  • ชุดข้อมูล: ชุดข้อมูลที่ Ethereum ให้บริการจะระบุไว้ใน features ของ GET /v1/data/chains; ชุดข้อมูลอื่นจะส่งคืน 422 no_coverage (ไม่คิดค่าบริการ) ธุรกรรมและการโอนของแอดเดรสจะครอบคลุมเฉพาะในหน้าต่างเท่านั้น: การตอบกลับที่คร่อมจุดเริ่มต้นจะถูกระบุเป็น meta.coverage: "partial"

การค้นหาเชนโดยใช้โปรแกรม

ใช้ endpoint สาธารณะเหล่านี้เพื่อค้นหาเชนที่รองรับและสถานะของเชน:

1. สถานะการให้บริการ (GET /v1/status)

endpoint สาธารณะที่ไม่ต้องใช้ 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)

ต้องระบุ API key ในส่วนหัว x-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 และทั้งสองค่าจะเป็น null เฉพาะเมื่อสถานะเป็น "unavailable")

coverage.from_block คือบล็อกต่ำสุดที่ได้รับการทำดัชนี ซึ่งอ่านค่าแบบเรียลไทม์ โดยจะมีค่าเป็น 0 เมื่อประวัติของเชนครอบคลุมไปถึงบล็อกแรก (genesis) ค่านี้จะเป็น null ได้ก็ต่อเมื่อเชนไม่มีบล็อกที่ได้รับการทำดัชนีเลย (has_data = false) หรือในระหว่างที่ไม่สามารถระบุจุดเริ่มต้นได้: ให้ถือว่า null คือไม่ทราบค่า — ไม่ใช่ประวัติที่สมบูรณ์และไม่ใช่ 0 — และคำขอย้อนหลังจะส่งคืน 503 unavailable โปรดอ่านค่าจาก endpoint นี้ระหว่างรันไทม์เสมอแทนที่จะฮาร์ดโค้ดค่าไว้ สำหรับ coverage.traces_from_block คือบล็อกแรกที่มีข้อมูล trace โดยคำขอ trace ก่อนหน้าบล็อกนี้ หรือที่อยู่ในช่วงที่มีช่องว่าง จะส่งคืน 422 no_coverage (ไม่คิดค่าบริการ)

การเรียกใช้ /v1/data/{chain}/… ด้วยเชนที่ไม่รู้จักหรือไม่เปิดเผยต่อสาธารณะจะส่งคืน HTTP 404 พร้อม error.code เป็น not_found (ไม่คิดค่าบริการ; ชื่อเชนต้องเป็น slug ตัวพิมพ์เล็กที่ตรงกันทุกประการ)

อัปเดตล่าสุด:

ในหน้านี้