Crypto Excel » Docs_functions Fetch OHLCV
Fetch OHLCV Open, High, Low, Close, Volume (OHLCV/candels) from a selected exchange, trading pair, time frame and dates into Excel.
=ST_OHLCV( exchange, symbol, TF, since_tf, to_tf, [limit_tf], [sec], [reverse])
Parameter | Required | Description | Example |
Exchange | Y | Exchange name (e.g., binance, coinbase, kraken, my_exc) | “binance” |
Symbol | Y | Trading pair | “ATOM/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 |
limit_tf** | N Default 100 | Max numbers of bars for each request | 500 |
sec | N Default 2 | Sec between consecutive request | 1.5 |
reverse | N Default 0 | 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
Required: Y
Description: Exchange name (e.g., binance, coinbase, kraken)
Example: “binance”
Required: Y
Description: Trading pair
Example: “BTC/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 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 0
Description: Time order
Example: 1
Value | Description |
Time | Local time TF started |
Open | Open TF price |
High | Highest TF price |
Low | Lowest TF price |
Close | Close TF price |
Vol | Volume |
Local time TF started
Open TF Price
Highest TF price
Lowest TF price
Close TF price
Volume
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 OHLCV function returns Date, Open. high, Low, Close, Volume ( also called bars or candels) for a specific period and time frame Historical OHLCV is the base for backtesting. This function does not require Authentication