From 21c6b777530b4a027aec9c12bf63092e5a7c006d Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Wed, 1 Apr 2026 17:24:57 +0900 Subject: feat: add multi-exchange support via ccxt factory --- services/order-executor/src/order_executor/main.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'services/order-executor') diff --git a/services/order-executor/src/order_executor/main.py b/services/order-executor/src/order_executor/main.py index 0198f65..24a166e 100644 --- a/services/order-executor/src/order_executor/main.py +++ b/services/order-executor/src/order_executor/main.py @@ -3,12 +3,11 @@ import asyncio from decimal import Decimal -import ccxt.async_support as ccxt - from shared.broker import RedisBroker from shared.db import Database from shared.events import Event, EventType from shared.healthcheck import HealthCheckServer +from shared.exchange import create_exchange from shared.logging import setup_logging from shared.metrics import ServiceMetrics from shared.notifier import TelegramNotifier @@ -32,11 +31,11 @@ async def run() -> None: broker = RedisBroker(config.redis_url) - exchange = ccxt.binance( - { - "apiKey": config.binance_api_key, - "secret": config.binance_api_secret, - } + exchange = create_exchange( + exchange_id=config.exchange_id, + api_key=config.binance_api_key, + api_secret=config.binance_api_secret, + sandbox=config.exchange_sandbox, ) risk_manager = RiskManager( -- cgit v1.2.3