diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:24:57 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2026-04-01 17:24:57 +0900 |
| commit | 21c6b777530b4a027aec9c12bf63092e5a7c006d (patch) | |
| tree | 0c4302b258a3318d473e31bfba391ba05e247d92 /services/order-executor/src/order_executor/main.py | |
| parent | 4e6ae373b6abc7ef0d5fb810385d14250757f3f1 (diff) | |
feat: add multi-exchange support via ccxt factory
Diffstat (limited to 'services/order-executor/src/order_executor/main.py')
| -rw-r--r-- | services/order-executor/src/order_executor/main.py | 13 |
1 files changed, 6 insertions, 7 deletions
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( |
