JSON-RPC
Metode JSON-RPC yang didukung, bobot CU, dan kode error. Siapkan endpoint, pilih rantai, dan periksa ketersediaan metode, harga, serta aturan penagihan.
Ikhtisar
Semua permintaan dihitung dalam Compute Unit (CU) dan dibatasi laju per kunci.
- Endpoint:
POST /v1/{chain}/{api_key}(kunci di path) atauPOST /v1/{chain}(kunci di header). Untuk Robinhood Chain,{chain}adalahrobinhood_mainnet:https://api.blockvectra.com/v1/robinhood_mainnet. API key yang sama berfungsi di setiap rantai yang didukung - Protokol: HTTP
POST, panggilan tunggal atau batch - Pengukuran: Total biaya CU permintaan dihitung terhadap kapasitas burst kunci Anda segera setelah tiba. Setiap panggilan yang diterima dan mendapatkan respons akan ditagih sesuai bobot CU yang dipublikasikan; Referensi error mencantumkan kasus yang tidak ditagih. Penagihan diselesaikan setiap jam (dibulatkan ke bawah ke unit utuh, sisa dipindahkan ke periode berikutnya, dijalankan ~15 menit setelah periode berakhir)
- Ethereum: daftar metodenya sendiri dan jendela status yang ditentukan oleh
state_window_blocks— lihat Rantai yang Didukung → Ethereum.
Untuk skema parameter lengkap, tanda tangan metode, dan pengujian permintaan interaktif di semua metode, lihat Referensi Lengkap. Untuk penerapan versi path, aturan kompatibilitas mundur, dan rekomendasi SDK, lihat Penerapan versi dan kompatibilitas API.
Untuk mendapatkan API key dan mengirim permintaan pertama, lihat Mulai Cepat; bagian ini juga membahas pengiriman kunci dan permintaan batch.
Panggilan umum
Contoh praktis untuk panggilan umum.
Kueri log (eth_getLogs)
Filter log kontrak pada rentang blok terkini — di sini, peristiwa ERC-20 Transfer (topik 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef). Lihat tabel Aturan pengukuran CU di bawah untuk bobot CU saat ini dari eth_getLogs; rentang yang lebih luas dari max_logs_block_range rantai (dari GET /v1/chains) akan ditolak dengan -32602.
export BLOCKVECTRA_API_KEY=rgw_your_api_key
curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H "x-api-key: $BLOCKVECTRA_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getLogs",
"params": [{
"fromBlock": "0x45a2409",
"toBlock": "0x45a2609",
"address": "0x1111111111111111111111111111111111111111",
"topics": ["0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"]
}],
"id": 1
}'Lacak transaksi (debug_traceTransaction)
Lacak panggilan internal transaksi dengan callTracer. Lihat tabel Aturan pengukuran CU di bawah untuk bobot CU saat ini dari debug_traceTransaction. Seperti metode pembacaan status lainnya, metode ini ditolak saat blok target berada di luar jendela status terkini rantai (-32011). Ukuran jendela adalah state_window_blocks rantai (dari GET /v1/chains). Pada rantai yang menyediakan trace, gunakan Data API untuk trace historis.
export BLOCKVECTRA_API_KEY=rgw_your_api_key
curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
-H 'Content-Type: application/json' \
-H "x-api-key: $BLOCKVECTRA_API_KEY" \
-d '{
"jsonrpc": "2.0",
"method": "debug_traceTransaction",
"params": ["0xYOUR_TRANSACTION_HASH", {"tracer": "callTracer"}],
"id": 1
}'Aturan pengukuran CU
Bobot Compute Unit (CU) untuk setiap metode JSON-RPC.
| Metode | Bobot (CU) |
|---|---|
eth_blockNumber | 1 |
eth_chainId | 1 |
eth_getBlockByNumber | 5 |
eth_blobBaseFee | 10 |
eth_feeHistory | 10 |
eth_gasPrice | 10 |
eth_getBalance | 10 |
eth_getBlockByHash | 10 |
eth_getBlockReceipts | 10 |
eth_getBlockTransactionCountByHash | 10 |
eth_getBlockTransactionCountByNumber | 10 |
eth_getCode | 10 |
eth_getHeaderByHash | 10 |
eth_getHeaderByNumber | 10 |
eth_getProof | 10 |
eth_getRawTransactionByBlockHashAndIndex | 10 |
eth_getRawTransactionByBlockNumberAndIndex | 10 |
eth_getRawTransactionByHash | 10 |
eth_getStorageAt | 10 |
eth_getTransactionByBlockHashAndIndex | 10 |
eth_getTransactionByBlockNumberAndIndex | 10 |
eth_getTransactionByHash | 10 |
eth_getTransactionCount | 10 |
eth_getTransactionReceipt | 10 |
eth_getUncleByBlockHashAndIndex | 10 |
eth_getUncleByBlockNumberAndIndex | 10 |
eth_getUncleCountByBlockHash | 10 |
eth_getUncleCountByBlockNumber | 10 |
eth_maxPriorityFeePerGas | 10 |
eth_syncing | 10 |
net_version | 10 |
web3_clientVersion | 10 |
web3_sha3 | 10 |
eth_call | 15 |
eth_createAccessList | 20 |
eth_estimateGas | 20 |
eth_simulateV1 | 20 |
eth_getLogs | 30 |
eth_sendRawTransaction | 30 |
debug_traceBlockByHash | 100 |
debug_traceBlockByNumber | 100 |
debug_traceCall | 100 |
debug_traceTransaction | 100 |
trace_block | 100 |
trace_call | 100 |
trace_get | 100 |
trace_replayTransaction | 100 |
trace_transaction | 100 |
Kebijakan metode
Metode yang tersedia bervariasi menurut rantai; daftar setiap rantai ditampilkan di bawah, dan Rantai yang Didukung mencakup informasi lainnya. Hanya metode yang cocok dengan nama atau pola yang diizinkan yang dapat dijangkau; metode lainnya mengembalikan -32601 method not available.
Diizinkan di semua rantai di bawah ini
eth_blockNumbereth_calleth_chainIdeth_estimateGaseth_feeHistoryeth_gasPriceeth_getBalanceeth_getBlockByHasheth_getBlockByNumbereth_getBlockReceiptseth_getBlockTransactionCountByHasheth_getBlockTransactionCountByNumbereth_getCodeeth_getLogseth_getStorageAteth_getTransactionByBlockHashAndIndexeth_getTransactionByBlockNumberAndIndexeth_getTransactionByHasheth_getTransactionCounteth_getTransactionReceipteth_maxPriorityFeePerGaseth_syncingnet_versionweb3_clientVersion
Arbitrum One
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 6,000 blok
Juga diizinkan
debug_traceBlockByHashdebug_traceBlockByNumberdebug_traceCalldebug_traceTransactioneth_blobBaseFeeeth_createAccessListeth_getHeaderByHasheth_getHeaderByNumbereth_getProofeth_getRawTransactionByBlockHashAndIndexeth_getRawTransactionByBlockNumberAndIndexeth_getRawTransactionByHasheth_getUncleByBlockHashAndIndexeth_getUncleByBlockNumberAndIndexeth_getUncleCountByBlockHasheth_getUncleCountByBlockNumbereth_sendRawTransactioneth_simulateV1web3_sha3
Base
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 10,000 blok
Juga diizinkan
eth_blobBaseFeeeth_createAccessListeth_getProofeth_simulateV1eth_getRawTransactionByHasheth_getRawTransactionByBlockHashAndIndexeth_getRawTransactionByBlockNumberAndIndexeth_getUncleCountByBlockNumbereth_getUncleCountByBlockHasheth_getUncleByBlockNumberAndIndexeth_getUncleByBlockHashAndIndexeth_getHeaderByNumbereth_getHeaderByHasheth_sendRawTransactionweb3_sha3
BNB Smart Chain
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 100 blok
Juga diizinkan
eth_sendRawTransaction
Ethereum
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 250,000 blok
Juga diizinkan
debug_traceBlockByHashdebug_traceBlockByNumberdebug_traceCalldebug_traceTransactioneth_blobBaseFeeeth_createAccessListeth_getProofeth_sendRawTransactiontrace_blocktrace_calltrace_gettrace_replayTransactiontrace_transactionweb3_sha3
Ethereum Sepolia
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: —
Juga diizinkan
eth_blobBaseFeeeth_createAccessListeth_getProofeth_sendRawTransactionweb3_sha3
HyperEVM
Pengiriman transaksi belum didukung di rantai ini (eth_sendRawTransaction mengembalikan -32601 method_not_allowed); metode baca berfungsi normal.
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: —
Polygon
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 126 blok
Juga diizinkan
debug_traceBlockByHashdebug_traceBlockByNumberdebug_traceCalldebug_traceTransactioneth_blobBaseFeeeth_createAccessListeth_getHeaderByHasheth_getHeaderByNumbereth_getProofeth_getRawTransactionByBlockHashAndIndexeth_getRawTransactionByBlockNumberAndIndexeth_getRawTransactionByHasheth_getUncleByBlockHashAndIndexeth_getUncleByBlockNumberAndIndexeth_getUncleCountByBlockHasheth_getUncleCountByBlockNumbereth_sendRawTransactioneth_simulateV1web3_sha3
Robinhood Chain
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 900 blok
Juga diizinkan
eth_blobBaseFeeeth_createAccessListeth_getProofeth_simulateV1eth_getRawTransactionByHasheth_getRawTransactionByBlockHashAndIndexeth_getRawTransactionByBlockNumberAndIndexeth_getUncleCountByBlockNumbereth_getUncleCountByBlockHasheth_getUncleByBlockNumberAndIndexeth_getUncleByBlockHashAndIndexeth_getHeaderByNumbereth_getHeaderByHasheth_sendRawTransactionweb3_sha3debug_traceTransactiondebug_traceCalldebug_traceBlockByNumberdebug_traceBlockByHash
Robinhood Chain Testnet
Rentang blok maksimum eth_getLogs: 1,000 blok; Jendela status: 1,023 blok
Juga diizinkan
debug_traceBlockByHashdebug_traceBlockByNumberdebug_traceCalldebug_traceTransactioneth_blobBaseFeeeth_createAccessListeth_getHeaderByHasheth_getHeaderByNumbereth_getProofeth_getRawTransactionByBlockHashAndIndexeth_getRawTransactionByBlockNumberAndIndexeth_getRawTransactionByHasheth_getUncleByBlockHashAndIndexeth_getUncleByBlockNumberAndIndexeth_getUncleCountByBlockHasheth_getUncleCountByBlockNumbereth_sendRawTransactioneth_simulateV1web3_sha3
Batas:
- Batch: maksimal 100 panggilan per permintaan; juga dibatasi oleh burst CU kunci, lihat di bawah.
- Body permintaan: maksimal 2 MiB
- Burst CU: setiap API key memiliki bucket CU (pengisian ulang
cu_per_sec, kapasitasburst_cu— default adalah 400 CU/dtk dan burst 1,600 CU; ditampilkan per kunci di tabel Keys konsol). Permintaan tunggal — termasuk seluruh batch JSON-RPC — yang total CU-nya melebihi kapasitas burst kunci akan ditolak dengan-32022 request_exceeds_burst(request cost <N> CU exceeds burst capacity <M> CU); bagi menjadi beberapa batch yang lebih kecil.
Kode error
Lihat Referensi error untuk setiap kode error, apakah ditagih, dan apa yang harus dilakukan.
Referensi OpenAPI lengkap
Lihat Referensi OpenAPI lengkap untuk spesifikasi lengkap yang dapat dibaca mesin beserta semua tanda tangan metode, skema permintaan dan respons, serta detail parameter yang dirender secara interaktif.
Terakhir diperbarui: