scrtlabs / catalyst

An Algorithmic Trading Library for Crypto-Assets in Python
http://enigma.co
Apache License 2.0
2.48k stars 724 forks source link

set_benchmark() is not working in live mode (Bitfinex) #419

Open avolution opened 6 years ago

avolution commented 6 years ago

set_benchmark(symbol('btc_usd')) Is working without problems in backtest mode. But in Live-mode you will get these Error from Bitfinex:

ccxt.base.errors.ExchangeNotAvailable: bitfinex https://api.bitfinex.com/v2/candles/trade:1m:tBTCUSD/hist?sort=1&limit=527041&start=1532649480000 GET 500 Server Error: Internal Server Error for url: https://api.bitfinex.com/v2/candles/trade:1m:tBTCUSD/hist?sort=1&limit=527041&start=1532649480000 ["error",10020,"limit: invalid"]

Catalyst will fetch all data at once ---> limit=527041

But Bitfinex has an limit of 1000 per request So the data have to be requested in pages

Why is that working in backtest mode? Another datasource (ingested data?)? Maybe better to use that data also in live and only request the last recent datapoints via the api.

EmbarAlmog commented 6 years ago

Hi @avolution, currently catalyst does not support set_benchmark in live mode but fully supported in backtest mode. We are adding this to our backlog and hope to implement it in the future.