ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs
Tags: product, updates, bitqueryapis
Published: 2020-10-29 15:25:35

---
title: ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs
published: true
date: 2020-10-19 17:18:31 UTC
tags: Product,Updates,bitqueryapis
canonical_url: https://bitquery.io/blog/eth2-explorer-api-widgets?utm_source=rss&utm_medium=rss&utm_campaign=eth2-explorer-api-widgets
---

Today, we will show what we have built in the past few weeks and our plan to support the ETH2.0 infrastructure. 

## ETH2.0 Medalla Testnet Explorer

We have added ETH2.0 Medalla Testnet support on Bitquery Explorer to show ETH2.0 data and analytics. You can access our [Medalla Testnet Analytical explorer here](https://explorer.bitquery.io/medalla).

Bitquery Explorer is [open-source](https://github.com/bitquery/explorer) and built in a modular way to create any data visualizations on-demand.

![ETH2.0 explorer](https://bitquery.io/wp-content/uploads/2020/10/image-14.png)

## Embeddable Widgets

Our explorer is made out of [embeddable widgets](https://github.com/bitquery/widgets). We show all data metrics using these widgets. In essence, these widgets are simple HTML, Javascript code, which can embed into any other website to show ETH2.0 data.

For example, check out the following live widget for showing Daily ETH2.0 blocks.

``

<iframe title="Deposits on Medalla Ethereum 2.0 Testnet Explorer" src="https://player.vimeo.com/video/469823983?dnt=1&amp;app_id=122963" width="1170" height="658" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>

## ETH2.0 GraphQL APIs

Our GraphQL APIs enable Bitquery explorer widgets, and anyone can use these APIs to create ETH2.0 specific tools.

Our GraphQL API is specially designed to simplify data analysis and help to build complex data visualizations. It follows OLAP ([Online analytic processing](https://en.wikipedia.org/wiki/Online_analytical_processing)), where everything is considered ‘dimensions’ and ‘metrics.’

In ETH2, possible ‘dimensions’ are validators, blocks, proposers, attestations, and everything else that can serve as an entity in the GraphQL query.

Metrics are used to measure anything, so it is numeric, like counting unique amounts of deposits.

For example, to generate a distribution report for deposits against validators, you have to select the dimension ( validator.index ) and metric ( amount of deposit ) and build the query like:

```
{
  ethereum2(network: medalla) {
    deposits(options: {desc: "amount", limit: 10}) {
      validator {
        index
      }
      amount
    }
  }
}
```

The power of GraphQL API comes from the flexibility of combining multiple dimensions and metrics in one query. For example, replacing

```
validator{
  index
}
```

With

```
date {
   date
}
```

You get the query to respond with the days of the maximum deposit!

You can combine BOTH dimensions in one query, and here you get a 2-dimensional response:

```
{
  ethereum2(network: medalla) {
    deposits(options: {desc: "amount", limit: 10}) {
      date {
        date
      }
      validator {
        index
      }
      amount
    }
  }
}
```

Our GraphQL APIs are highly flexible, and we are expanding them to cover every aspect of the ETH2.0 network.

Use our [**GraphQL playground**](https://graphql.bitquery.io/) to query ETH2.0 on-chain data.

<iframe title="ETH2.0 GraphQL APIs" src="https://player.vimeo.com/video/469833574?dnt=1&amp;app_id=122963" width="1170" height="580" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>

## Examples of ETH2.0 GraphQL queries

Let’s also see a few more examples of ETH2.0 GraphQL queries. You can run the following queries here — [graphql.bitquery.io](https://graphql.bitquery.io/)

**Note:** GraphQL queries are APIs that can be called programmatically. 

#### Daily ETH2.0 blocks count

The following query gets Daily ETH2.0 blocks count.

```
{
  ethereum2 {
    blocks(options: {asc: "date.date"}) {
      date: date {
        date(format: "%Y-%m-%d")
      }
      count: count
      proposers: count(uniq: block_proposers)
    }
  }
}
```

#### Result

```
{
  "data": {
    "ethereum2": {
      "blocks": [
        {
          "date": {
            "date": "2020-08-04"
          },
          "count": 2501,
          "proposers": 2320
        },
        {
          "date": {
            "date": "2020-08-05"
          },
          "count": 5716,
          "proposers": 4886
        },
        {
          "date": {
            "date": "2020-08-06"
          },
          "count": 5569,
          "proposers": 4796
        },
        ...
        ... 
        ...
```

#### Daily ETH Deposits

To check the Daily ETH deposits, run the following query.

```
{
  ethereum2 {
    deposits(options: {asc: "date.date"}) {
      date: date {
        date(format: "%Y-%m-%d")
      }
      count: count
      amount
    }
  }
}
```

#### Result

```
{
  "data": {
    "ethereum2": {
      "deposits": [
        {
          "date": {
            "date": "2020-08-04"
          },
          "count": 2216,
          "amount": 70912
        },
        {
          "date": {
            "date": "2020-08-05"
          },
          "count": 3389,
          "amount": 108448
        },
        {
          "date": {
            "date": "2020-08-06"
          },
          "count": 810,
          "amount": 25920
        },
        ...
        ...
        ...
```

GraphQL APIs are hight flexible; therefore, you can change them based on your needs.

## How Bitquery tools will help ETH2.0 ecosystem?

- **Explorer**  — Other than showing regular explorer activity, we will enable more in-depth analytics on our explorer to help individuals to understand the ETH2.0 network better.
- **Widgets ** — Our widget can be used by others on their platform to add context to data and create more awareness around the ETH2.0 ecosystem.
- **GraphQL APIs ** — Our APIs will enable developer, makers, and enthusiast to analyze the ETH2.0 network and build tools enable broader participation in the ETH2.0 ecosystem.

Going forward, we will expand our ETH2.0 network coverage and enable more in-depth data APIs.

We already support GraphQL APIs for Ethereum 1.0 mainnet and Goerli testnet. Check out our blog to see more examples of how to get Etheruem blockchain data.

- [Ethereum DEX GraphQL APIs with Examples](https://bitquery.io/blog/ethereum-dex-graphql-api)
- [How to get newly created Ethereum Tokens?](https://bitquery.io/blog/newly-created-etheruem-token)
- [API to get Ethereum Smart Contract Events](https://bitquery.io/blog/ethereum-events-api)
- [Simple APIs to get Latest Uniswap Pair Listing](https://bitquery.io/blog/uniswap-pool-api)  

#### **About** Bitquery

[**Bitquery**](https://bitquery.io/?source=blog&utm_medium=about_coinpath) 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®](https://bitquery.io/products/coinpath?utm_source=blog) APIs** provide [blockchain money flow analysis](https://blog.bitquery.io/coinpath-blockchain-money-flow-apis) 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®](https://blog.bitquery.io/coinpath-api-get-start).

- **[Digital Assets API](https://bitquery.io/products/digital_assets?utm_source=blog&utm_medium=about)** provides index information related to all major cryptocurrencies, coins, and tokens. 

- **[DEX API](https://bitquery.io/products/dex?utm_source=blog&utm_medium=about)** 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](https://t.me/Bloxy_info) or email us at [hello@bitquery.io](mailto:hello@bitquery.io). Also, subscribe to our newsletter below, we will keep you updated with the latest in the cryptocurrency world.

The post [ETH2.0 Analytical Explorer, Widgets, and GraphQL APIs](https://bitquery.io/blog/eth2-explorer-api-widgets) appeared first on [Bitquery](https://bitquery.io).