|
@@ -6,8 +6,7 @@ from datetime import datetime, timezone
|
|
|
|
|
|
|
|
import websockets
|
|
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
|
|
from .storage import get_connection
|
|
|
|
|
|
|
|
WS_URL = "wss://ws.bitstamp.net"
|
|
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:
|
|
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()
|
|
return client.websocket_token()
|
|
|
|
|
|
|
|
|
|
|