PRICE
=CS.PRICE
In its simplest form, the PRICE function says
=CS.PRICE(what base asset, what quoted asset, at what date or time, from what exchange, which type of price)
Use Case Scenarios
When you need to quickly pull in the latest price for specific assets pairs or the historical price at specific times
PRICE - Syntax
Function arguments
Arguments: =CS.PRICE("base","quote","time", "exchange", "returnType")
Example Values: =CS.PRICE("BTC","USD","1/1/2020","COINBASE","BID")
Function argument descriptions
- base: The cryptocurrency symbol of interest. [string] required
- quote: Cryptocurrency symbol to convert into [string] required
- time: Time at which exchange rate is calculated. (Optional, if not supplied then current rate is returned) [string] optional
- exchange: Exchange to retrieve rate from. (Optional, if not supplied then current vwap rate is returned) [string] optional
- returnType: Return value of rate. (Optional but required when exchange is specified. If not supplied, the mid price is returned. Possible values include mid, ask, bid.) [string] optional
PARAMETERS - Absolute vs. Relative
Absolute Parameter Values
Formulas using absolute values for arguments with multiple parameters must be referenced inside an array using {"curly_brackets"}
and will look like this:
=CS.PRICE("BTC","USD","1/1/2020")
Relative Parameter Values
Formulas using referenced values for arguments with multiple parameters must be referenced inside an array using a defined range and will look like this (*Note - {"curly_brackets"}
are NOT required when using referenced values):
=CS.PRICE("A1","A2","A3")
Click here to search for supported assets & exchanges
PRICE - Examples
TIP: Try copying + pasting the example formulas directly into your worksheet
Example 1:
=CS.PRICE("BTC","USD")
Example 2:
=CS.PRICE("ETH","USD","2019-01-01")
Example 3:
=CS.PRICE("BTC","USD","2011-01-01")
Example 4:
=CS.PRICE("BTC","USD","2011-01-01","COINBASE","BID")
Example 5:
Using combinations to build a simple template
Troubleshooting
-
Check your formula syntax for carefully, different functions for the same data may have slightly different required syntax
-
Check the required arguments for your function vs the optional arguments
-
Check your data & API quotas and limits
-
Check your formulas carefully
-
Check your relative references
-
Use Excels error checking tools
-
Error Response Codes Reference
- #N/A OK – Everything worked as expected
- #BUSY Heavy query and/or unauthorized – Your User/Password API Keys are incorrect
- #LIMIT Forbidden – You are not subscribed to the data feed requested
- Other Something else? Reach out to us directly
Additional Resources
For Microsoft Excel
- Web browsers used by add-ins
- Office versions and requirement sets
- How to check your Office version
- Install the latest version of Office
- Custom Function Requirements
For Googlesheets