diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c5c10912..0880dd506 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 *It is strongly advised to perform an update of your tentacles after updating OctoBot. (start.py tentacles --install --all)* +## [1.0.7] - 2024-01-18 +### Added +- [CoinEx] Support CoinEx +### Updated +- [WebInterface] Show profitability even on backtesting error, special thanks to Phodia for this improvement. +### Fixed +- [Exchanges] Websocket reconnection issues +- [DailyTradingMode] Fix sell amount when shorting in Target Profits mode + ## [1.0.6] - 2024-01-09 ### Added - [TradingModes] Improved documentation and added links to full guides @@ -80,7 +89,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [1.0.0] - 2023-09-26 ### Updated -- [Community] Migrate to the updated octobot.cloud. Full details on https://www.octobot.cloud/blog/introducing-the-new-octobot-cloud +- [Community] Migrate to the updated octobot.cloud. Full details on https://www.octobot.cloud/en/blog/introducing-the-new-octobot-cloud - [Logs] Improve debug logs ### Fixed - [GridTrading] Mirror order rebalance issues diff --git a/README.md b/README.md index 69b34c931..c217fc246 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# OctoBot [1.0.6](https://octobot.click/gh-changelog) +# OctoBot [1.0.7](https://octobot.click/gh-changelog) [![PyPI](https://img.shields.io/pypi/v/OctoBot.svg?logo=pypi)](https://octobot.click/gh-pypi) [![Downloads](https://pepy.tech/badge/octobot/month)](https://pepy.tech/project/octobot) [![Dockerhub](https://img.shields.io/docker/pulls/drakkarsoftware/octobot.svg?logo=docker)](https://octobot.click/gh-dockerhub) diff --git a/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py b/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py index fbb31fc2b..c724069a2 100644 --- a/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py +++ b/additional_tests/exchanges_tests/abstract_authenticated_exchange_tester.py @@ -151,10 +151,13 @@ async def inner_test_create_and_cancel_limit_orders(self, symbol=None, settlemen # # end debug tools open_orders = await self.get_open_orders(exchange_data) buy_limit = await self.create_limit_order(price, size, trading_enums.TradeOrderSide.BUY, symbol=symbol) - self.check_created_limit_order(buy_limit, price, size, trading_enums.TradeOrderSide.BUY) - assert await self.order_in_open_orders(open_orders, buy_limit, symbol=symbol) - await self.check_can_get_order(buy_limit) - await self.cancel_order(buy_limit) + try: + self.check_created_limit_order(buy_limit, price, size, trading_enums.TradeOrderSide.BUY) + assert await self.order_in_open_orders(open_orders, buy_limit, symbol=symbol) + await self.check_can_get_order(buy_limit) + finally: + # don't leave buy_limit as open order + await self.cancel_order(buy_limit) assert await self.order_not_in_open_orders(open_orders, buy_limit, symbol=symbol) async def test_create_and_fill_market_orders(self): diff --git a/additional_tests/exchanges_tests/test_coinex.py b/additional_tests/exchanges_tests/test_coinex.py new file mode 100644 index 000000000..e2e50759f --- /dev/null +++ b/additional_tests/exchanges_tests/test_coinex.py @@ -0,0 +1,75 @@ +# This file is part of OctoBot (https://github.com/Drakkar-Software/OctoBot) +# Copyright (c) 2023 Drakkar-Software, All rights reserved. +# +# OctoBot is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either +# version 3.0 of the License, or (at your option) any later version. +# +# OctoBot is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with OctoBot. If not, see . +import pytest + +from additional_tests.exchanges_tests import abstract_authenticated_exchange_tester + +# All test coroutines will be treated as marked. +pytestmark = pytest.mark.asyncio + + +class TestCoinExAuthenticatedExchange( + abstract_authenticated_exchange_tester.AbstractAuthenticatedExchangeTester +): + # enter exchange name as a class variable here + EXCHANGE_NAME = "coinex" + ORDER_CURRENCY = "BTC" + SETTLEMENT_CURRENCY = "USDT" + SYMBOL = f"{ORDER_CURRENCY}/{SETTLEMENT_CURRENCY}" + ORDER_SIZE = 70 # % of portfolio to include in test orders + CONVERTS_ORDER_SIZE_BEFORE_PUSHING_TO_EXCHANGES = True + + async def test_get_portfolio(self): + await super().test_get_portfolio() + + async def test_get_portfolio_with_market_filter(self): + await super().test_get_portfolio_with_market_filter() + + async def test_get_account_id(self): + # pass if not implemented + pass + + async def test_create_and_cancel_limit_orders(self): + await super().test_create_and_cancel_limit_orders() + + async def test_create_and_fill_market_orders(self): + await super().test_create_and_fill_market_orders() + + async def test_get_my_recent_trades(self): + await super().test_get_my_recent_trades() + + async def test_get_closed_orders(self): + await super().test_get_closed_orders() + + async def test_create_and_cancel_stop_orders(self): + # pass if not implemented + pass + + async def test_edit_limit_order(self): + # pass if not implemented + pass + + async def test_edit_stop_order(self): + # pass if not implemented + pass + + async def test_create_single_bundled_orders(self): + # pass if not implemented + pass + + async def test_create_double_bundled_orders(self): + # pass if not implemented + pass diff --git a/octobot/__init__.py b/octobot/__init__.py index c25b9213e..427693369 100644 --- a/octobot/__init__.py +++ b/octobot/__init__.py @@ -16,5 +16,5 @@ PROJECT_NAME = "OctoBot" AUTHOR = "Drakkar-Software" -VERSION = "1.0.6" # major.minor.revision +VERSION = "1.0.7" # major.minor.revision LONG_VERSION = f"{VERSION}" diff --git a/octobot/cli.py b/octobot/cli.py index 2507a32ca..53226c630 100644 --- a/octobot/cli.py +++ b/octobot/cli.py @@ -94,9 +94,9 @@ def _disable_interface_from_param(interface_identifier, param_value, logger): def _log_environment(logger): try: bot_type = "cloud" if constants.IS_CLOUD_ENV else "self-hosted" - logger.debug(f"Running {bot_type} OctoBot on {os_util.get_current_platform()} " - f"with {os_util.get_octobot_type()} " - f"[Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}]") + logger.info(f"Running {bot_type} OctoBot on {os_util.get_current_platform()} " + f"with {os_util.get_octobot_type()} " + f"[Python {sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}]") except Exception as e: logger.error(f"Impossible to identify the current running environment: {e}") diff --git a/octobot/community/models/strategy_data.py b/octobot/community/models/strategy_data.py index 4aa2d5bc8..9575023f9 100644 --- a/octobot/community/models/strategy_data.py +++ b/octobot/community/models/strategy_data.py @@ -31,7 +31,7 @@ def get_url(self) -> str: external_links = self.metadata.get("external_link") if external_links: if blog_slug := external_links.get("blog"): - return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_LANDING_URL}/blog/{blog_slug}" + return f"{identifiers_provider.IdentifiersProvider.COMMUNITY_LANDING_URL}/en/blog/{blog_slug}" return "" diff --git a/requirements.txt b/requirements.txt index 304ca11e7..be3e1ef79 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,12 +1,12 @@ # Drakkar-Software requirements -OctoBot-Commons==1.9.37 -OctoBot-Trading==2.4.49 +OctoBot-Commons==1.9.39 +OctoBot-Trading==2.4.51 OctoBot-Evaluators==1.9.4 -OctoBot-Tentacles-Manager==2.9.8 +OctoBot-Tentacles-Manager==2.9.9 OctoBot-Services==1.6.10 OctoBot-Backtesting==1.9.7 Async-Channel==2.2.1 -trading-backend==1.2.12 +trading-backend==1.2.13 ## Others colorlog==6.8.0