This commit is contained in:
lz_db
2025-11-30 14:47:29 +08:00
parent a630c42ddd
commit 2f34f56527
3 changed files with 4744 additions and 10 deletions

View File

@@ -630,7 +630,10 @@ class mt5(Exchange, ImplicitAPI):
# 确定持仓方向
order_type = self.safe_string(position, 'orderType')
side = 'long' if order_type == 'Buy' else 'short'
if order_type in ['Buy','Sell']:
side = 'long' if order_type == 'Buy' else 'short'
else:
side = order_type
# 获取持仓数量 (未平仓数量)
contracts = lots - close_lots