scrtlabs / catalyst

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

Does catalyst support Huobi.pro, the most popular Chinese exchanges ? #365

Closed chairy11 closed 6 years ago

chairy11 commented 6 years ago

Does catalyst support Huobi.pro, the most popular Chinese exchanges ?

Ccxt already supports Huobi.pro API.

The Huobi API doc link is Huobi API

lenak25 commented 6 years ago

Hi @chairy11 ,

Please visit the following link describing catalyst tested and supported exchanges both in backtest and in live modes. We haven't tested Huobi.pro exchange yet, although catalyst does integrate with the CCXT library. If you decide to try testing catalyst with Huobi.pro (in paper or live mode) we will be happy if you could report back, otherwise we hope to get to it in the near future.

Thanks, Lena

chairy11 commented 6 years ago

I want to change my local code to test HuobiPro exchange. But my code changes seems not work. Why? Can Catalyst keep watching source files for changes and reloading modules ? I am novice to Python.

Oh,the command catalyst ingest-exchange -x huobipro -i btc_usdt -f daily must use the data catalyst team prepare? If I set EXCHANGE_NAMES = ['bitfinex', 'bittrex', 'poloniex', 'huobipro'] in file <catalyst/exchange/utils/bundle_utils.py> , it would still not work?

lenak25 commented 6 years ago

I suggest you to go through the entire catalyst documentation and get yourself more familiar with Python programming.

Regarding your questions:

  1. Currently only Bitfinex, Bittrex and Poloniex are supported in backtest. So there is no point in trying to ingest HuobiPro information, as no historical data for this exchange is saved and can be downloaded.
  2. As mentioned above, because catalyst does integrate with the CCXT library, you can try to test the HuobiPro integration in live and paper modes only. However because it was not yet tested by us, it might not work, so use carefully. To try this, no code change is required, only defining the HuobiPro exchange in your algorithm definition.

I suggest you to familiar yourself with catalyst before trying to test the HuobiPro integration; and again, as this exchange functionality was not yet validated nor tested, please use carefully as issues might come up.

chairy11 commented 6 years ago

@lenak25 Thank you for your answer.

Now I have a bitfinex account and try to run the command catalyst ingest-exchange -x bitfinex -i btc_usd, but the terminal always raise an error

raise ExchangeRequestError(error=e)
catalyst.exchange.exchange_errors.ExchangeRequestError: Request failed: bitfinex GET https://api.bitfinex.com/v1/symbols_details HTTPSConnectionPool(host='api.bitfinex.com', port=443): Max retries exceeded with url: /v1/symbols_details (Caused by ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x114f2a320>, 'Connection to api.bitfinex.com timed out. (connect timeout=10)'))

I can't understand. The catalyst document say the ingested data is from catalyst server, why it still requests from https://api.bitfinex.com/v1/symbols_details ?
And I have already set the bitfinex API in file ~/.catalyst/data/exchanges/bitfinex/auth.json. At the same time, I can get data form the url "https://api.bitfinex.com/v1/symbols_details " in my brower.

Did I do anything wrong?

lenak25 commented 6 years ago

@chairy11 , to avoid confusion, I am closing this issue, as its original subject was answered. Regarding the error you have encountered, this indeed looks strange but I need more details. Please open a new issue with the description of your problem and details regrading the catalyst version + python version + a more detailed stack trace. Thanks, Lena