ETH2 API — Beacon chain API data?
On Nov 24th, 2020, Ethereum 2.0 Beacon chain is launched and has more than 1.5 million ETH deposited in the ETH2 smart contract and with ~50K validators when writing this article.
Today, we will show how to get ETH2.0 data using our GrpahQL APIs. You can also visualize different types of ETH2 data metrics on our ETH2 explorer. If you want to learn about the Beacon chain’s inner workings, read this article.
ETH2 Deposits API
As soon as the ETH2.0 deposit smart contract launched, everyone was tracking the number of ETHs deposited in the contract. Because to launch the Beacon chain, it needs to cross the threshold of 524,288 ether. Additionally, the number of ETH staked (number of validators) directly impacts ETH2.0 inflation.
You can now use the following API to get the amount of ETH deposited, the number of validators, and deposits.
ETH2 deposit count and amount daily
Let’s say you want to track daily ETH deposits on Ethereum2 smart contract. For that, you use the following query.
Top Validators based on the deposit amount
You need to deposit 32ETH to become a validator for the Beacon chain. Use the query below to learn about the top validators based on the deposit amount.
The Beacon Chain provides the heartbeat to Ethereum 2.0. This beat is a 12-second slot in which validators can propose blocks. 32 slots make an epoch.
If you want to know about the count for blocks, slots, and block proposers, use the query below.
Daily Blocks and Proposers count
If you want the daily blocks and proposer count, use the query below.
The Beacon chain create groups of validators, called Committees. One validator in this group proposes the block, and the other validators vote on the proposed block. These votes are called attestations.
The following API gives you the number of unique validators, committees, and attestations.
Ethereum2.0 usage Proof of stake, where honest validators incentivized and dishonest or incompetent validators get punished, is called slashing. In Ethereum2.0 slashing occurs because
- Block producer proposes two conflicting blocks within the same slot
- Or vote more than once with conflicting checkpoint (Chain creates a checkpoint after every 32 blocks)
The API below gives you the number of proposers slashing and the unique count of slashed proposers.
Top Proposers by the count of slashings
If you want to know which validator is most slashed, run the query below.
Attestors also get slashed if they don’t vote honestly or show incompetency. Run the following query to check the number of slashed attestors and total attestor slashing events.
Validators Information API
Using our APIs, you can get all sorts of information about one or multiple validators. For example, the following APIs give you blocks proposed by a validator number (45871).
The query below gives you the slot attestations of a validator (45871).
We showed you some examples of our ETH2 APIs; you get all sorts of different ETH2 data using our APIs. Just explore our GraphQL schema to learn the capabilities of ETH2 APIs. If you have any questions about our APIs, ask them our Telegram group.
- ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs
- Conditional Aggregation in GraphQL APIs
- The Graph vs Bitquery – Solving Blockchain Data Problems
- Building a Blockchain Intelligence System
- How to use GraphQL Alias and Aggregation?
- Offline Dashboards | Client only Blockchain data visualization and tools
- Ethereum DEX GraphQL APIs with Examples
- How to get newly created Ethereum Tokens?
- How to investigate an Ethereum address?
- API to get Ethereum Smart Contract Events
- Simple APIs to get Latest Uniswap Pair Listing
- Analyzing Decentralized Exchange using Bitquery Blockchain Explorer
Bitquery is a set of software tools that parse, index, access, search, and use information across blockchain networks in a unified way. Our products are:
Coinpath® APIs provide blockchain money flow analysis for more than 24 blockchains. With Coinpath’s APIs, you can monitor blockchain transactions, investigate crypto crimes such as bitcoin money laundering, and create crypto forensics tools. Read this to get started with Coinpath®.
Digital Assets API provides index information related to all major cryptocurrencies, coins, and tokens.
DEX API provides real-time deposits and transactions, trades, and other related data on different DEX protocols like Uniswap, Kyber Network, Airswap, Matching Network, etc.
If you have any questions about our products, ask them on our Telegram channel or email us at email@example.com. Also, subscribe to our newsletter below, we will keep you updated with the latest in the cryptocurrency world.
Subscribe to our newsletter
Subscribe and never miss any updates related to our APIs, new developments & latest news etc. Our newsletter is sent once a week on Monday.