Lukas Goldschmidt 2 săptămâni în urmă
părinte
comite
0b96095b58
1 a modificat fișierele cu 2 adăugiri și 5 ștergeri
  1. 2 5
      src/exec_mcp/bitstamp_private_ws.py

+ 2 - 5
src/exec_mcp/bitstamp_private_ws.py

@@ -6,8 +6,7 @@ from datetime import datetime, timezone
 
 import websockets
 
-from .bitstamp import BitstampClient
-from .repo import get_account, get_account_secrets
+from .services_bitstamp import get_bitstamp_client
 from .storage import get_connection
 
 WS_URL = "wss://ws.bitstamp.net"
@@ -46,9 +45,7 @@ async def _run_once(stop_event: asyncio.Event) -> None:
 
 
 def _get_token(account_id: str) -> dict:
-    account = get_account(account_id)
-    secrets = get_account_secrets(account_id)
-    client = BitstampClient(account["venue_account_ref"], secrets["api_key"], secrets["api_secret"])
+    client = get_bitstamp_client(account_id)
     return client.websocket_token()