Skip to content

helloivanco/priceapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Get data from CoinGecko.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published