Giter Club home page Giter Club logo

Comments (3)

cryptocoinserver avatar cryptocoinserver commented on May 14, 2024 1

Good catch. Makes sense to validate that there already. I added it for the next release.

from jesse.

cryptocoinserver avatar cryptocoinserver commented on May 14, 2024

Do you get an error? Just tested it and got no error? That's true about the Bitfinex symbol format, but that's all handled by Jesse behind the scenes.
We need the dash because otherwise, Jesse doesn't know which chars count to quote and which to base. Especially with those varying lengths (3 and 4 chars) these days.

from jesse.

Darwinnn avatar Darwinnn commented on May 14, 2024

Yes, I do get an error:

routes = [
    ('Bitfinex', 'ETHUSD', '2h', 'Test'),
]
root@4ea38a1669b7:/home/mybot# jesse backtest '2020-01-01' '2021-03-27'
============================== EXCEPTION TRACEBACK:
  ...
  File "/jesse-docker/jesse/helpers.py", line 504, in quote_asset
    raise InvalidRoutes("The symbol format is incorrect. Correct example: 'BTC-USDT'. Yours is '{}'".format(symbol))
=========================================================================

 Uncaught Exception: InvalidRoutes: The symbol format is incorrect. Correct example: 'BTC-USDT'. Yours is 'ETHUSD'

And for the dash:

# trading routes
routes = [
    ('Bitfinex', 'ETH-USD', '2h', 'Test'),
]
============================== EXCEPTION TRACEBACK:
  ....
  File "/jesse-docker/jesse/services/required_candles.py", line 73, in load_required_candles
    raise CandleNotFoundInDatabase(
=========================================================================

 Uncaught Exception: CandleNotFoundInDatabase: No candle for Bitfinex ETH-USD is present in the database. Try importing candles.

Which makes sense, since what I have in the database is ETHUSD and not ETH-USD

jesse_db=# select distinct symbol from candle;
  symbol
----------
 ETHUSD
(1 row)

However, I just tried importing candles from Bitfinex specifically for ETH-USD and it loaded them correctly, but when I did this first time I clearly remember it saying something like ETH-USD is not found, but ETHUSD was found and that's what I imported.

Anyways, I think you just need to validate dash presence in symbols when doing a candle import, because it allows us to import dashless symbols which then won't work

root@4ea38a1669b7:/home/mybot# jesse import-candles 'Bitfinex' 'ETHUSD' '2018-01-01'
Importing 1182 days candles from "Bitfinex" for "ETHUSD". Duplicates will be skipped. All good? [Y/n]: Y
Importing candles...  [------------------------------------]    0%  00:40:54

from jesse.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.