Fix BTC option prices losing trailing zeros in display.
Integer tick formatting was stripping zeros (1370 -> 137), so hedge-plan quotes looked wrong versus the options list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,6 +17,10 @@ def test_round_option_px():
|
||||
assert round_option_px(14.9184, "0.2", "sell") == 14.8
|
||||
assert round_option_px(14.81, "0.2", "buy") == 15.0
|
||||
assert format_option_px(14.8, "0.2") == "14.8"
|
||||
# BTC 期权 tickSz=5: 整数末尾 0 必须保留 (1370 不能显成 137)
|
||||
assert format_option_px(1370, "5") == "1370"
|
||||
assert format_option_px(1160, 5) == "1160"
|
||||
assert format_option_px(1000, "5") == "1000"
|
||||
|
||||
|
||||
def test_premium_per_sheet():
|
||||
|
||||
Reference in New Issue
Block a user