JSON-RPC

JSON-RPC

Desteklenen JSON-RPC yöntemleri, CU ağırlıkları ve hata kodları. Bir uç nokta kurun, bir zincir seçin ve yöntem kullanılabilirliğini, fiyatlandırmayı ve faturalandırma kurallarını kontrol edin.

Genel bakış

Tüm istekler Compute Units (CU) cinsinden sayılır ve anahtar başına hız sınırlamasına tabidir.

  • Uç nokta: POST /v1/{chain}/{api_key} (yolda anahtar) veya POST /v1/{chain} (başlıkta anahtar). Robinhood Chain için {chain} robinhood_mainnet'tir: https://api.blockvectra.com/v1/robinhood_mainnet. Aynı API anahtarı, desteklenen tüm zincirlerde çalışır
  • Protokol: HTTP POST, tekil çağrı veya toplu işlem (batch)
  • Ölçüm: Bir isteğin toplam CU maliyeti, ulaştığı anda anahtarınızın burst kapasitesinden düşülür. Yanıt alan kabul edilmiş her çağrı, yöntemin yayınlanan CU ağırlığı üzerinden ücretlendirilir; Hata referansı faturalandırılmayan durumları listeler. Faturalandırma saatlik olarak mahsup edilir (tam birimlere aşağı yuvarlanır, kalan sonraki döneme devreder, dönem bittikten ~15 dakika sonra gerçekleştirilir)
  • Ethereum: Kendi yöntem listesi ve state_window_blocks tarafından belirlenen bir durum penceresi — bkz. Desteklenen Zincirler → Ethereum.

Tüm yöntemlerde eksiksiz parametre şemaları, yöntem imzaları ve etkileşimli istek testi için Tam Referans sayfasına bakın. Yol sürümleme, geriye dönük uyumluluk kuralları ve SDK önerileri için API sürüm oluşturma ve uyumluluk bölümüne bakın.

Bir API key almak ve ilk isteği göndermek için Hızlı Başlangıç sayfasına bakın; bu sayfa ayrıca anahtar iletimini ve toplu istekleri de kapsar.

Yaygın çağrılar

Yaygın çağrılar için hazırlanmış örnekler.

Logları sorgulayın (eth_getLogs)

Bir sözleşmenin loglarını yakın bir blok aralığında filtreleyin — burada ERC-20 Transfer olayı (topic 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef). eth_getLogs yönteminin geçerli CU ağırlığı için aşağıdaki CU Ölçüm Kuralları tablosuna bakın; zincirin max_logs_block_range değerinden (GET /v1/chains çıktısından) daha geniş bir aralık -32602 ile reddedilir.

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

Bir işlemi izleyin (debug_traceTransaction)

Bir işlemin dahili çağrılarını callTracer ile izleyin. debug_traceTransaction yönteminin geçerli CU ağırlığı için aşağıdaki CU Ölçüm Kuralları tablosuna bakın. Diğer durum okuma yöntemlerinde olduğu gibi, hedef blok o zincirin yakın geçmiş durum penceresinin dışına çıktığında reddedilir (-32011). Pencere boyutu, zincirin state_window_blocks değeridir (GET /v1/chains çıktısından). Trace sağlayan zincirlerde, geçmiş izlemeler için Data API kullanın.

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

CU ölçüm kuralları

Her bir JSON-RPC metodu için Compute Unit (CU) ağırlığı.

MetotAğırlık (CU)
eth_blockNumber1
eth_chainId1
eth_getBlockByNumber5
eth_blobBaseFee10
eth_feeHistory10
eth_gasPrice10
eth_getBalance10
eth_getBlockByHash10
eth_getBlockReceipts10
eth_getBlockTransactionCountByHash10
eth_getBlockTransactionCountByNumber10
eth_getCode10
eth_getHeaderByHash10
eth_getHeaderByNumber10
eth_getProof10
eth_getRawTransactionByBlockHashAndIndex10
eth_getRawTransactionByBlockNumberAndIndex10
eth_getRawTransactionByHash10
eth_getStorageAt10
eth_getTransactionByBlockHashAndIndex10
eth_getTransactionByBlockNumberAndIndex10
eth_getTransactionByHash10
eth_getTransactionCount10
eth_getTransactionReceipt10
eth_getUncleByBlockHashAndIndex10
eth_getUncleByBlockNumberAndIndex10
eth_getUncleCountByBlockHash10
eth_getUncleCountByBlockNumber10
eth_maxPriorityFeePerGas10
eth_syncing10
net_version10
web3_clientVersion10
web3_sha310
eth_call15
eth_createAccessList20
eth_estimateGas20
eth_simulateV120
eth_getLogs30
eth_sendRawTransaction30
debug_traceBlockByHash100
debug_traceBlockByNumber100
debug_traceCall100
debug_traceTransaction100
trace_block100
trace_call100
trace_get100
trace_replayTransaction100
trace_transaction100

Yöntem politikası

Kullanılabilir yöntemler zincire göre değişir; her zincirin listesi aşağıda gösterilmiştir ve Desteklenen Zincirler geri kalanını kapsar. Yalnızca izin verilen bir ad veya kalıpla eşleşen yöntemlere erişilebilir; diğer tüm yöntemler -32601 method not available döndürür.

Aşağıdaki tüm zincirlerde izin verilir

  • eth_blockNumber
  • eth_call
  • eth_chainId
  • eth_estimateGas
  • eth_feeHistory
  • eth_gasPrice
  • eth_getBalance
  • eth_getBlockByHash
  • eth_getBlockByNumber
  • eth_getBlockReceipts
  • eth_getBlockTransactionCountByHash
  • eth_getBlockTransactionCountByNumber
  • eth_getCode
  • eth_getLogs
  • eth_getStorageAt
  • eth_getTransactionByBlockHashAndIndex
  • eth_getTransactionByBlockNumberAndIndex
  • eth_getTransactionByHash
  • eth_getTransactionCount
  • eth_getTransactionReceipt
  • eth_maxPriorityFeePerGas
  • eth_syncing
  • net_version
  • web3_clientVersion

Arbitrum One

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 6,000 blok

Ayrıca izin verilir

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_sendRawTransaction
  • eth_simulateV1
  • web3_sha3

Base

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 10,000 blok

Ayrıca izin verilir

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getProof
  • eth_simulateV1
  • eth_getRawTransactionByHash
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getUncleCountByBlockNumber
  • eth_getUncleCountByBlockHash
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleByBlockHashAndIndex
  • eth_getHeaderByNumber
  • eth_getHeaderByHash
  • eth_sendRawTransaction
  • web3_sha3

BNB Smart Chain

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 100 blok

Ayrıca izin verilir

  • eth_sendRawTransaction

Ethereum

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 250,000 blok

Ayrıca izin verilir

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getProof
  • eth_sendRawTransaction
  • trace_block
  • trace_call
  • trace_get
  • trace_replayTransaction
  • trace_transaction
  • web3_sha3

Ethereum Sepolia

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: —

Ayrıca izin verilir

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getProof
  • eth_sendRawTransaction
  • web3_sha3

HyperEVM

Bu zincirde henüz işlem gönderme desteklenmemektedir (eth_sendRawTransaction -32601 method_not_allowed döndürür); okuma yöntemleri normal çalışır.

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: —

Polygon

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 126 blok

Ayrıca izin verilir

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_sendRawTransaction
  • eth_simulateV1
  • web3_sha3

Robinhood Chain

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 900 blok

Ayrıca izin verilir

  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getProof
  • eth_simulateV1
  • eth_getRawTransactionByHash
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getUncleCountByBlockNumber
  • eth_getUncleCountByBlockHash
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleByBlockHashAndIndex
  • eth_getHeaderByNumber
  • eth_getHeaderByHash
  • eth_sendRawTransaction
  • web3_sha3
  • debug_traceTransaction
  • debug_traceCall
  • debug_traceBlockByNumber
  • debug_traceBlockByHash

Robinhood Chain Testnet

eth_getLogs maks blok aralığı: 1,000 blok; durum penceresi: 1,023 blok

Ayrıca izin verilir

  • debug_traceBlockByHash
  • debug_traceBlockByNumber
  • debug_traceCall
  • debug_traceTransaction
  • eth_blobBaseFee
  • eth_createAccessList
  • eth_getHeaderByHash
  • eth_getHeaderByNumber
  • eth_getProof
  • eth_getRawTransactionByBlockHashAndIndex
  • eth_getRawTransactionByBlockNumberAndIndex
  • eth_getRawTransactionByHash
  • eth_getUncleByBlockHashAndIndex
  • eth_getUncleByBlockNumberAndIndex
  • eth_getUncleCountByBlockHash
  • eth_getUncleCountByBlockNumber
  • eth_sendRawTransaction
  • eth_simulateV1
  • web3_sha3

Limitler:

  • Batch: İstek başına maksimum 100 çağrı; ayrıca anahtarın CU burst kapasitesiyle sınırlıdır, aşağıya bakın.
  • İstek gövdesi: Maksimum 2 MiB
  • CU burst: Her API anahtarının bir CU havuzu vardır (cu_per_sec yenileme, burst_cu kapasitesi — varsayılanlar 400 CU/s ve ani artış (burst) 1,600 CU; konsol API Anahtarları tablosunda anahtar başına gösterilir). Toplam CU'su anahtarın burst kapasitesini aşan tek bir istek — tüm bir JSON-RPC toplu işlemi dahil — -32022 request_exceeds_burst (request cost <N> CU exceeds burst capacity <M> CU) ile reddedilir; bunu daha küçük batch'lere bölün.

Hata kodları

Her hata kodu, faturalandırılıp faturalandırılmadığı ve ne yapılması gerektiği için Hata referansı sayfasına bakın.

Tam OpenAPI referansı

Etkileşimli olarak sunulan tüm yöntem imzaları, istek ve yanıt şemaları ve parametre ayrıntılarını içeren eksiksiz makine tarafından okunabilir spesifikasyon için Tam OpenAPI referansı sayfasına bakın.

Son güncelleme:

Bu sayfada