If you’re planning to develop an application that will have any interaction with blockchains or cryptocurrencies, then you’ll need an API at some point. Whether your app is a fully decentralized dApp running on a blockchain such as Ethereum, or you’re a merchant looking to accept cryptocurrencies on your online store, or you want to configure a bot for algorithmic trading, there’s an API for that.
Once you know what you want your app to do, you can decide which API is best suited to your purpose. Here are five tried-and-tested APIs from reputable developers, all offering different features and functionality.
The Coinbase API offers various features for app owners. Coinbase Connect enables you to connect your app to over four million Coinbase wallets. This allows wallet owners to agree to let your app either fully or partially access their accounts, using the OAuth2 protocol to protect their login credentials.
Another feature is merchant payments. Online vendors can use the API to integrate Coinbase payments to their checkout page, enabling them to accept payment in cryptocurrencies. The API is quick and easy for anyone to set up and takes care of generating wallet addresses for the merchant to receive their payments from customers.
Pro-traders can also use the Coinbase Pro API to configure algorithmic trading or track market movements.
Blox is perhaps best known for its cryptocurrency accounting services. The company integrates with exchanges, blockchains, and wallets to provide individuals, enterprises, and accountants full visibility of their crypto accounting, for tax purposes or otherwise. The Blox blockchain API also allows anyone to take advantage of this querying capability.
The Blox API serves up standardized blockchain, exchange, and wallet data, meaning it can easily be read and analyzed by your application. This standardization also makes it easy to add more blockchains or exchanges to your app as needed, without further configuration for different feeds.
The API reads address balances and transaction history from multiple sources. These include major blockchains such as Bitcoin, Bitcoin Cash, Litecoin, and Ethereum - the latter giving access to transaction data for the entire catalog of ERC20 tokens.
The API is also connected to big exchanges, including Binance, OKEx, Coinbase, and Kraken, along with custody services such as BitGo.
The Blockchain.com developer toolkit is the oldest, best-supported and most widely used dev set currently available, with a community of around 25,000 developers worldwide. While it’s use is limited to the Bitcoin blockchain, it offers a comprehensive range of features.
Merchants can use the Blockchain API to set up their sites to receive payments in Bitcoin. There is also the opportunity to send and receive payments from Bitcoin wallet addresses,and to query transaction and block data on the Bitcoin blockchain. Websockets provides a low-latency streaming socket channel for data on new blocks and transactions.
All data is stored in JSON format, so it’s easy to implement. The Blockchain API is also extremely stable with low timeouts.
Ethers.js is a complete and compact library for interaction with the Ethereum blockchain. Compressed down to only 88kb, Ether.js is a lightweight alternative to web3.js, the most commonly-used library for Ethereum smart contract programmers. Ethers.js is licensed by MIT.
It also offers several developer features that go beyond web3.js. Ethers.js segregates key management and interaction with the blockchain, making it more flexible to use. Users also have the option of entering an ENS address, reducing the risk of errors resulting from typing out long, complicated contract addresses.
New developers will find it easy to get started with Ethers.js due to the extensive library of documentation. Ethers.js can be used together with a tool such as Ganache, which enables you to set up your own private implementation of the Ethereum blockchain. This means you can run multiple tests of your dApp functionality without incurring gas costs on the live Ethereum blockchain.
The Factom API provides developers with a decentralized storage solution via its blockchain platform. It’s ideal for any app handling data and files, as the API can handle more than merely read/write functionality. It can also manage other elements of document management, including version control and dependencies between different documents.
With these features available on the Factom blockchain via the API, anyone can prove that data existed at a fixed point in time, with timestamps witnessed by the nodes on the network.
There are many more types of APIs available in the crypto world from all kinds of providers. For example, ranking site CoinMarketCap provides an API so users can have access to its coin metrics. Like Coinbase, many exchanges also offer an API so traders can set up trading algorithms.
However, the APIs listed here cover most of the major use cases for APIs across the blockchain sector. Regardless of what kind of app you’re developing, the broad availability of APIs means it’s never been easier to incorporate blockchain into your project.