diff --git a/vnpy_bridge.py b/vnpy_bridge.py index faf7d20..51494ef 100644 --- a/vnpy_bridge.py +++ b/vnpy_bridge.py @@ -1027,11 +1027,16 @@ def ctp_get_account(mode: str) -> dict[str, Any]: return b.get_account() -def ctp_list_positions(mode: str, *, refresh_if_empty: bool = True) -> list[dict[str, Any]]: +def ctp_list_positions( + mode: str, + *, + refresh_if_empty: bool = True, + refresh_margin: bool = False, +) -> list[dict[str, Any]]: b = get_bridge() if b.connected_mode != mode or not b.ping(): return [] - return b.list_positions(refresh_if_empty=refresh_if_empty) + return b.list_positions(refresh_if_empty=refresh_if_empty, refresh_margin=refresh_margin) def ctp_list_active_orders(mode: str) -> list[dict[str, Any]]: