Amberdata Blog

Which Blockchain Data API is right for you?

Written by Amberdata | Jun 14, 2019

In this post, we’ll compare solutions for accessing Ethereum blockchain data as well as crypto and DeFi market data via a blockchain API. There are many great services available now, which one is right for your use case? What are the strengths and weaknesses of each? Let’s dive in.In this post, I will be comparing solutions for accessing Ethereum blockchain data as well as market data. There are many great services available now, which one is right for your use case? What are the strengths and weaknesses of each? Let’s dive in!

Overview

  • Integrating Blockchain 👩🏻‍💻
  • Use Case 1:  Wallets 💰
  • Use Case 2:  Investors & Traders 📈
  • Use Case 3: dApps & developers 💻
  • Websocket Comparison 🔊
  • Speed & Latency Comparison 🚀
  • Sustainability Comparison 🏔
  • Amberdata vs Blockchain Data Providers ⛓
  • Amberdata vs Market Data Providers 📊

Integrating Blockchain Data in DeFi Products

Using blockchain technology in your DeFi products and services is beneficial for use cases like enabling transparency and trust for users or updating your system so it’s easier to integrate with intermediaries. There are several ways you can do this: run your own network of blockchain nodes, connect your service to an existing blockchain, or setup a side-chain to mimic an intermediary.

In each case, you’ll need to access the appropriate blockchain data directly through a blockchain API. There are several protocols that make this happen: REST API, GraphQL, and JSON RPC/gRPC. These connections allow products to ask for or receive all blockchain data, but it is simplified to the exact data model the blockchain in question uses. When you need data from multiple blockchains, you’ll need an API that can aggregate all of the complex data from multiple sources.

In addition to blockchain data, you need economic context and market data to supplement transactions. Market data is available, but you’ll find that its fairly raw—the data is at the exchange level, there are too many pairs, the orders seem disjointed from on-chain activity. However, making sense of the data can be simplified with a crypto market data provider to give the data context without having to build the aggregations for your product.

Integrations are not difficult, but finding the right blockchain API provider for your product can be difficult. Let’s explore a few example use cases to better inform your decision matrix.

Use Case 1: Cryptocurrency Wallets

To participate in blockchain technology, you need a cryptocurrency wallet. This wallet holds data about your account balance, token holdings, portfolio & market value. Wallets are applications that create a private key (like a password), and a public key (username) and communicate with blockchains to exchange directly. Wallets like Exodus, Alpha, Trust Wallet, MyEtherWallet, and MetaMask are popular private key wallets. There are also services that enable custodial wallets for users who are not tech-savvy enough to manage their wallet's private keys. In every case, wallets need a few data types:

  1. Blockchain Address Balances: Bitcoin, Ether, Doge, tokens, etc.
  2. Blockchain Activity and History: transactions, token transfers
  3. Market Point-In-Time Prices: Bitcoin, Ether, tokens, etc.
  4. Market Trading Activity of X: Bitcoin, Ether, tokens, etc.

With those items in mind, let’s look at a comparison of services to accomplish all the functionality:

Generally speaking, DeFi products would need to maintain connections to multiple third-party blockchain data providers, unless you use Amberdata and aggregate data from a single unified blockchain API.

Generally speaking, your product would need to maintain more than 1 connection to a 3rd party provider, unless you use Amberdata.

Use Case 2: Investors & Traders

Cryptocurrency arbitrage trading is rapidly gaining traction for both retail and institutional investors and traders. For those interested in statistical or anomalous patterns, crypto trading is a perfect testing bed. There are high risks, low liquidity (compared to traditional markets), and disjointed information, but this doesn’t mean there isn’t an opportunity for rewards. Currently, making informed decisions requires a few key crypto market data sources:

  1. Crypto Pair Activity: trading volume, velocity, sharpe, VWAP, TWAP
  2. Crypto Exchange: pair values, crypto liquidity, trades
  3. Crypto Order Book Data: cryptocurrency historical data, real time updates
  4. Blockchain Transactions: token transfers, cryptocurrency transactions
  5. Blockchain Account: balances, historical holding, tokens
  6. Blockchain DEX: historical holders, transfers, volume

If you’re building algorithmic trading, you’ll also need market data to backtest investing strategies.  

The comparison below shows providers enabling these features:

Trading platforms like KuCoin, trade.io, and Binance build integrations directly to many exchanges and connect to several third-party providers. However, Amberdata is the clear choice for building seamless integrations with blockchain data, DeFi data, and crypto market data into your product with a single connection point

Use Case 3: dApps & developers

Definition of a dApp: A decentralized application, that runs within a blockchain and can autonomously execute code upon interaction written by developers. Interacting with a dApp occurs either on-chain or between a service and the chain. In the context of Ethereum, a dApp is mainly a smart contract deployed as bytecode, stored in a blockchain. The main data needed to run a successful dApp includes:

  1. Contract ABI: parseable format for client interactions
  2. Contract Info: token data, supply, specifications
  3. Contract Runtime: events, logs, transactions, internal transactions

Additionally, most dApps have a “Token” functionality, which provides an economic model to govern usage of a contract. It is possible to view token usage & activity with the following data:

  1. Token Economic: supply, volume, velocity, ranking
  2. Token Usage: holders, holdings, adoption, retention
  3. Token Portfolio: user balances, related holdings

Does a dApp really need all of this functionality if it is running in a decentralized ecosystem? We would instead suggest that continual usage by the community requires support with ongoing DeFi data and metrics, backed by a reliable data provider to ensure the economics, token supply, and contract remain stable. Using Amberdata provides a leg up on the competition, especially for ongoing dApp activity.

Websockets Comparison

At this point, real time data is the industry standard. Let’s look at a few core needs as well as helpful performant methods. Here, we're‌ showing websocket use cases in some of their most frequent combinations: 

  1. Market Events:  cryptocurrency order books, trades, bbos
  2. Blockchain Core Events: blocks, transactions, internal transactions
  3. Blockchain dApp Events: token transfers, contract logs/events, transactions, pending transactions

You product is special and unique—give it a boost by using fine tuned websockets!

Speed and Latency Comparison

Let’s take a look at a few endpoints and compare them. There is no better way to show strengths and weaknesses than a latency test! For the following endpoints we used artillery.io, which analyzes latency and repeatedly hits the endpoints for a sum average. Here are the results using some of the top used endpoints:

1. Get Account Balance

Sources: Amberdata, Etherscan, Blockcypher, Alethio, Blockscout

2. Get Address Transactions

Sources: Amberdata, Etherscan, Blockcypher, Alethio, Blockscout

3. Get Transaction

Used this transaction →

Sources: Amberdata, Etherscan, Infura, Blockcypher, Alethio, Blockscout

4. Get Block

Sources: Amberdata, Etherscan, Infura, Blockcypher, Alethio

5. Get Block Transactions

Sources: Amberdata, Etherscan, Infura, Alethio

6. Get Contract Source Code

Sources: Amberdata, Etherscan, Infura, Blockcypher, Blockscout

A few things to note: we did not compare the write abilities of these providers, only read endpoints. These results used a minimum of 10 requests, ~1per/second. At time of writing, each endpoint test used as many competitors as were available or had documentation.

Sustainability Comparison

We believe in the continuation of Ethereum. This requires a sustainable ecosystem not based on simple generosity, but on realistic business models. Building DeFi products requires the sound knowledge that access to an integrated blockchain will not get disconnected, interrupted, or deprecated. The phrase “if a product is free, you’re the product” is a cliche for a reason—free services do not offer the type of binding contract or SLA for necessary protection and security.

We’ve looked at individual use case comparisons, now for the bigger picture: as your product grows, you'll need assurance that you can support more features and requests to be successful.

Amberdata vs Blockchain Data Providers

Amberdata vs Market Data Providers

Excellent, I’m sold—get me started!

Taking the next step towards a unified blockchain API is simple: