67 production .py modules that the running PINK service imports but which were never committed: prod/bingx/ (HTTP client, market/user streams, journal, config), prod/clean_arch/ adapters/persistence/runtime/dita/dita_v2 production modules and their co-located tests. Rule going forward: every module imported by launch_dolphin_pink.py / pink_direct.py must appear in git ls-files. Excludes _backup dirs, __pycache__, and non-code files. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
32 lines
1.0 KiB
Python
32 lines
1.0 KiB
Python
from __future__ import annotations
|
|
|
|
from .enums import BingxEnvironment
|
|
|
|
|
|
_REST_BASE_URLS: dict[BingxEnvironment, tuple[str, str]] = {
|
|
BingxEnvironment.LIVE: ("https://open-api.bingx.com", "https://open-api.bingx.pro"),
|
|
BingxEnvironment.VST: ("https://open-api-vst.bingx.com", "https://open-api-vst.bingx.pro"),
|
|
}
|
|
|
|
_WS_PRIVATE_URLS: dict[BingxEnvironment, str | None] = {
|
|
BingxEnvironment.LIVE: "wss://open-api-swap.bingx.com/swap-market",
|
|
BingxEnvironment.VST: "wss://vst-open-api-ws.bingx.com/swap-market",
|
|
}
|
|
|
|
_WS_PUBLIC_URLS: dict[BingxEnvironment, str] = {
|
|
BingxEnvironment.LIVE: "wss://open-api-swap.bingx.com/swap-market",
|
|
BingxEnvironment.VST: "wss://vst-open-api-ws.bingx.com/swap-market",
|
|
}
|
|
|
|
|
|
def get_rest_base_urls(environment: BingxEnvironment) -> tuple[str, str]:
|
|
return _REST_BASE_URLS[environment]
|
|
|
|
|
|
def get_private_ws_url(environment: BingxEnvironment) -> str | None:
|
|
return _WS_PRIVATE_URLS[environment]
|
|
|
|
|
|
def get_public_ws_url(environment: BingxEnvironment) -> str:
|
|
return _WS_PUBLIC_URLS[environment]
|