blocks-stable

Blocks loaded from the Ethereum mainnet – delayed by 12 blocks to minimize the chance of forks in this stream


Note

You'll first have to create a user to get a secret for connecting to Beneath (don't worry, it's free and we won't share your data with anyone)

Python

We provide a Python library that makes it easy to get data into e.g. a Jupyter notebook. Just copy and paste this snippet:

import beneath
client = beneath.Client()
df = await client.easy_read("beneath/ethereum/blocks-stable")

To run this code, you must first install our Python library with pip install beneath and authenticate by running beneath auth SECRET on the command-line.

JavaScript

You can query this stream directly from your front-end. Just copy and paste this snippet to get started. It's very important that you only use read-only secrets in your front-end.

fetch("https://data.beneath.dev/v1/beneath/ethereum/blocks-stable", {
"Authorization": "Bearer SECRET",
"Content-Type": "application/json",
})
.then(res => res.json())
.then(data => {
// TODO: Add your logic here
console.log(data)
})

Replace SECRET with a read-only secret (see note at the top of this page for instructions).

BigQuery

You can query this stream however you want using its public BigQuery dataset. Here's an example of how to query it from the BigQuery console.

select * from `beneath.beneath__ethereum.blocks_stable`

Data is made available in BigQuery nearly in real time.

REST API

You can lookup records in this stream from anywhere using the REST API. Here's an example of how to query it from the command line:

curl -H "Authorization: Bearer SECRET" https://data.beneath.dev/v1/beneath/ethereum/blocks-stable

Replace SECRET with a read-only secret, which you can obtain from the "Secrets" tab on your profile page.

Powered by Beneath. TermsPrivacyContact