Skip to content

Latest commit

 

History

History
33 lines (25 loc) · 986 Bytes

README.md

File metadata and controls

33 lines (25 loc) · 986 Bytes

Takes data from Coingecko for use in Google Sheets

Price Data

Paste this into the Tools >> Script Editor (replace YOURAPIURL with your deployed url)

function priceapi(crypto_id){
  var full_url = 'https://YOURAPIURL/api/'+ crypto_id;
  var response = UrlFetchApp.fetch(full_url);
  var data = JSON.parse(response.getContentText());
  return data['price'];
}

To get the price in a cell (replace "COINGECKO_COIN_ID" with "Bitcoin", etc.)

=priceapi("COINGECKO_COIN_ID")

Image

In a cell use (replace YOURAPIURL with your deployed url)

=image("https://YOURAPIURL/api/image/COINGECKO_COIN_ID")

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.