Add Binance SIM market adapter and exchange switch in settings.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user