Exchange ohlcv
ExchangeOHLCV
¶
fetch_historical_ohlcv
¶
Fetches historical OHLCV (Open, High, Low, Close, Volume) data for a specified contract.
This asynchronous method retrieves the specified number of historical candle data pages for a given contract and timeframe. It can be used for various candle manipulation operations.
Attributes:
Name | Type | Description |
---|---|---|
contract |
Contract
|
The contract for which historical data is being fetched. |
timeframe |
str
|
The time interval for the OHLCV data (default is "1d"). |
pages |
int
|
The number of pages of data to fetch (default is 3). |
reload |
bool
|
Flag indicating whether to reload data if it exists (default is False). |
Returns:
Name | Type | Description |
---|---|---|
Bars |
Bars
|
An instance of Bars containing the historical OHLCV data. |
Examples: