Skip to content
Request a Demo

You read that right, not one but two blockchains just launched on the Amberdata platform! We are happy to announce that just like our previous announcements — Bitcoin, Litecoin — our lineup of services is fully available supporting Websockets, REST, RPC and market data!

TLDR; Today we’re taking a look at how you can develop enterprise grade applications, using a single API and accessing multiple blockchains at once.

Bitcoin Cash & Bitcoin SV are available now, with these features:

  1. REST — A full API with standardized data sets, across blockchains
  2. WebSockets — Streaming data and updates, realtime from the network
  3. RPC — Connect directly to the node without running the node

Use multiple blockchains without building many different integrations. No syncing required, no cli, no protocol learning curve, no dev-ops or server management. Get started quickly and easily!

Let’s look at a few key examples for Bitcoin Cash and SV

0. Get Latest Blocks & Transactions
1. Get Account Balances

We’re also going to look at multi-blockchain integrations, using web3data.js to get data for 5 blockchains:

2. Get Multiple Account Balances
3. Get Websocket Events
4. Connect to multiple RPC

NOTE: While it is possible to do all the above examples in direct requests without a library, it is faster and simple to show code with the SDK.

Important! Get your Free API Key:

Go to Amberdata.io to Get Started.

0. Get the Latest Blocks & Transactions

Using the following code, we are able to configure requests for Bitcoin Cash and Bitcoin SV using a simple namespace variable. This configures the x-amberdata-blockchain-id under the hood, and instantiates all available methods. Click here to edit example →

1. Get Account Balances

The portfolio and address data is by far the most valuable information available. This is accessible either with individual address requests, or by passing multiple addresses and getting many balances at once. Click here to edit example →

2. Get Multiple Account Balances

Now we’re ready for the fun part! Here’s an example of getting a portfolio for a hypothetical user that has cryptocurrency holdings in Bitcoin, Ethereum, Litecoin, Bitcoin Cash & Bitcoin SV. This example shows how it’s possible to get the crypto balances as well as the current market value for each. BONUS — There are also some Ethereum Tokens holdings as well! 🙌

Click here to edit example →

3. Get Websocket Events

Who said data has to be stale? Let’s look at an example of how to listen to transactions from 5 blockchains at once:

Click here to edit example →

4. Connect to multiple RPC

Connecting to a blockchain node directly requires a complicated setup, but no more! Here’s another powerful example of how to call RPC methods to several blockchains, and since we have the SDK its only a few lines of code:

Click here to edit example →

And that’s it! Hope you enjoyed this deep dive into how to access multi-blockchain data.

Get postman collection for easy API testing

For ongoing development, we’ve created a postman collection that covers all of our features and utilizes simple parameters so you can focus on building. Click here to download the collection directly, or go here for tons of resources:

Amberdata API Documentation

Amberdata API documentation, SDK reference, integration guides, sample code, libraries and tutorials

amberdata.io


Tag(s):

Amberdata Blog

View All Posts