Bitcoin Arbitrage Visualization with Google Sheets

If you have access to international bitcoin exchanges, you might be able to take advantage of bitcoin arbitrage opportunities. Google Sheets has a great Scripts features that allows you to program requests to APIs in Javascript and I will show you how to store all of that data in Google Sheets and even receive email alerts at a predefined threshold.

We’ll be using Coinbase and Indodax as our two exchanges with arbitrage between USD and IDR.

First let’s create a function to fetch data from Coinbase:

JavaScript

Next let’s build our function to fetch data from Indodax:

JavaScript

Lastly, let’s get currency exchange data from USD to IDR:

JavaScript

Above we merely fetch exchange data and read the data that we fetched from Coinbase and Indodax and run some simple calculations to determine what the spread is. We added a 5% threshold to send an email alert when arbitrage opportunities exist.

Now all that remains is to create triggers for the functions to run at the intervals you want.

And as you can see in the image below, we have opportunities for arbitrage between 3-6% every few weeks.

BTCUSD, BTCIDR, BTCUSDIDR, USDIDR and MAX SPREAD