fix: import _safe_float at module level for options close route
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -17,6 +17,7 @@ from lib.options.options_pricing_lib import (
|
||||
premium_per_sheet,
|
||||
total_premium,
|
||||
)
|
||||
from lib.exchange.okx_options_lib import _pos_side_from_position, _safe_float
|
||||
|
||||
|
||||
def _env_bool(key: str, default: bool = False) -> bool:
|
||||
@@ -59,8 +60,6 @@ def install_options_trading(app: Flask, repo_root: str, app_module: Any) -> None
|
||||
|
||||
def _build_cfg(app_module: Any) -> dict[str, Any]:
|
||||
from lib.exchange.okx_options_lib import (
|
||||
_pos_side_from_position,
|
||||
_safe_float,
|
||||
build_option_chain,
|
||||
estimate_usdt_to_usdc,
|
||||
execute_convert,
|
||||
|
||||
Reference in New Issue
Block a user