TimeFrame Enum Verification with Market Data Source Timeframe #299
-
Hi everyone, I’m new here and came across an issue related to verifying the time_frame against an enum value in the market data source. Issue Description: path : investing_algorithm_framework/services/market_data_source_service/market_data_source_service.py
I am passing the following values for the data source:
Problem: This could cause mismatches if from_value(time_frame) does not correctly map "2h" to TimeFrame.TWO_HOUR. Questions: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hey @beecoder79, thanks for reaching out. I think you're probably using an old version of the framework. Because the CCXTOHLCVMarketDataSource has the time frame param spelled as btc_eur_ohlcv_2h = CCXTOHLCVMarketDataSource(
identifier="BTC/EUR-ohlcv-2h",
market="BITVAVO",
symbol="BTC/EUR",
time_frame="2h",
window_size=200
) |
Beta Was this translation helpful? Give feedback.
Hey @beecoder79, thanks for reaching out. I think you're probably using an old version of the framework. Because the CCXTOHLCVMarketDataSource has the time frame param spelled as
time_frame
. I assume here you're encountering a bug that has been solved already. For example the following code should work. Can you please check you version of the framework you have installed. Also make sure that you're using python 3.10 or higher, because that is compatible with the latest version of the framework. If you're using a python version below that, pip will automatically use an older version of the framework.