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

Error retrieving minute frequency data for Bittrex exchange #90

Open cyzanfar opened 6 years ago

cyzanfar commented 6 years ago

Hey!

Environment

aiodns==1.1.1
aiohttp==2.3.6
alembic==0.7.7
async-timeout==2.0.0
bcolz==0.12.1-e git://github.com/quantopian/blaze.git@310605323449e375e81a0cf04011c507cd126ef6#egg=blaze
boto3==1.4.8
botocore==1.8.11
Bottleneck==1.0.0
cchardet==2.1.1
ccxt==1.10.331
certifi==2017.11.5
chardet==3.0.4
click==4.0
cloudpickle==0.2.1
contextlib2==0.4.0
cycler==0.10.0
cyordereddict==0.2.2
Cython==0.25.2
cytoolz==0.8.2
dask==0.13.0-e git://github.com/quantopian/datashape.git@bf06a41dc0908baf7c324aeacadba8820468ee78#egg=datashape
decorator==4.0.0
docutils==0.14
empyrical==0.2.1-e git+git@github.com:cyzanfar/catalyst.git@ff94c735e84103c021a968bde9154eaab4f6acfd#egg=enigma_catalyst
Flask==0.10.1
Flask-Cors==2.1.2
idna==2.6
intervaltree==2.1.0
itsdangerous==0.24
Jinja2==2.7.3
jmespath==0.9.3
locket==0.2.0
Logbook==0.12.5
lru-dict==1.1.4
Mako==1.0.1
MarkupSafe==0.23
matplotlib==2.1.0
multidict==3.3.2
multipledispatch==0.4.8
networkx==1.9.1
numexpr==2.6.1
numpy==1.13.1-e git://github.com/quantopian/odo.git@da7f26d87702f5d293763e8ed54c7e25fd3af386#egg=odo
pandas==0.19.2
pandas-datareader==0.2.1
partd==0.3.7
patsy==0.4.0
psutil==4.3.0
pycares==2.3.0
pyparsing==2.2.0
python-dateutil==2.4.2
python-editor==1.0.3
pytz==2016.4
requests==2.9.1
requests-file==1.4.1
requests-ftp==0.3.1
s3transfer==0.1.12
scipy==0.17.1
six==1.10.0
sortedcontainers==1.4.4
SQLAlchemy==1.0.8
statsmodels==0.6.1
tables==3.3.0
toolz==0.8.2
urllib3==1.22
Werkzeug==0.10.4
yarl==0.16.0

Description of Issue

Tried ingesting minute data from Bittrex exchange for currency pair ltc_btc:

catalyst ingest-exchange -x bittrex -f minute -i ltc_btc

got:

  File "/Users/cyrusghazanfar/Desktop/python-projects/catalyst/catalyst/__main__.py", line 545, in ingest_exchange
    csv=csv
  File "/Users/cyrusghazanfar/Desktop/python-projects/catalyst/catalyst/exchange/exchange_bundle.py", line 820, in ingest
    show_report=show_report
  File "/Users/cyrusghazanfar/Desktop/python-projects/catalyst/catalyst/exchange/exchange_bundle.py", line 596, in ingest_assets
    end_dt=end_dt
  File "/Users/cyrusghazanfar/Desktop/python-projects/catalyst/catalyst/exchange/exchange_bundle.py", line 509, in prepare_chunks
    start_dt, end_dt, [asset], data_frequency
  File "/Users/cyrusghazanfar/Desktop/python-projects/catalyst/catalyst/exchange/exchange_bundle.py", line 469, in get_adj_dates
    if data_frequency == 'minute' else last_entry
AttributeError: 'NoneType' object has no attribute 'replace'

It seems that the problem comes from the particular asset being traded who's end_minute is set to 'N/A' causing end and last_entry to be null exchange_bundle.py#L467.

Until a source of minute data has been found for Bittrex, there should be a way to handle this and let the user know the data isn't applicable to the currency pair being trade.

Thanks!

fredfortier commented 6 years ago

We don't have Bittrex bundles at the moment. We are working hard to get them. It's taking longer than we hoped. Bittrex posted some bundles on social media in the past. The last that I saw had data until August. Please let us know if you come across something more recent. Otherwise, we will continue pursuing data acquisition.

If you guys have specific markets that you are interested in, feel free to post them here. We'll look into temporary options until we have the full history.