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

Req #2508

Merged
merged 5 commits into from
Jan 18, 2024
Merged

Req #2508

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
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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 [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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
75 changes: 75 additions & 0 deletions additional_tests/exchanges_tests/test_coinex.py
Original file line number Diff line number Diff line change
@@ -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 <https://www.gnu.org/licenses/>.
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(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

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
2 changes: 1 addition & 1 deletion octobot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
6 changes: 3 additions & 3 deletions octobot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")

Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Loading