Search code examples
javascriptreactjsrestethereum

Newbie- API to get Ethereum's latest blocks


I am looking for an ethereum api to get the N latest blocks. I will use javascript (react) to make the requests.

I have looked into https://etherscan.io/apis#blocks but it has nothing to do with what I need (at least what I see there).

Also https://github.com/ethereum/wiki/wiki/JSON-RPC seems complicated to use as I will have CORS issues (?). And I don't see what I need there either

Thank you


Solution

  • I believe this might be something you're looking for?

    This returns latest-n blocks of the ethereum network. It's currently limited to 100 blocks.