Crypto Excel » Docs_functions Fetch Convert History
Convert multiple coins to another coin/fiat for a specific Time Frame and period using historical data from a specific exchange
=ST_OHLCV( from_coin, to_coin, TF, since_tf, to_tf, [exchange], [limit_tf], [sec], [val_100], [reverse])
Parameter | Required | Description | Example |
from_coin | Y | Coin you want to convert. Can be a range ( multiple coins) | “BTC”, “ETH” |
to_coin | Y | Coin/fiat | “USDT” |
TF* | Y | Time frame | 1m, 1d |
since_tf | Y | Starting date mm/dd/yy hh:mm | 10/15/24 20:00 |
to_tf | Y | End date mm/dd/yy hh:mm. can be now | 10/15/24 22:00/now |
exchange | N Default Binance | Exchange you want to use for the conversion | “bitmex” |
limit_tf** | N Default 100 | Max numbers of bars for each request | 500 |
sec | N Default 2 | Sec between consecutive request | 1.5 |
val_100*** | N Default 0 | Show historical value of 100 to_coin | |
reverse | N Default 1 | 0/1 Time order |
*Every exchange supports different time frame, Use st_ohlcv_tf(exchange) to know which tf are supported.
** There is a limit to the number of bars you can obtain for each request. you can change the default value but you need to read the Exchange’s docs to get the max number allowed
*** in the figure 100 USDT of BTC at the end of the period are worth 140 USDT. 100 USDT of LTC at the end of the period are worth 80 USDT
Required: Y
Description: Coin you want to convert. Can be a range ( multiple coins)
Example: “BTC”
Required: Y
Description: coin/fiat
Example: “USDT”
Required: Y
Description: Time Frame
Example: 1m, 1d
Every exchange supports different time frame, Use st_ohlcv_tf(exchange) to know which tf are supported.
Required: N
Description: starting date mm/dd/yy hh:mm
Example: 10/15/24 20:00
Required: N
Description: End date mm/dd/yy hh:mm. can be now
Example: 10/15/24 23:52
Use Now if you want to get te time series ending to the last available tf
Required: N. default binance
Description: Exchange name (e.g., binance, coinbase, kraken)
Example: “bitmex”
Required: N default 100
Description: Max numbers of bars for each request
Example: 500
Required: N default 2
Description: Sec between consecutive request
Example: 2.5
Required: N default 1
Description: Show historical value of 100 to_coin
Example: 0
in the figure 100 USDT of BTC at the end of the period are worth 140 USDT. 100 USDT of LTC at the end of the period are worth 80 USDT
Required: N default 1
Description: Time order
Example: 1
Value | Description |
Time | Local time TF started |
from_coin/to_coin….. | Conversion rate |
100_from_coint/to_coin | historical value of 100 to_coin |
Local time TF started
Conversion rate
historical value of 100 to_coin
This function send multiple requests to the exchange to fetch all the bars you need. It consumes your rate limit. Fine tune your requests using limit_tf and sec
Tip. Use st_watch_requests() to monitor your requests.
The Convert History function converts multiple coins to another coin/fiat for a specific Time Frame and period using historical data from a specific exchange. When the val_100 option is on (default) different equity lines for buying 100 worth of to_coin are shown.
In the figure 100 USDT of BTC at the end of the period are worth 140 USDT. 100 USDT of LTC at the end of the period are worth 80 USDT
Use this function for portfolio tracking and correlation analysis.
This function does not require Authentication