Coder Social home page Coder Social logo

crypto-currency-price's Introduction

Crypto-Currency-Price

Function to get price of a cryptocurrency into a google drive sheet. Uses the coinmarketcap api
The Function takes in two parameters:

The cryptocurrency that you want the price of
The currency (or other metric) that you want the price of the cryptocurrency to be returned in

To use in google sheets:

  1. Open script editor (Under tools)
  2. File new "script file"- give it a name
  3. Paste ccprice code and save
  4. In your sheet, type in =ccprice(cryptocurrency, currency)
    example:
    =ccprice("ethereum", "USD")

The currency parameter accepts the following currencies:
"BTC", "USD", "AUD", "BRL", "CAD", "CHF", "CNY", "EUR", "GBP", "HKD", "IDR", "INR", "JPY", "KRW", "MXN", "RUB"

The currency parameter also accepts the following:
"24h_volume_usd", "market_cap_usd", "available_supply", "total_supply",
"percent_change_1h", "percent_change_24h", "percent_change_7d", "last_updated"

The percent_change is in USD.

If the cryptocurrency parameter isn't working, then find your cc on coinmarketcap and use the name in the website address. For example:

https://coinmarketcap.com/currencies/ethereum-classic/
so you would type in =ccprice("ethereum-classic", "btc")

https://coinmarketcap.com/currencies/heat-ledger/
so you would type in =ccprice("heat-ledger", "btc")

The function should automatically update every 10 minutes. If it doesn't, try refreshing the page. If this still isn't working, then try cutting and pasting the sheet to "jumpstart" the API call.

Show some love:
0x32484F2628CB1D780e75E7b76Ecc05Fa14D88092 (ETH)
LYAUXKTHjtK2iWEyVKPyQrbwLv9vT2vevs (LTC)

crypto-currency-price's People

Contributors

rathergood avatar tmattimore avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.