summaryrefslogtreecommitdiff
path: root/services/order-executor
diff options
context:
space:
mode:
Diffstat (limited to 'services/order-executor')
-rw-r--r--services/order-executor/src/order_executor/main.py13
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(