{"uid":"cap___lMZiR-j0uCLm29yjY7A","slug":"agenticfi-block-height-lookup-1f259294","name":"AgenticFi Block Height Lookup","description":"Latest block number for a chain","url":"https://defi-api.agenticfi.wtf/api/chain/block-height/%7Bchain%7D","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","pathParams","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"pathParams":{"type":"object","required":["chain"],"properties":{"chain":{"type":"string","title":"chain (required)","description":"Required. Chain name (ethereum, base, etc.) Examples: base, ethereum, arbitrum"}}},"queryParams":{"type":"object","required":["chain"],"properties":{"chain":{"type":"string","title":"chain (required)","description":"Required. Chain name (ethereum, base, etc.) Examples: base, ethereum, arbitrum"}}}},"additionalProperties":false}}},"responseSchema":null,"example":{"request":{"input":{"type":"http","method":"GET","pathParams":{"chain":"base"},"queryParams":{"chain":"base"}}},"response":{"chain":"base","timestamp":1781239193847,"blockNumber":47224923}},"exampleRequest":{"chain":"base"},"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_Gxwe_eR5y3cnb7giTW5hw","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 block height for a specified blockchain network (e.g. Ethereum, Base, Arbitrum)","exampleAgentPrompt":"What's the current block height on the Base chain right now?","exampleUseCases":[{"title":"Monitor swap execution timing across chains","prompt":"Before executing my next batch of swaps, check the current block heights on Ethereum, Base, and Arbitrum so I can timestamp each transaction properly."},{"title":"Verify on-chain state synchronization checkpoint","prompt":"I need to make sure my agent is synced with the latest block on Base before reading any wallet balances or token prices from the chain."},{"title":"Anchor DeFi workflow to current block state","prompt":"What's the block height on Ethereum right now? I want to use that as a reference point before submitting any pending transactions."}],"resultDescription":"Returns the current block height (a numeric block index) for the specified blockchain network, indicating how many blocks have been mined since genesis on that chain.","failureModes":["Invalid chain name returns 400 or error response","Unsupported chain identifier results in no data","Network connectivity issues to on-chain RPC can cause timeouts","Payment not processed results in 402 response requiring USDC micropayment on Base via x402"],"whenToPreferThis":"Use this endpoint when an AI agent needs to anchor on-chain state, verify timing of transactions, or synchronize workflows to a specific block number on EVM-compatible chains like Ethereum, Base, or Arbitrum. Ideal for DeFi automation that requires knowing the current chain height before executing swaps or reading on-chain data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T12:49:59.315Z","isFirstParty":false}