Add Binance SIM market adapter and exchange switch in settings.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-25 12:02:36 +08:00
parent 5dcec0fde0
commit 78fd046fb6
25 changed files with 879 additions and 45 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ def hours_until_expiry(
if expiry_ms is not None:
return hours_until_ms(expiry_ms, now)
# 兼容测试:无 ms 时按 OKX 惯例(UTC 08:00)推算
from ..exchange.okx.parse import expiry_ms_from_ymd
from ..exchange.expiry import expiry_ms_from_ymd
return hours_until_ms(expiry_ms_from_ymd(ymd), now)
@@ -76,7 +76,7 @@ def _complete_by_expiry(
if ymd in ms_map:
ems = ms_map[ymd]
else:
from ..exchange.okx.parse import expiry_ms_from_ymd
from ..exchange.expiry import expiry_ms_from_ymd
ems = expiry_ms_from_ymd(ymd)
out[ymd] = (ems, complete)