catalyst icon indicating copy to clipboard operation
catalyst copied to clipboard

unable to ingest market data

Open 5267 opened this issue 6 years ago • 1 comments

Dear Catalyst Maintainers,

Before I tell you about my issue, let me describe my environment:

Environment

  • Operating System: (Windows Version or $ uname --all)
  • Python Version: $ python --version
  • Python Bitness: $ python -c 'import math, sys;print(int(math.log(sys.maxsize + 1, 2) + 1))'
  • How did you install Catalyst: (pip, conda, or other (please explain))
  • Python packages: $ pip freeze or $ conda list

Now that you know a little about me, let me tell you about the issue I am having:

Description of Issue

when i run this command (catalyst ingest-exchange -x binance -f daily -i btc_usdt ) to ingest data, i got errors :

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

  • What did you expect to happen? i expect ingestion stage should not be any problem.
  • What happened instead? however, it indeed can't download market data.

Here is how you can reproduce this issue on your machine:

Reproduction Steps

1.catalyst ingest-exchange -x binance -f daily -i btc_usdt

What steps have you taken to resolve this already?

i tried several trading pairs, it also bugs like that above mentioned, i don't what happened? but i run: catalyst ingest-exchange -x bitfinex -f daily -i xrp_usd , i can ingest data without any problem.

Sincerely, cryto quant

5267 avatar Feb 17 '19 08:02 5267

I have the same problem and solved it. By modifying the following files, by using a proxy, it may be due to network issues (such as in China)

D:\ProgramData\Miniconda3\envs\catalyst\Lib\site-packages\catalyst\exchange\ccxt\ccxt_exchange.py

self.api = exchange_attr({ 'apiKey': key, 'secret': secret, 'password': password, }) # Using a proxy self.api.proxies = { 'http': 'http://127.0.0.1:1080', 'https': 'http://127.0.0.1:1080', } self.api.enableRateLimit = True

f0cii avatar May 27 '19 02:05 f0cii