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

Mexc #2856

Merged
merged 2 commits into from
Jan 10, 2025
Merged

Mexc #2856

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
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import octobot_commons.constants as constants
import octobot_commons.enums as commons_enums
import octobot_commons.symbols as symbols
import octobot_commons.configuration as commons_configuration
import octobot_trading.errors as trading_errors
import octobot_trading.enums as trading_enums
import octobot_trading.constants as trading_constants
Expand Down Expand Up @@ -109,6 +110,9 @@ class AbstractAuthenticatedExchangeTester:
# Add method call to subclasses to be able to run them independently

async def test_get_portfolio(self):
# encoded_a = _get_encoded_value("") # tool to get encoded values
# encoded_b = _get_encoded_value("")
# encoded_c = _get_encoded_value("")
async with self.local_exchange_manager():
await self.inner_test_get_portfolio()

Expand Down Expand Up @@ -1443,3 +1447,7 @@ def market_filter(market):
)

return market_filter


def _get_encoded_value(raw) -> str:
return commons_configuration.encrypt(raw).decode()
12 changes: 6 additions & 6 deletions additional_tests/exchanges_tests/test_mexc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class TestMEXCAuthenticatedExchange(
CONVERTS_ORDER_SIZE_BEFORE_PUSHING_TO_EXCHANGES = True
CANCELLED_ORDERS_IN_CLOSED_ORDERS = True
EXPECT_MISSING_FEE_IN_CANCELLED_ORDERS = False
IS_ACCOUNT_ID_AVAILABLE = False
USE_ORDER_OPERATION_TO_CHECK_API_KEY_RIGHTS = True

async def test_get_portfolio(self):
await super().test_get_portfolio()
Expand All @@ -42,8 +44,7 @@ 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
await super().test_get_account_id()

async def test_is_authenticated_request(self):
await super().test_is_authenticated_request()
Expand All @@ -52,11 +53,10 @@ async def test_invalid_api_key_error(self):
await super().test_invalid_api_key_error()

async def test_get_api_key_permissions(self):
# pass if not implemented
pass
await super().test_get_api_key_permissions()

async def test_missing_trading_api_key_permissions(self):
pass
await super().test_missing_trading_api_key_permissions()

async def test_get_not_found_order(self):
await super().test_get_not_found_order()
Expand All @@ -83,7 +83,7 @@ async def test_get_cancelled_orders(self):
await super().test_get_cancelled_orders()

async def test_create_and_cancel_stop_orders(self):
# pass if not implemented
# NOT SUPPORTED by MEXC API (10/01/25)
pass

async def test_edit_limit_order(self):
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Drakkar-Software requirements
OctoBot-Commons==1.9.70
OctoBot-Trading==2.4.144
OctoBot-Trading==2.4.145
OctoBot-Evaluators==1.9.7
OctoBot-Tentacles-Manager==2.9.16
OctoBot-Services==1.6.23
OctoBot-Backtesting==1.9.7
Async-Channel==2.2.1
trading-backend==1.2.31
trading-backend==1.2.32

## Others
colorlog==6.8.0
Expand Down
Loading