January 24, 2024

Understand Why Crypto is Up Or Down with a Crypto Price Movement API

Table of Contents

While most decentralized exchanges (DEX), cryptocurrency wallets, and portfolio trackers use standard crypto price APIs to notify users when the price of a coin moves, they typically fail to explain why. This is understandable, given the complex nature of the crypto market’s price actions. Fortunately, this is something Moralis’ Why Did It Move API is now able to solve. With this industry-leading crypto price movement API, you can seamlessly query and integrate one-sentence explanations for what’s behind a price action into your decentralized applications (dapps). By offering your users these unique insights, you can enhance user engagement and give your dapps a distinctive competitive advantage!

In today’s article, we’ll dive into the intricacies of the Why Did It Move (WDIM) API to explain what it is and how it works. If you’re eager to jump straight into the code, here’s an example of what an API call to the https://wdim.moralis.io/api/v1/news endpoint might look like: 

// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
   'Authorization': 'Bearer YOUR_API_KEY'
  },
};

fetch('https://wdim.moralis.io/api/v1/news', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

All you have to do is replace YOUR_API_KEY with your Moralis API key, and you’ll get a response containing one-sentence explanations for notable price actions. Here’s an example of what it might look like: 

{
  //…
  "page": "1",
  "result": {
    "id": 1,
    "token_address": "0x046eee2cc3188071c02bfc1745a6b17c656e3f3d",
    "token_symbol": "RLB",
    "token_name": "Rollbit Coin",
    "chain": "ETH",
    "change_in_percent": 11,
    "headline": "On-chain volume shows heavy wallets accumulating RLB, leading to an 11% increase today.",
    "time_of_price_movement": "2023-10-13T12:00:00.000Z",
    "movement": "Positive",
    "updated_at": "2021-10-11T00:00:00.000Z",
    "created_at": "2021-10-11T00:00:00.000Z"
  }
//…
}

To learn more about how this works, join us in this guide, watch the video below, or check out the official Why Did It Move API documentation page! 

Also, if you want to get access to the WDIM API yourself, please click the button below! 

Overview 

We’ll kickstart today’s article by answering the question, ”Why do you need a crypto price movement API?”. From there, we’ll jump straight into Moralis’ WDIM API. In doing so, we’ll explain what it is, how it works, and why you should leverage this tool when building Web3 projects. Next, we’ll briefly look at an early success story, exploring how Delta – an industry-leading portfolio tracker platform – is benefiting from using the WDIM API. Lastly, to top things off, we’ll dive deeper into Moralis to explore the capabilities of the #1 Web3 API provider further! 

Within Moralis’ suite of APIs, you’ll find prominent tools like the Price API, Wallet API, Token API, and many others. These tools offer industry-leading response times, are cross-chain compatible, and allow you to save about 83% of a project’s average go-to-market time. Consequently, when working with Moralis, you can build dapps faster and more efficiently. 

Also, did you know that you can sign up with Moralis for free? So, if you haven’t already, register an account right now, and you’ll gain instant access to our Web3 API suite! 

Why Do You Need a Crypto Price Movement API?

The cryptocurrency market is characterized by intense volatility, with many coins regularly increasing and decreasing in price. These continuous price fluctuations present significant challenges for traders, making it difficult to effectively monitor the market unless they’re full-time in crypto. Consequently, if you’re building decentralized finance (DeFi) platforms like DEXs, cryptocurrency wallets, or portfolio trackers, you desperately need a way to keep your users up-to-date with real-time information!

The easiest way to get real-time cryptocurrency price data is to leverage a crypto price API, which can tell you and your users when a coin’s price increases or decreases. However, an API for crypto price movement – such as Moralis’ Why Did It Move API – takes this one step further, giving you additional information on why the price of a coin moves.

With this data, you can seamlessly set up price notifications that briefly explain the reasons behind a coin’s price action. This can help boost user engagement and give your project a competitive advantage, making it stand out in the market. 

Now, to better explain why you need a crypto price movement API, let’s take the following section to explore the WDIM API in further detail to highlight the benefits of this industry-leading tool! 

Why Did It Move API – Understand How the Crypto Market Moves 

While there are multiple Web3 APIs telling you when a coin moves, the WDIM API gives you a one-sentence explanation for why a coin is increasing or decreasing in value. Consequently, it’s a game changer for anyone looking to build DeFi platforms like decentralized exchanges, portfolio trackers, and crypto wallets! 

So, how does the WDIM API work? 

Moralis’ system tracks and monitors 100+ of the market’s top cryptocurrencies and immediately notifies our in-house team of world-class researchers as soon as a significant price movement is detected. From there, the team then scans the market for any news-related event that might have triggered the price action. Once a match is found, they type up a brief sentence explaining why it occurred.

You can then seamlessly query these sentences to send engaging price movement and news flash push notifications to your users. In doing so, you can significantly boost engagement and provide extra value to your customers. 

Here’s an image showing you an example of what it might look like in practice: 

You can also use the WDIM API to query historical events and provide real-time updates. With this data, you can, for instance, create news feeds for particular coins.

All in all, while most dapps use basic APIs to notify users when a coin’s price changes, you can gain a competitive edge by leveraging the WDIM API. This enables you to inform your users not just about the price fluctuations but also provide insights into why the price of a coin increases or decreases!

Why Should You Use Moralis’ Why Did It Move API?

The WDIM API offers a multitude of benefits and advantages. In this section, we’ll cover a few reasons why you should be leveraging this tool when building dapps: 

  • Create Engaging Notifications: Cryptocurrency investors and traders always seek unique market insight to understand why a coin is increasing or decreasing in price. With the WDIM API, you can seamlessly set up engaging notifications to give your users this information in real time. 
  • Historical Insights: The WDIM API lets you query past sentences explaining why the price of particular coins increased or decreased. With this data, you can give your users historical insights into any coin’s price movements by setting up a timeline or news feed.
  • Gain a Competitive Advantage: While most dapps give insight into when coins move, you can seamlessly leverage the WDIM API to give your users data on why a cryptocurrency increases or decreases in price. This will make your platform stand out, giving you a clear competitive advantage that can attract a lot of users.

Nevertheless, that gives you an overview of the WDIM API. In the next section, we’ll dive into the code to showcase how easy it is to use this industry-leading tool! 

How Exactly Does the Why Did It Move API Work? 

Using the WDIM API is super simple, and in this section, we’ll show you how it works in practice. In fact, all you need is a single API call to the https://wdim.moralis.io/api/v1/news endpoint. Here’s an example of what it might look like: 

// Dependencies to install:
// $ npm install node-fetch --save
// add "type": "module" to package.json

import fetch from 'node-fetch';

const options = {
  method: 'GET',
  headers: {
    accept: 'application/json',
   'Authorization': 'Bearer YOUR_API_KEY'
  },
};

fetch('https://wdim.moralis.io/api/v1/news', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

You simply need to add your API key from Moralis to the code above by replacing YOUR_API_KEY. In return for calling the endpoint, you’ll get a response looking something like this: 

{
  //…
  "page": "1",
  "result": {
    "id": 1,
    "token_address": "0x046eee2cc3188071c02bfc1745a6b17c656e3f3d",
    "token_symbol": "RLB",
    "token_name": "Rollbit Coin",
    "chain": "ETH",
    "change_in_percent": 11,
    "headline": "On-chain volume shows heavy wallets accumulating RLB, leading to an 11% increase today.",
    "time_of_price_movement": "2023-10-13T12:00:00.000Z",
    "movement": "Positive",
    "updated_at": "2021-10-11T00:00:00.000Z",
    "created_at": "2021-10-11T00:00:00.000Z"
  }
//…
}

You can then use the information returned from the WDIM API to set up real-time notifications explaining why the price of a coin has moved! 

If you’d like to test it yourself, check out the Why Did It Move API reference in our documentation! 

Case Study: How Delta Uses the WDIM API to Engage Users & Boost Revenue

Delta is an industry-leading platform enabling you to track all your assets in one place. This includes stocks, cryptocurrencies, NFTs, and other digital assets. To give their Pro users the latest news on why the price of a coin increases or decreases, Delta is leveraging Moralis’ Why Did It Move API!

With the help of the WDIM API, Delta Pro users now get to enjoy real-time explanations and historical data for why cryptocurrency prices move either up or down. This strategic integration has not only improved user engagement for Delta but has also led to a notable increase in subscriptions for their Pro plan.

So, if you want to take your projects to new heights, follow the examples of industry leaders like Delta and start using the Why Did It Move API to boost engagement, improve user value, and increase revenue! 

Beyond Our Crypto Price Movement API – Exploring Moralis Further 

The WDIM API is just one of many helpful resources in Moralis’ Web3 API suite. In this section, we’ll explore Moralis a bit further.

So, what exactly is Moralis?

Moralis is the industry’s #1 Web3 API provider! With Moralis’ dynamic tools, you can effortlessly get and integrate on-chain data and blockchain functionality into your projects. As such, when working with Moralis, you can build everything from crypto wallets to DEXs without breaking a sweat. 

To highlight the power of Moralis, we’re going to look at three other interfaces you can use together with our crypto price movement API to build dapps:

  • Price API: Moralis’ Price API is the most complete API for crypto prices, covering everything from the smallest coins to established cryptocurrencies. With this tool, you can effortlessly get the current price of any token, make batch requests, etc. 

    For example, with the getTokenPrice() endpoint, you can easily get the price of any token:
const response = await Moralis.EvmApi.token.getTokenPrice({
  "chain": "0x1",
  "address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0"
});
  • Wallet API: The Wallet API supports 500+ million addresses across the biggest blockchains, including Ethereum, Polygon, BNB Smart Chain, and others. With this industry-leading API, you can seamlessly fetch the native balance, NFT balance, transactions, etc., of any wallet with single lines of code. 

    For instance, here’s the getNativeBalance() endpoint in action, showing you how to fetch a wallet’s native balance: 
const response = await Moralis.EvmApi.balance.getNativeBalance({
  "chain": "0x1",
  "address": "0xDC24316b9AE028F1497c275EB9192a3Ea0f67022"
});
  • Token API: The Moralis Token API allows you to query and integrate real-time token prices, balances, and more into your dapps. As such, with this tool, you can build everything from DEXs to portfolio trackers. 

    For example, with the getWalletTokenBalances() endpoint, you can get the ERC-20 token balances of any wallet: 
const response = await Moralis.EvmApi.token.getWalletTokenBalances({
  "chain": "0x1",
  "address": "0x1f9090aaE28b8a3dCeaDf281B0F12828e676c326"
});

Check out our Web3 API page to learn more about all our interfaces! 

Also, did you know that you can access our APIs for free? As such, if you haven’t already, sign up with Moralis now! 

Summary: Crypto Price Movement API – Understand Why Crypto is Up Or Down 

In today’s article, we kicked things off by answering the question, ”Why do you need a crypto price movement API?”. In doing so, we learned that the crypto market is highly volatile, making it difficult for investors to monitor it. Consequently, when building DeFi platforms like DEX, portfolio trackers, and crypto wallets, it’s essential to keep users up-to-date on when and why the price of a crypto increases and decreases. 

However, while most standard APIs provide updates when a coin’s price changes, they generally don’t give information as to why. Fortunately, this is where Moralis’ WDIM API now enters the equation! 

When a coin’s price increases or decreases, Moralis’ WDIM API provides a one-sentence explanation for what’s behind the price action. You can then seamlessly query this information to set up real-time alerts and inform your users about recent events. This will allow you to boost engagement and improve user value. 

Next, we dove into an early success story, discovering that Delta – an established portfolio tracker platform – leverages Moralis’ WDIM API. In doing so, they have been able to increase user engagement and signups for their Pro plan.

To top things off, we introduced you to some additional Moralis tools that work perfectly together with the WDIM API. In doing so, we covered the Price API, Wallet API, and Token API. 

If you liked this crypto price movement API guide, consider reading more content here on the blog. For instance, if you’re new to the Web3 space, check out our latest guides exploring the Ethereum ecosystem as well as the Polygon ecosystem. Also, if you want to take your development endeavors to the next level, don’t forget to sign up with Moralis. You can create an account for free, and you’ll get instant access to our industry-leading Web3 APIs! 

Market Data API
Build amazing trading and portfolio dapps with this Market Data API. Keep users engaged with up-to-date data!
Market Data API
Related Articles
February 20, 2024

Crypto Portfolio Tracker Endpoint – Get Portfolio Data with a Single API Call 

February 2, 2023

Aptos Testnet Faucet – How to Get Testnet APT from an Aptos Faucet

August 29, 2022

How to Add MetaMask Authentication with Django in 5 Steps

December 19, 2022

Ultimate Guide to Ethers.js Events and How to Use Them

October 25, 2023

What are Meta Transactions? Exploring ERC-2771

February 3, 2023

How to Get Started with Solana Blockchain App Development

November 6, 2022

Web3 Provider – Why Blockchain Developers Should Use One

October 18, 2022

Add Dynamic Web3 Authentication to a Website

January 29, 2023

Fantom Testnet Faucet – How to Get Testnet FTM from an FTM Faucet