Version 0.35.0 is released, open-sourced dashboard code, import_candles for the research module, a more reliable candle handling in the live mode, and more

Version 0.35.0 is released, open-sourced dashboard code, import_candles for the research module, a more reliable candle handling in the live mode, and more

2 years agoNews By Saleh Mir

Hey everyone,

I just released version 0.35.0 of Jesse and it's a good one!

Let's start with the full changelog of this release:

  • [NEW FEATURE] Added the import_candles() method to the "research" module.
  • [IMPROVEMENT] Live mode now uses the REST API of the exchange to fetch candles and update the most recent candles. This is on top of the current WebSocket implementation for real-time updates and is supposed to make Jesse's data storage more reliable.
  • [IMPROVEMENT] Added error handling for Telegram and Discord notifications.
  • [FIX] Fixed the TypeError: decoding to str: need a bytes-like object, int found occurring when resuming the previous live session with open orders on Binance Futures and FTX Futures.
  • [FIX] Fixed a visual bug where the entry price of the positions was displayed incorrectly on the dashboard when live trading.
  • [FIX] Fixed an overflow bug in the daily_balances when using the research module's backtest() function. This did not affect the existing backtest and optimize mode of the GUI dashboard.
  • [FIX] Fixed the bug where the progressbar was not working when importing candles in some browsers.

The source code for the dashboard is now open-source

The source code of Jesse's frontend dashboard is now open-source. You can find installation instructions on the repository's README.

REST API for handling new candles in live mode

Most trading bots that I know of, use the REST API for updating price data every N seconds. That is fine for most cases, but to make sure we detect order executions and other events as soon as they happen, I decided to use the WebSocket API instead. So far we ONLY used the Websocket connection of exchanges for handling candle streams (fetching new candles).

While this method allowed Jesse to keep track of things in real-time (which is a great feature of Jesse), I came to realize there are cases where the Websocket connection acts crazy. If I have to guess, those are times when either market is busy, or maybe when the user's connection is not perfectly stable. Both cases are rare, but they can happen. Even though a rare case, it was a problem that needed to be solved.

Thus, I decided to add the ability to use the REST API of exchanges for fetching candles in the live mode as a backup for the WebSocket connection. So even if the WebSocket connection gives incorrect data for a few seconds, that data will be fixed a few seconds later using the REST API.

import_candles() method for the research module

Another important feature of this release is the addition of the import_candles() method for the "research" module. This method allows you to import candles from an exchange by calling a function instead of using the "import candles" mode of the GUI dashboard.

This could be pretty useful for those who like to write a script to batch-import candles for a list of symbols. Or maybe for fetching the most recent candles regularly.

By default after calling the function you will see a progressbar letting you know of the progress, and how long further you need to wait. But you can disable it if you need to. You can read the documentation for it here.

Youtube tutorial video about Docker

In case you missed it, a few days ago, I released a new tutorial video on my YouTube channel about getting started with Jesse using docker for local development.

You might be already using this setup and not need the entire video, but there's a section of the video where I show how to enable code IntelliSense in VSCode when using Docker containers which makes strategy development so much faster.

What's next

I'll be releasing small bug fixes and improvements in the coming weeks, but importantly I'll be focusing on implementing the support for spot trading.

Happy algo-trading,

— Saleh

❤️ Like Jesse?

If you like this project, please consider supporting me for free by using my referral links.

It's a win-win, you get free discounts and bonuses, and it helps me to develop more features and content:

Thank you 🙏