Tips for a more efficient Cryptofinance sheet.
This means don’t use
=CRYPTOFINANCE("BTC/USD")and other similar calls, but call a full market listing to get all markets data in 1 API request.
Here is how to use a full listing:
- 1.Create a new sheet, name it
cryptodata, then on cell
A1type the formula
=CRYPTOFINANCE("KRAKEN"). This will create as many rows as there are markets tracked on Kraken.
- 2.From there you can just reference this data from your actual work sheet like this
=cryptodata!C2. This will show the price of the first market listed.
As the row order may change at each refresh (they are sorted by quote asset), here is how to make your cell references sticky:
=INDEX(cryptodata!A1:Z, MATCH("btc/usd",cryptodata!B1:B,0), 3)
Here is how it works, in order:
MATCHwill search for
btc/usdin the sheet
cryptodataon the column
Band return the matching row number.
INDEXwill look at the
cryptodatasheet and return the value that is at the row number returned by
MATCHand at the column
3is where the price is, you can change it to
14for volume info, and so on.
Wrap your cell references with
VALUE()to be able to format the cell.
So your references will look like, if you reference cell
If you’re using a full market listing (you should), and use the sticky reference explained above, your reference looks like:
=VALUE(INDEX(cryptodata!A1:Z, MATCH("btc/usd",cryptodata!B1:B,0), 3))
You might be tempted to code a small function, say to refresh the rates, and use a time-driven trigger to get your data refreshed each minute. The issue is that the rates will keep being refreshed even when the sheet is closed, and will make you hit the 20,000 API call quota too fast.
Many users, even with a small number of calls to
CRYPTOFINANCE, are being blocked by the API call quota, even though simple math shows they should be from the quota limit. It is not possible to know how much of the current quota has been use at any given time.
Not available for Excel.
Not available for Airtable.