How to view KuCoin exchange prices in Google Sheets

If you want to see the value of your KuCoin exchange coins in Google sheets, like this:

kucoin gs.PNG
then you just need a little code.

Step 1: Enter code editing mode in Google sheets

Step2: Enter the code

kucoin.PNG

Here it is for copy and pasting:

function Get_KuCoinPrice(market)
{
// example HST-BTC
var url = "https://api.kucoin.com/v1/open/tick?symbol="+market;
var response = UrlFetchApp.fetch(url);
var text = response.getContentText();
var myjson = JSON.parse(text);
var price = myjson.data.lastDealPrice;
return price;
}

Step 3: Call the code in your sheet

Capture.PNG

Step 4: Enjoy!

Some example Markets are:

  • DBC-BTC (for Deep Brain Chain)
  • KCS-BTC (for KuCoins themselves)
H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now
Logo
Center