Exchange: support availabe spot values#335
Exchange: support availabe spot values#335brandsimon wants to merge 1 commit intoscrtlabs:developfrom
Conversation
|
Thanks @brandsimon for your contribution.
|
|
@lenak25 Thank you for your response and explanation, I think I understand the underlying problem now (at least a bit better). I dont think it is a good approach to support different fields in live and backtest mode, it is only confusing and I dont think, it is a good solution to have different code for backtest and live mode. So either solution 1 or 3 makes sense to me. If I see it correctly, when I access the volume with current, in backtest mode I get the current volume (1T) and in live mode I get the 24hr volume. From the terminology "current", I would expect the current volume to be 1T (like I get the current price) and not the "history" volume. Any thoughts on this? |
|
You are correct, not all exchanges support the 1 minute frequency - Poloniex for example. |
|
Please let me know, if I can help with something. |
|
Thanks @brandsimon ! |
The documentation says, that open, high, low, close, volume, price and last_traded is supported, but only close/price and volume was supported. I changed it now, but the documentation is still incorrect, because dt and data_frequency is not used. I think, the documentation just got copied from DataPortal::get_spot_value. I changed it, so I can use data.current for backtesting and live-trading.
I have not found tests for this, if I should write some, please let me know, where the appropriate place is.