catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

data.current('volume') returns 24hr volume in live=True but only 1 frame in live=False

Open gatapia opened this issue 7 years ago • 4 comments

Originally reports in #230 but I think it got lost due to noise.

Currently (on master and development) data.current('volume') acts differently in backtest and live.

In backtest it returns a single frame volume (sum of the resampled bundle). When communicating with the exchanges in live mode it returns the 24hr volume.

This should be consistent to make backtests valid.

This was tested on bitfinex and poloniex.

gatapia avatar Feb 27 '18 03:02 gatapia

Thanks @gatapia for opening a separate thread. We will address this issue. Thanks

lenak25 avatar Feb 27 '18 07:02 lenak25

Thanks for opening this issue @gatapia

In addition, can someone tell me the currency in which the volume is given? Let's say I am investing in eth_usdt, will the volume be given in eth or usdt? Is it the same for backtesting and live?

I have looked at the poloniex API and they give the volume in both currencies: https://poloniex.com/public?command=return24hVolume

JesGonTej avatar Mar 14 '18 18:03 JesGonTej

Hi @xbionicx,

The volume is given in the market currency, which is in your example means ETH.

Lena

lenak25 avatar Mar 15 '18 07:03 lenak25

Ping on this. This would be a very useful feature to have.

STOpandthink avatar Jul 29 '18 03:07 STOpandthink