{"uid":"cap_dqyMovqrEoiUgybdCf8lP","slug":"onesource-ethereum-network-info-chain-id-block-height-gas-price-f324b738","name":"OneSource Ethereum Network Info (Chain ID + Block Height + Gas Price)","description":"EVM network info - chain ID, block height, gas price, chain head age, and chain characteristics in one batched RPC call (eth_chainId + eth_blockNumber + eth_gasPrice + latest block header)","url":"https://api.onesource.io/api/chain/network-info","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"network":{"enum":["ethereum","sepolia","robinhood"],"type":"string","default":"ethereum"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","properties":{"chain":{"type":"object","properties":{"ens":{"type":"boolean"},"layer":{"type":"integer"},"stack":{"type":"string"},"indexed":{"type":"boolean"},"mempool":{"type":"boolean"},"chain_id":{"type":"integer"},"finality":{"type":"string"},"native_currency":{"type":"string"},"avg_block_time_ms":{"type":"integer"}}},"stale":{"type":"boolean"},"network":{"type":"string"},"chain_id":{"type":"string"},"gas_price":{"type":"string"},"net_version":{"type":"string"},"block_number":{"type":"string"},"head_timestamp":{"type":"integer"},"head_age_seconds":{"type":"integer"},"stale_after_seconds":{"type":"integer"}},"description":"Endpoint-specific response payload"},"meta":{"type":"object","required":["endpoint","request_id"],"properties":{"endpoint":{"type":"string"},"cost_usdc":{"type":"string"},"request_id":{"type":"string"},"payment_chain":{"type":"string"},"payment_token":{"type":"string"}}},"error":{"type":["object","null"],"properties":{"code":{"type":"integer"},"message":{"type":"string"}}}}}}}}},"responseSchema":{"type":"json","example":{"data":{"chain":{"ens":true,"layer":1,"stack":"ethereum","indexed":true,"mempool":true,"chain_id":1,"finality":"beacon","native_currency":"ETH","avg_block_time_ms":12000},"stale":false,"network":"ethereum","chain_id":"0x1","gas_price":"0x4a817c800","net_version":"1","block_number":"0x133da1e","head_timestamp":1754240345,"head_age_seconds":9,"stale_after_seconds":1200},"meta":{"endpoint":"/api/chain/network-info","cost_usdc":"0.001","request_id":"00000000abcdef01","payment_chain":"base","payment_token":"USDC"}}},"example":{"request":{"network":"ethereum"},"response":{"data":{"network":"ethereum","chain_id":"0x1","gas_price":"0x69eceba","net_version":"1","block_number":"0x181ec3b"},"meta":{"endpoint":"/api/chain/network-info","request_id":"b7b6dd5c8d2f129d"}}},"exampleRequest":{"network":"ethereum"},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7uIeTXupjoIm9j5N39zIQ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the current Ethereum network state — chain ID, latest block number, and current gas price — in a single batched RPC call","exampleAgentPrompt":"What's the current gas price, block height, and chain ID on Ethereum mainnet right now?","exampleUseCases":null,"resultDescription":"Returns three key Ethereum network values in one response: the chain ID (e.g. 1 for mainnet), the latest block number, and the current gas price in wei — all fetched via a single batched JSON-RPC call so the values are consistent with each other.","failureModes":["Invalid network value (not 'ethereum' or 'sepolia') returns a 400 error","Upstream Ethereum node unavailability returns a 503 or timeout","Payment not provided or insufficient USDC results in a 402 Payment Required response","Rate limiting may occur under high request volume"],"whenToPreferThis":"Use this endpoint when you need Ethereum or Sepolia network state (gas price, block number, chain ID) together in one call, avoiding three separate RPC round-trips. Ideal for transaction preparation workflows where you need current gas price and nonce context simultaneously, or for monitoring Ethereum network conditions. Prefer over raw JSON-RPC when you want a REST interface with per-call micropayment billing instead of managing your own node or RPC provider subscription.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:39:22.419Z","isFirstParty":false}