v4.5.5: 1000PEPE→PEPE 归一化 (开仓+close路径都修)
This commit is contained in:
@@ -441,6 +441,9 @@ def close_position_raw(symbol_usdt, signal_side):
|
|||||||
dict: {action, pos_before, pos_after, pnl, message}
|
dict: {action, pos_before, pos_after, pnl, message}
|
||||||
"""
|
"""
|
||||||
inst_id = f"{symbol_usdt}-USDT-SWAP"
|
inst_id = f"{symbol_usdt}-USDT-SWAP"
|
||||||
|
# 1000PEPE 归一化为 PEPE (OKX 实际合约名)
|
||||||
|
if symbol_usdt == '1000PEPE':
|
||||||
|
inst_id = 'PEPE-USDT-SWAP'
|
||||||
|
|
||||||
# 1. 查当前持仓
|
# 1. 查当前持仓
|
||||||
resp = _okx_raw_request('GET', '/api/v5/account/positions', {'instId': inst_id})
|
resp = _okx_raw_request('GET', '/api/v5/account/positions', {'instId': inst_id})
|
||||||
|
|||||||
Reference in New Issue
Block a user