fix: OKX option quote requires instFamily with instId

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-07 08:58:31 +08:00
parent 05586242f0
commit e1c14977e6
2 changed files with 77 additions and 40 deletions
+6 -1
View File
@@ -5,7 +5,12 @@ from lib.options.options_pricing_lib import (
sheets_from_eth_amount,
total_premium,
)
from lib.exchange.okx_options_lib import format_option_px, round_option_px
from lib.exchange.okx_options_lib import format_option_px, inst_family_from_inst_id, round_option_px
def test_inst_family_from_inst_id():
assert inst_family_from_inst_id("ETH-USD_UM-260707-1790-C") == "ETH-USD_UM"
assert inst_family_from_inst_id("BTC-USD-260925-60000-C") == "BTC-USD"
def test_round_option_px():