February 6, 2024

Blockchain Data Analytics – Turn Blockchain Data Into Engaging Insights & Analysis with Discovery API 

Table of Contents

In today’s article, we’ll dive into the ins and outs of blockchain data analytics and introduce you to the industry’s leading blockchain data API – Moralis’ Discovery API. The Discovery API goes far beyond standard market data by analyzing patterns, liquidity movements, buying pressures, and other critical factors indicating the potential of tokens. Consequently, with this API, you can seamlessly uncover new trends, hidden gems, and other exciting tokens. This allows you to seamlessly engage and retain your Web3 audience without breaking a sweat!

To give you a little sneak peek of what’s to come and highlight the accessibility of the Discovery API, here are three examples of prominent blockchain data API endpoints you’ll likely find helpful in your Web3 development endeavors:

  • getRisingLiquidityTokens – Query the top tokens with increasing liquidity: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/rising-liquidity?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  • getTopBuyPressureTokens – Fetch the top tokens with rising buy pressure: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/buying-pressure?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));
  • getExperiencedBuyerTokens – Discover the top tokens experienced buyers are purchasing: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/experienced-buyers?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

If you’d like to learn more about this industry-leading tool and how it can help with blockchain data analytics, join us in this article as we explore the ins and outs of the Discovery API! Also, if you’d like to follow along throughout this guide and leverage the Discovery API yourself, don’t forget to sign up with Moralis by clicking the button below!

Overview 

In today’s article, we’ll kick things off by exploring the ins and outs of blockchain data analytics. From there, we’ll then dive straight into the industry’s leading blockchain data API – Moralis’ Discovery API. In doing so, we’ll explain what this blockchain data analytics tool is, how it works, and cover some examples of prominent endpoints you’ll likely find useful when building decentralized applications (dapps). Next, we’ll walk you through a brief tutorial where we’re going to show you how to fetch a list of coins with rising buy pressure in three steps: 

  • Step 1: Get a Moralis API Key
  • Step 2: Write a Script Calling the getTopBuyPressureTokens Endpoint
  • Step 3: Run the Code

Lastly, to top things off, we’ll cover some prominent use cases for blockchain data analysis!

Marketing Banner with Moralis logo and Blockchain Data Analytics title

Moralis is an industry-leading Web3 API provider, and in addition to the Discovery API, we also offer an extensive set of other development tools. Some prominent examples include the NFT API, Wallet API, and Token API

All Web3 APIs from Moralis offer industry-leading response times and are cross-chain compatible, supporting blockchains like Ethereum, BNB Smart Chain (BSC), Polygon, etc. What’s more, thanks to the accessibility of our APIs, you can reduce the average time to market for your projects by an impressive 83%. So, if you want to build Web3 platforms faster and more efficiently, don’t forget to sign up with Moralis! 

Now, without further ado, let’s jump straight into the intricacies of blockchain data analytics!

What is Blockchain Data Analytics?

Blockchain networks (e.g., Ethereum, BNB Smart Chain [BSC], and Polygon) are immutable, distributed ledgers that comprise blocks of data chained together in chronological order. Since these networks are decentralized and public, it’s possible for anyone to query data from them. However, interpreting the raw information from these networks is challenging, which is why blockchain data analytics has become increasingly popular. 

But what is blockchain data analytics? 

Blockchain data analytics is the process of identifying, collecting, decoding, and analyzing publicly available information stored on a blockchain network. Understanding this data provides insight into user behavior, transactions, and other aspects of a network. This can help traders, regulators, law enforcement, and other stakeholders understand historical and current blockchain events. 

Illustrative art image - showing a magnifying glass examining blockchain data analytics

However, fetching, decoding, and analyzing blockchain data is a complex and time-consuming endeavor. Fortunately, this is where blockchain data analytics providers enter the equation, taking care of all the underlying complexities. In turn, all you have to do is query already decoded data, making it super easy for you to understand what’s happening on-chain. Furthermore, there are multiple different types of blockchain data analytics, meaning there are various types of providers. For instance, regulators or governments seek crypto data analysis for compliance reasons, and in doing so, they might turn to forensic blockchain data analytics providers like Chainalysis.

Now, for those looking to build compelling Web3 projects – such as decentralized finance (DeFi) platforms – it’s more likely they want to leverage blockchain data analytics to engage, delight, and retain users. In this case, the industry’s leading option is Moralis’ Discovery API!

Discover API – The Top Blockchain Data API for Engaging Users

Moralis’ Discovery API is the ultimate tool for transforming raw blockchain data into engaging insights. As such, with this industry-leading API, you can seamlessly engage and retain your Web3 audience without breaking a sweat! 

Title: Transform Raw Blockchain Data Into Engaging Insights

The Discovery API provides a comprehensive suite of endpoints that help you uncover new trends, exciting tokens, and hidden gems within the cryptocurrency market. Consequently, this tool goes far beyond standard market data by analyzing patterns, buying pressures, liquidity movements, and other critical factors that indicate a token’s potential.

So, why should you leverage the Discovery API when building dapps?

To answer this, let’s look at three benefits of using this industry-leading tool: 

  • Engage Users: With the Discovery API, you can seamlessly keep your users both informed and engaged by providing in-depth market insight. This will give them an edge in the market, allowing your users to discover tokens before anyone else.
  • Delight Users: Delight users and increase satisfaction with unmatched token data depth and breadth, including security scores, market caps, liquidity, and over 200 additional data points. 
  • Retain Users: Retain your users and customers by building unique features that leverage unrivaled datasets. In turn, this will give your platform a clear competitive edge, making it stand out on the market. 

That gives you an overview of the Discovery API. In the following subsection, we’ll dive deeper into this tool and look at some prominent endpoints of this industry-leading API! 

Discovery API Endpoints 

The Discovery API features more than five premier endpoints that give you unparalleled market insights. In this section, we’ll explore three prominent examples and their responses:

  • getRisingLiquidityTokens – Find the top tokens with rising liquidity: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/rising-liquidity?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

getRisingLiquidityTokens response:

[
  {
    "chain_id": "0x1",
    "token_address": "0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
    "token_logo": "https://d23exngyjlavgo.cloudfront.net/0x1_0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2",
    "token_name": "Maker",
    "token_symbol": "MKR",
    "price_usd": 1928.751817725437,
    "token_age_in_days": 2263,
    "on_chain_strength_index": -12,
    "security_score": 88,
    "market_cap": 1780783069.0873282,
    "fully_diluted_valuation": 1886465582.176907,
    "twitter_followers": 260998,
    //...
    "liquidity_change_usd": {
      "1h": 632707.0488177538,
      "1d": 3928917.5214345455,
      "1w": 11325331.006205842,
      "1M": 29230996.84832488
    },
    //...
  },
  //...
]
  • getTopBuyPressureTokens – Query the top tokens with increasing buy pressure: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/buying-pressure?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

getTopBuyPressureTokens response: 

[
  {
    "chain_id": "0x1",
    "token_address": "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
    "token_logo": "https://d23exngyjlavgo.cloudfront.net/0x1_0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
    "token_name": "Gitcoin",
    "token_symbol": "GTC",
    "price_usd": 1.1120713554479338,
    "token_age_in_days": 999,
    "on_chain_strength_index": 5,
    "security_score": 99,
    "market_cap": 15484451.96951144,
    "fully_diluted_valuation": 112243100.0453152,
    "twitter_followers": 200320,
   //...
    "volume_change_usd": {
      "1h": 983.7751039660001,
      "1d": 18371.923767555,
      "1w": 443849.80801039684,
      "1M": 1020100.3945271757
    },
    //...
  },
  //...
]
  • getExperiencedBuyerTokens – Get the top tokens experienced buyers are purchasing: 
import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/experienced-buyers?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

getExperiencedBuyerTokens response: 

[
  {
    "chain_id": "0x1",
    "token_address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
    "token_logo": "https://d23exngyjlavgo.cloudfront.net/0x1_0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
    "token_name": "Liquid staked Ether 2.0",
    "token_symbol": "stETH",
    "price_usd": 2330.2637351765743,
    "token_age_in_days": 1145,
    "on_chain_strength_index": 2,
    "security_score": 85,
    "market_cap": 13725803670.527817,
    "fully_diluted_valuation": 13725803673.963886,
    "twitter_followers": 184242,
    //...
    "experienced_net_buyers_change": {
      "1h": 1,
      "1d": 83,
      "1w": 545,
      "1M": 776
    },
    //...
  },
  //...
]

For each endpoint above, you can also add other filters to narrow down the results even further. For instance, by including a min_market_cap parameter, you can specify the minimum market cap in USD that the tokens featured in the response can have. Or, with the security_score parameter, you can ensure that all tokens have at least a specific security score. 

If you’d like to explore more about the various endpoints of this tool, make sure to check out the official Discovery API documentation page!

3-Step Tutorial: Blockchain Data Analytics with the Discovery API

In the following subsections, we’ll walk you through a tutorial exploring how the Discovery API works in practice. To do so, we’ll be using the getTopBuyPressureTokens endpoint as an example and show you how to fetch the top tokens with increasing buy pressure in three steps: 

  • Step 1: Get a Moralis API Key
  • Step 2: Write a Script Calling the getTopBuyPressureTokens Endpoint
  • Step 3: Run the Code

However, before continuing, you need to deal with a few prerequisites! 

Prerequisites 

The Discovery API is compatible with multiple programming languages, including Python, Go, etc. However, for this tutorial, we’ll be using JavaScript and NodeJS. As such, before proceeding, make sure you have the following ready: 

  • Node.js v14+
  • Npm/Yarn

Step 1: Get a Moralis API Key 

The first thing you’ll need is a Moralis account. As such, if you haven’t already, click on the ”Start for Free” button at the top right of Moralis’ homepage and sign up: 

Start using blockchain data analytics with Moralis today - Sign up for free button

Note: The Discovery API is a premium feature of Moralis. As such, if you want to use this industry-leading tool, please upgrade to the Pro plan. 

With an account at hand, head on over to the ”Settings” tab, scroll down to the ”API Keys” section, and copy your key: 

Showing how to copy Moralis API key

Please keep it for now, as you’ll need it in the next part!

Step 2: Write a Script Calling the getTopBuyPressureTokens Endpoint 

Open your preferred IDE, set up a folder, and run the following command in the terminal to initialize a new project: 

npm init

Next, execute the terminal commands below to install the required dependencies: 

npm install node-fetch --save
npm install moralis @moralisweb3/common-evm-utils

You can then open your ”package.json” file and add ”type”: ”module” to the list: 

Adding ”type”: ”module” to the code list

From here, create a new ”index.js” file and add the following code: 

import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
    'X-API-Key': 'YOUR_API_KEY'
  },
};

fetch('https://deep-index.moralis.io/api/v2.2/discovery/tokens/buying-pressure?chain=eth', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

You then need to replace YOUR_API_KEY with the key you copied during the first step: 

Replacing API key parameter

That’s it; you’re now ready to run the code! 

However, if you’d like to narrow down the response further, you have the option to add several filters. For instance, by including a min_market_cap=100000000 parameter, you’ll ensure that all coins returned will have a minimum market cap of 100000000

To learn more about all available parameters, check out the Get Top Buy Pressure Tokens documentation page! 

Step 3: Run the Code 

Open a new terminal and run the following command to execute the script: 

node index.js

In return, you’ll get a response containing a list of top tokens with increasing buy pressure. It will look something like this: 

[
  {
    "chain_id": "0x1",
    "token_address": "0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
    "token_logo": "https://d23exngyjlavgo.cloudfront.net/0x1_0xde30da39c46104798bb5aa3fe8b9e0e1f348163f",
    "token_name": "Gitcoin",
    "token_symbol": "GTC",
    "price_usd": 1.1120713554479338,
    "token_age_in_days": 999,
    "on_chain_strength_index": 5,
    "security_score": 99,
    "market_cap": 15484451.96951144,
    "fully_diluted_valuation": 112243100.0453152,
    "twitter_followers": 200320,
   //...
    "volume_change_usd": {
      "1h": 983.7751039660001,
      "1d": 18371.923767555,
      "1w": 443849.80801039684,
      "1M": 1020100.3945271757
    },
    //...
  },
  //...
]

That’s it; from here, you can now follow precisely the same steps to call any other Discover API endpoints!

What to Build with Blockchain Data Analytics? 

With the Discovery API, you can seamlessly engage, delight, and retain your users, making it a perfect tool for building dapps. However, what exactly can you build with our industry-leading blockchain data API? 

Well, let’s explore three examples of prominent blockchain data analysis use cases in the following subsections to answer the above question! 

Token Analytics

Token analytics platforms are websites and applications that give cryptocurrency traders in-depth insight into various tokens. These tools gather, analyze, and present on-chain data from blockchain networks in a readable format, allowing users to make more informed investment decisions. A great example of a token analytics platform is Moralis Money

Moralis Money Platform - Blockchain Data Analytics example

As you can imagine, you need seamless access to advanced market data when building token analytics platforms. This will allow you to serve your users with unparalleled insight into the performance of cryptocurrencies, making it easy for them to find new, promising investment opportunities. 

Portfolio Trackers

Portfolio trackers are applications and websites that allow users to seamlessly monitor the performance of their digital assets across several blockchain networks. Some prominent examples of portfolio trackers include Moralis Money, Delta, and Kubera. 

Portfolio Tracker MetaMask and Moralis Money as examples using blockchain data analysis and insights

Users of portfolio trackers seek more than just numbers, and with the Discovery API, you can serve them with up-to-date performance metrics and asset valuations. This, in turn, can significantly boost user engagement and satisfaction, giving your platform a clear competitive edge. 

Trading Platforms

Trading platforms are either centralized or decentralized exchanges (DEXs) where users can buy and sell cryptocurrencies. Some prominent examples of trading platforms include Uniswap, Curve, and Binance. 

Trading platform Curve example

Access to market data and advanced token insight is crucial when building and maintaining centralized and decentralized exchanges. With this data, you can seamlessly keep your users engaged by giving them a clear edge in the market.

Nevertheless, token analytics tools, portfolio trackers, and trading platforms are only three examples of use cases for the Discovery API. In fact, the only thing limiting you is your imagination! 

Summary: Blockchain Data Analytics – Turn Blockchain Data Into Engaging Insights & Analysis with Discovery API 

In today’s article, we explored the ins and outs of blockchain data analysis. In doing so, we discovered that it’s the process of identifying, querying, analyzing, and decoding raw blockchain data! 

Illustrative art image showing blockchain data analytics fetched using a Blockchain Data API

From there, we then dove straight into the industry’s leading blockchain data analysis tool – Moralis’ Discover API! 

With the Discovery API, you can seamlessly transform raw blockchain data into engaging insights. This premier blockchain data API features a suite of prominent endpoints, helping you discover market trends, exciting tokens, and hidden gems within the crypto market. As such, this tool goes beyond standard market insight by analyzing buying pressures, liquidity movements, and other factors that indicate the potential of crypto tokens.  

So, with the Discovery API, you get seamless access to advanced market insights, allowing you to both retain and engage your users! In addition to exploring the Discovery API, we also showed you how to get top tokens with increasing buy pressure in three steps: 

  • Step 1: Get a Moralis API Key
  • Step 2: Write a Script Calling the getTopBuyPressureTokens Endpoint
  • Step 3: Run the Code

So, if you have followed along this far, you now know what the Discovery API is and how it works! 

If you liked this blockchain data analysis tutorial, consider reading more content here on the blog. For instance, explore the best altcoin API or learn how to build dapps on Optimism. Also, if you’d like to use the Discovery API and other leading Web3 development tools yourself, don’t forget to sign up with Moralis immediately!

Moralis Money
Stay ahead of the markets with real-time, on-chain data insights. Inform your trades with true market alpha!
Moralis Money
Related Articles
November 29, 2023

List of Smart Contract Ideas and Examples for Developers

December 10, 2022

How to Get All Tokens Owned by a Wallet in 5 Steps

January 1, 2023

Web3 Programming – How to Learn Web3 Programming

November 1, 2022

Cross-Chain Bridging Deep-Dive

December 22, 2022

What is Danksharding? EIP-4844 and Danksharding Explained

January 3, 2024

ETH Layer-2 – What are Ethereum Layer-2 Solutions?

December 15, 2022

Exploring Web3 Contract Methods – How to Run Web3 Methods on Ethereum

January 13, 2023

Ultimate Guide: What is Web3 Technology?

January 26, 2023

Web3 Libraries – List of Web3 Libraries for Devs in 2023