Normalize fullwidth punctuation to ASCII across codebase.
Add scripts/normalize_ambiguous_unicode.py; fix corrupted patch_instance_theme_templates.py. Preserves curly quotes in string literals; removes Git homoglyph warnings on .env.example. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
OKX 挂单聚合:普通委托 + 算法单(conditional / oco / trigger)。
|
||||
交易所 App「止盈止损」页多为 orders-algo-pending,仅 fetch_open_orders 默认拿不到。
|
||||
OKX 挂单聚合:普通委托 + 算法单(conditional / oco / trigger).
|
||||
交易所 App「止盈止损」页多为 orders-algo-pending,仅 fetch_open_orders 默认拿不到.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
@@ -22,7 +22,7 @@ def _okx_algo_cancel_id(order_id: str) -> str:
|
||||
|
||||
|
||||
def _okx_order_needs_stop_cancel_param(order: dict) -> bool:
|
||||
"""OKX 条件/算法单撤单须 params.stop=True,否则 cancel_order 走普通单接口会静默失败。"""
|
||||
"""OKX 条件/算法单撤单须 params.stop=True,否则 cancel_order 走普通单接口会静默失败."""
|
||||
if not isinstance(order, dict):
|
||||
return False
|
||||
info = order.get("info") or {}
|
||||
@@ -40,7 +40,7 @@ def _okx_order_needs_stop_cancel_param(order: dict) -> bool:
|
||||
|
||||
|
||||
def fetch_okx_all_open_orders(ex, exchange_symbol: str) -> list[dict]:
|
||||
"""合并 OKX 普通挂单与算法挂单(去重)。"""
|
||||
"""合并 OKX 普通挂单与算法挂单(去重)."""
|
||||
if not exchange_symbol:
|
||||
return []
|
||||
ex.load_markets()
|
||||
@@ -80,8 +80,8 @@ def fetch_okx_all_open_orders(ex, exchange_symbol: str) -> list[dict]:
|
||||
|
||||
def cancel_okx_all_open_orders(ex, exchange_symbol: str) -> int:
|
||||
"""
|
||||
撤销某合约全部挂单(普通 + 条件/算法)。
|
||||
OKX 止盈止损在 orders-algo-pending,必须用 stop=True 才能撤掉。
|
||||
撤销某合约全部挂单(普通 + 条件/算法).
|
||||
OKX 止盈止损在 orders-algo-pending,必须用 stop=True 才能撤掉.
|
||||
"""
|
||||
if not exchange_symbol:
|
||||
return 0
|
||||
|
||||
Reference in New Issue
Block a user