Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import not working #9

Closed
CTOlet opened this issue Apr 25, 2020 · 4 comments
Closed

Import not working #9

CTOlet opened this issue Apr 25, 2020 · 4 comments

Comments

@CTOlet
Copy link

CTOlet commented Apr 25, 2020

For command below

jesse import-candles 'Binance' 'BTCUSDT' '2018-01-01'

Exception thrown

============================== EXCEPTION TRACEBACK:
  File "/Users/alimzhan/.pyenv/versions/3.7.4/bin/jesse", line 8, in <module>
    sys.exit(cli())
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/jesse/__init__.py", line 250, in import_candles
    import_candles_mode.run(exchange, symbol, start_date)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/jesse/modes/import_candles_mode/__init__.py", line 113, in run
    candles = _fill_absent_candles(candles, temp_start_timestamp, temp_end_timestamp)
  File "/Users/alimzhan/.pyenv/versions/3.7.4/lib/python3.7/site-packages/jesse/modes/import_candles_mode/__init__.py", line 251, in _fill_absent_candles
    raise ValueError('No candles were sent')
=========================================================================

 Uncaught Exception: ValueError: No candles were sent
@Gabri
Copy link
Contributor

Gabri commented Apr 25, 2020

Hello @nemmo, it's possibile that Binance has not enough data (1m candle), try with 2018-06-01

@saleh-old
Copy link
Contributor

saleh-old commented Apr 26, 2020

I confirm what @Gabri said is true. I'll update the exception message to be more informative.

@CTOlet
Copy link
Author

CTOlet commented Apr 26, 2020

@saleh-mir I think it would be better if you add a cli option like --force to skip all the gaps

@saleh-old
Copy link
Contributor

saleh-old commented Apr 26, 2020

The thing is gaps will break backtests. What I have done instead is:

When there’s missing candles for days, it Jesse tries fetching from a backup exchange. For example if you try importing from Bitfinex, you won’t get that error because it’ll try filling those gaps with candles from Coinbase behind the scenes.

However I have not enabled this feature for Binance yet because I don’t know any exchange that allows trading tether pairs other than Binance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants