All Collections
Custom Functions
How to Automatically Refresh Cryptosheets Custom Functions Data in Excel & Googlesheets using CS.TIME
How to Automatically Refresh Cryptosheets Custom Functions Data in Excel & Googlesheets using CS.TIME

Learn how to refresh any Cryptosheets custom function dataset (aka formula) using one single formula

C
Written by Chris Ware
Updated over a week ago
`👉 IMPORTANT - UPDATED 2/1/2021 TO INCLUDE PRICEA EXAMPLES (PLEASE SEE BELOW)`

# OVERVIEW

Any custom function, data set or endpoint accessible in Cryptosheets can easily and automatically be refreshed or updated at any custom interval in Excel or Googlesheets* using one single formula. The formulas are slightly different in Excel vs Googlesheets and there are limitations in Googlesheets, there are none in Excel.

## Automatic refresh is available to paid subscriptions (hobbyist and up*)

1. How Does It Work?

2. Example Use Cases

4. FAQ & Troubleshooting

# ❓ HOW DOES IT WORK?

👉 `UPDATED 2/1/2021`

`With the introduction of the PRICEA custom function (advanced version of the original PRICE function) the best practice for using CS.TIME as an invocation refresh trigger is as follows`

## Excel

1. Type `=CS.TIME(# of seconds)` into any cell (ie \$A\$1)
Example `=CS.TIME(3600)`
👉 3600 seconds / 60 = 60 minutes = 1 hour

2. Using any Cryptosheets custom function, add a reference to a parameter called `refresh` with a value of `=CS.TIME` in it as the parameter value or a reference to a cell with CS.TIME in it (see example below)

Syntax Example 1
`=CSPRICEA("base","BTC","quote","USD","refresh",CS.TIME(3600))`

Syntax Example 2
`=CSPRICEA("base","BTC","quote","USD","refresh",\$C\$5)`

## Excel (DEPRECATED EXAMPLES)

1. Type `=CS.TIME(# of seconds)`  into any cell (ie \$A\$1)
Example  `=CS.TIME(3600)`
👉 3600 seconds / 60 = 60 minutes = 1 hour

2. (DEPRECATED) Using any Cryptosheets custom function, add a reference to the cell with `=CS.TIME` in it as the `time`  parameter or at the very end of the formula if there isn't a `time`  parameter
Syntax `=CSPRICE("base","quote","time","exchange","returnType")`
Example  `=CS.PRICE("BTC","USD",\$A\$1)`
Example 2 `=CS.PRICE("BTC","USD",CS.TIME(3600))`

3. Every time the `=CS.TIME`  function updates, any/all functions that reference it will automatically refresh!

1. In any cell (ie \$A\$1) type `=GOOGLEFINANCE("CURRENCY:USDEUR")`  which will automatically update (about every 2 minutes)

2. Using any Cryptosheets custom function, add a reference to that cell at the very end of the formula for the global `refresh`  argument
Syntax `=CSPRICE("base","quote","time","exchange","returnType","refresh")`
Example  `=CSPRICE("BTC","USD",,,\$A\$1)`
Example  `CSPRICE("BTC","USD",,,GOOGLEFINANCE("CURRENCY:USDEUR"))`

`TIP`
Just be aware of your Cryptosheets account subscription limits Google's quotas and limits as your data will stop refreshing if you run too many requests

# 📈 EXAMPLE USE CASES

So many here can only cover a few

• arbitrage

• recurring charts, reports/

• Very easy and can be done anytime from within the Cryptosheets add-on side panel or from the website

# ⚠️ IMPORTANT WARNING

1. `CS.TIME` might well be the single most powerful tool for Excel I've ever seen. It's a genuine game changer and will improve your quality of life by saving you time, stress and mistakes (#AWESOME)

2. Using automatic refresh features can and will significantly increase your quota usage

3. It is YOUR RESPONSIBILITY to monitor your usage and we will not reset quotas for lower tier accounts that use =CS.TIME() and use up their quota accidentally

4. You can access your current quota usage in real time ANYtime using the billing section in your your settings (Help Center tutorial: See your subscription usage in real time)

________________________________________________________________

# ℹ️ FAQ &TROUBLESHOOTING & RESOURCES

## Troubleshooting

1. Check your syntax for =CS.TIME() carefully, different functions for the same data may have slightly different required syntax

2. Check the required arguments for =CS.TIME() vs the optional arguments

3. Check your data & API quotas and limits

5. Check your local computer & Excel settings for default date, time, geography, format

6. Use Excel's error checking tools

7. Find additional troubleshooting resources and tips here

Other Something else? – Click here for full list of Excel error explanation

For Microsoft Excel

## Cryptosheets is free to sign up and start using now. What are you waiting for?

Signing up for Cryptosheets is free --> Get crypto data in 30 seconds or less