Show OTM options in chain even when ticker has no quotes.
Stop skipping contracts with empty ask, bid, and mark so out-of-the-money strikes remain visible in the list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -90,6 +90,21 @@ def test_estimate_expiry_profit_at_index():
|
||||
assert p2 == round(-12.2 * 0.01, 4)
|
||||
|
||||
|
||||
def test_resolve_chain_quote_otm_no_quote():
|
||||
from lib.exchange.okx_options_lib import _resolve_chain_quote
|
||||
|
||||
q = _resolve_chain_quote(
|
||||
ticker={},
|
||||
meta={"tickSz": "0.2"},
|
||||
opt_type="C",
|
||||
strike=1800,
|
||||
index_px=1776,
|
||||
)
|
||||
assert q["ask"] is None
|
||||
assert q["bid"] is None
|
||||
assert q["ask_estimated"] is False
|
||||
|
||||
|
||||
def test_resolve_chain_quote_estimated_ask():
|
||||
from lib.exchange.okx_options_lib import _resolve_chain_quote
|
||||
|
||||
|
||||
Reference in New Issue
Block a user