Skip to content
This repository was archived by the owner on Feb 3, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.5.12] - 2026-01-30
### Fixed
[ExchangeConfigData] Don't use realtime timeframe if no realtime evaluator is configured

## [2.5.11] - 2026-01-29
### Fixed
[PositionValueHolder] Fix futures open orders value calculation when using symbol instead of currency
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# OctoBot-Trading [2.5.11](https://github.com/Drakkar-Software/OctoBot-Trading/blob/master/CHANGELOG.md)
# OctoBot-Trading [2.5.12](https://github.com/Drakkar-Software/OctoBot-Trading/blob/master/CHANGELOG.md)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/903b6b22bceb4661b608a86fea655f69)](https://app.codacy.com/gh/Drakkar-Software/OctoBot-Trading?utm_source=github.com&utm_medium=referral&utm_content=Drakkar-Software/OctoBot-Trading&utm_campaign=Badge_Grade_Dashboard)
[![PyPI](https://img.shields.io/pypi/v/OctoBot-Trading.svg)](https://pypi.python.org/pypi/OctoBot-Trading/)
[![Coverage Status](https://coveralls.io/repos/github/Drakkar-Software/OctoBot-Trading/badge.svg?branch=master)](https://coveralls.io/github/Drakkar-Software/OctoBot-Trading?branch=master)
Expand Down
2 changes: 1 addition & 1 deletion octobot_trading/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
# License along with this library.

PROJECT_NAME = "OctoBot-Trading"
VERSION = "2.5.11" # major.minor.revision
VERSION = "2.5.12" # major.minor.revision
13 changes: 9 additions & 4 deletions octobot_trading/exchanges/config/exchange_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def __init__(self, exchange_manager):
# When False, cancelled orders won't be saved in trades history
self.is_saving_cancelled_orders_as_trade: bool = True

# When True, short timeframes will be added for real-time evaluators
self.realtime_data_fetching: bool = False

self.backtesting_exchange_config = None

async def initialize_impl(self):
Expand Down Expand Up @@ -396,10 +399,12 @@ def _set_config_time_frame(self):
for time_frame in time_frame_manager.get_config_time_frame(self.config):
if self.exchange_manager.time_frame_exists(time_frame.value):
self.available_required_time_frames.append(time_frame)
if (
not self.exchange_manager.is_backtesting or
(self.exchange_manager.is_backtesting and self.exchange_manager.exchange.use_accurate_price_time_frame())
) or not self.available_required_time_frames:
if self.realtime_data_fetching and (
(
not self.exchange_manager.is_backtesting or
(self.exchange_manager.is_backtesting and self.exchange_manager.exchange.use_accurate_price_time_frame())
) or not self.available_required_time_frames
):
# add shortest time frame for realtime evaluators
client_shortest_time_frame = time_frame_manager.find_min_time_frame(
self.exchange_manager.client_time_frames,
Expand Down
4 changes: 4 additions & 0 deletions octobot_trading/exchanges/exchange_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,10 @@ def set_auto_start_trading_modes(self, auto_start_trading_modes):
self.auto_start_trading_modes = auto_start_trading_modes
return self

def enable_realtime_data_fetching(self, enabled: bool = True):
self.exchange_manager.exchange_config.realtime_data_fetching = enabled
return self


def create_exchange_builder_instance(config, exchange_name):
return ExchangeBuilder(config, exchange_name)
2 changes: 2 additions & 0 deletions octobot_trading/octobot_channel_consumer.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ class OctoBotChannelTradingDataKeys(enum.Enum):
BACKTESTING = "backtesting"
MATRIX_ID = "matrix_id"
TENTACLES_SETUP_CONFIG = "tentacles_setup_config"
ENABLE_REALTIME_DATA_FETCHING = "enable_realtime_data_fetching"


async def octobot_channel_callback(bot_id, subject, action, data) -> None:
Expand All @@ -70,6 +71,7 @@ async def _handle_creation(bot_id, action, data):
config = data[OctoBotChannelTradingDataKeys.EXCHANGE_CONFIG.value]
exchange_builder = exchanges.create_exchange_builder_instance(config, exchange_name) \
.has_matrix(data[OctoBotChannelTradingDataKeys.MATRIX_ID.value]) \
.enable_realtime_data_fetching(data.get(OctoBotChannelTradingDataKeys.ENABLE_REALTIME_DATA_FETCHING.value, False)) \
.use_tentacles_setup_config(data[OctoBotChannelTradingDataKeys.TENTACLES_SETUP_CONFIG.value]) \
.set_bot_id(bot_id)
try:
Expand Down
2 changes: 1 addition & 1 deletion tests/exchanges/test_exchange_config_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ async def init_default(config=None):
config = load_test_config()

exchange_manager = ExchangeManager(config, TestExchangeConfig.EXCHANGE_NAME)

exchange_manager.exchange_config.realtime_data_fetching = True
await exchange_manager.initialize(exchange_config_by_exchange=None)
return config, exchange_manager

Expand Down