This commit is contained in:
薇薇安 2026-02-10 15:40:56 +08:00
parent 1dd8d5893d
commit 972156a702
3 changed files with 827 additions and 23 deletions

View File

@ -280,7 +280,7 @@ class PositionManager:
else: # SELL
estimated_stop_loss = estimated_entry_price + (atr * atr_multiplier)
quantity = await self.risk_manager.calculate_position_size(
quantity, adjusted_leverage = await self.risk_manager.calculate_position_size(
symbol, change_percent, leverage=leverage,
entry_price=estimated_entry_price,
stop_loss_price=estimated_stop_loss,
@ -289,6 +289,15 @@ class PositionManager:
signal_strength=signal_strength
)
# 如果 RiskManager 建议了更低的安全杠杆,则应用它
if quantity is not None and adjusted_leverage is not None and adjusted_leverage != leverage:
logger.info(f"{symbol} 风险控制调整杠杆: {leverage}x -> {adjusted_leverage}x (适应宽止损)")
try:
await self.client.set_leverage(symbol, adjusted_leverage)
leverage = adjusted_leverage
except Exception as e:
logger.error(f"{symbol} 调整杠杆失败: {e},将使用原杠杆 {leverage}x 继续")
if quantity is None:
logger.warning(f"{symbol} 仓位计算失败,跳过交易")
logger.warning(f" 可能原因:")
@ -2735,7 +2744,11 @@ class PositionManager:
current_price = ticker['price'] if ticker else entry_price
# 计算止损止盈(基于保证金)
leverage = position.get('leverage', 10)
try:
leverage = float(position.get('leverage', 10))
except (ValueError, TypeError):
leverage = 10.0
stop_loss_pct_margin = config.TRADING_CONFIG.get('STOP_LOSS_PERCENT', 0.08)
# ⚠️ 关键修复:配置值格式转换(兼容百分比形式和比例形式)
if stop_loss_pct_margin is not None and stop_loss_pct_margin > 1:
@ -2943,8 +2956,13 @@ class PositionManager:
quantity = float(position_info['quantity'])
current_price_float = float(current_price)
# 计算当前盈亏(基于保证金)
leverage = position_info.get('leverage', 10)
# 获取杠杆确保为float
try:
leverage = float(position_info.get('leverage', 10))
except (ValueError, TypeError):
leverage = 10.0
# 计算持仓价值和保证金
position_value = entry_price * quantity
margin = position_value / leverage if leverage > 0 else position_value
@ -2954,10 +2972,11 @@ class PositionManager:
else: # SELL
pnl_amount = (entry_price - current_price_float) * quantity
# 计算盈亏百分比(相对于保证金,与币安一致)
# 计算盈亏百分比ROE - Return on Equity即相对于保证金的盈亏
# 这是用户最关心的“盈亏比”
pnl_percent_margin = (pnl_amount / margin * 100) if margin > 0 else 0
# 也计算价格百分比(用于显示
# 也计算价格百分比(不带杠杆的原始涨跌幅
if position_info['side'] == 'BUY':
pnl_percent_price = ((current_price_float - entry_price) / entry_price) * 100
else: # SELL
@ -3081,14 +3100,22 @@ class PositionManager:
should_log = (int(abs(pnl_percent_margin)) % 5 == 0) or (pnl_percent_margin <= -10.0 and pnl_percent_margin > -10.5)
if should_log:
trigger_condition = pnl_percent_margin <= -stop_loss_pct_margin
# 计算当前价格相对于入场价的变动百分比(不带杠杆)
price_change_pct = 0.0
if entry_price > 0:
if position_info['side'] == 'BUY':
price_change_pct = (current_price_float - entry_price) / entry_price * 100
else:
price_change_pct = (entry_price - current_price_float) / entry_price * 100
logger.warning(
f"{symbol} [实时监控] 诊断: 亏损{pnl_percent_margin:.2f}% of margin | "
f"当前价: {current_price_float:.4f} | "
f"入场价: {entry_price:.4f} | "
f"止损价: {stop_loss:.4f} (目标: -{stop_loss_pct_margin:.2f}% of margin) | "
f"方向: {position_info['side']} | "
f"是否触发: {trigger_condition} | "
f"监控状态: {'运行中' if symbol in self._monitor_tasks else '未启动'}"
f"{symbol} [实时监控] 诊断: \n"
f" • ROE(保证金盈亏): {pnl_percent_margin:.2f}% (用户关注)\n"
f" • 价格变动: {price_change_pct:.2f}% (实际币价涨跌)\n"
f" • 杠杆倍数: {leverage}x (放大倍数)\n"
f" • 当前价: {current_price_float:.4f} | 入场价: {entry_price:.4f}\n"
f" • 止损价: {stop_loss:.4f} (目标ROE: -{stop_loss_pct_margin:.2f}%)\n"
f" • 触发止损: {'YES' if trigger_condition else 'NO'}"
)
# ⚠️ 2026-01-27关键修复止损检查前先检查是否盈利

View File

@ -5,7 +5,7 @@ import logging
import os
import time
from datetime import datetime, timezone, timedelta
from typing import Dict, List, Optional
from typing import Dict, List, Optional, Tuple
try:
from .binance_client import BinanceClient
from . import config
@ -351,7 +351,7 @@ class RiskManager:
side: Optional[str] = None,
atr: Optional[float] = None,
signal_strength: Optional[int] = None
) -> Optional[float]:
) -> Tuple[Optional[float], int]:
"""
根据涨跌幅和风险参数计算合适的仓位大小
优化支持固定风险百分比计算凯利公式和信号强度分级
@ -367,7 +367,7 @@ class RiskManager:
signal_strength: 信号强度可选用于仓位分级
Returns:
建议的仓位数量如果不符合条件则返回None
Tuple[Optional[float], int]: (仓位数量, 实际使用的杠杆倍数)如果无法开仓仓位数量为None
"""
try:
logger.info(f"开始计算 {symbol} 的仓位大小...")
@ -382,13 +382,13 @@ class RiskManager:
if available_balance <= 0:
logger.warning(f"{symbol} 账户可用余额不足: {available_balance:.2f} USDT")
return None
return None, 10
# 获取当前价格
ticker = await self.client.get_ticker_24h(symbol)
if not ticker:
logger.warning(f"{symbol} 无法获取价格数据")
return None
return None, 10
current_price = ticker['price']
logger.info(f" 当前价格: {current_price:.4f} USDT")
@ -462,6 +462,42 @@ class RiskManager:
stop_distance = stop_loss_price - entry_price
if stop_distance > 0:
# ⚠️ 关键安全检查:验证止损距离是否在强平风险区内
# 强平距离估算Entry / Leverage
# 考虑到维持保证金强平会更早发生。安全系数取0.8即亏损80%保证金时强制止损,防止强平)
max_safe_stop_distance = (entry_price / actual_leverage) * 0.8
if stop_distance > max_safe_stop_distance:
logger.warning(
f" ⚠️ 止损距离过大 ({stop_distance:.4f}),超过当前杠杆的安全强平距离 ({max_safe_stop_distance:.4f}, 杠杆{actual_leverage}x)"
)
# 尝试降低杠杆以适应宽止损
# 安全杠杆 = (Entry * 0.8) / StopDistance
ideal_leverage_float = (entry_price * 0.8) / stop_distance
ideal_leverage = max(1, int(ideal_leverage_float))
if ideal_leverage < actual_leverage:
logger.info(f" 🛡️ 自动降低杠杆: {actual_leverage}x -> {ideal_leverage}x 以适应止损距离")
actual_leverage = ideal_leverage
# 重新计算安全距离
max_safe_stop_distance = (entry_price / actual_leverage) * 0.8
# 如果即使降到1倍杠杆还是不够极少见或者无法降杠杆则必须截断止损
if stop_distance > max_safe_stop_distance:
logger.warning(f" ⚠️ 即使降杠杆也无法满足安全距离,必须截断止损")
logger.info(f" ✓ 自动调整止损距离至安全范围: {max_safe_stop_distance:.4f}")
# 调整止损距离和价格
stop_distance = max_safe_stop_distance
if side == 'BUY':
stop_loss_price = entry_price - stop_distance
else:
stop_loss_price = entry_price + stop_distance
logger.info(f" ✓ 修正后的止损价格: {stop_loss_price:.4f}")
# 固定风险金额
risk_amount = total_balance * fixed_risk_percent
@ -607,7 +643,7 @@ class RiskManager:
f"{min_margin_usdt / max_position_percent:.2f} USDT "
f"才能满足最小保证金要求"
)
return None
return None, actual_leverage
# 检查是否通过风险控制
logger.info(f" 检查仓位大小是否符合风险控制要求...")
@ -623,7 +659,7 @@ class RiskManager:
f"{symbol} 名义价值 {final_notional_value:.4f} USDT < 最小要求 {MIN_NOTIONAL_VALUE:.2f} USDT"
)
logger.warning(f" 💡 此类小单子意义不大,拒绝开仓")
return None
return None, actual_leverage
if await self.check_position_size(symbol, quantity, leverage=actual_leverage):
logger.info(
@ -632,14 +668,14 @@ class RiskManager:
f"名义价值: {final_notional_value:.2f} USDT, "
f"保证金: {final_margin:.4f} USDT, 杠杆: {actual_leverage}x)"
)
return quantity
return quantity, actual_leverage
else:
logger.warning(f"{symbol} 仓位检查未通过,无法开仓")
return None
return None, actual_leverage
except Exception as e:
logger.error(f"计算仓位大小失败 {symbol}: {e}", exc_info=True)
return None
return None, 10
async def should_trade(self, symbol: str, change_percent: float) -> bool:
"""

View File

@ -0,0 +1,741 @@
[
{
"symbol": "RVVUSDT",
"side": "SELL",
"quantity": 7637,
"entry_price": 0.000887,
"entry_value_usdt": 6.774019,
"notional_usdt": 7.024054380000001,
"margin_usdt": 2.3413514600000003,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.00091974,
"pnl": -0.25003538,
"pnl_percent": -10.679104964446472,
"leverage": 3,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000417435021,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.00125,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.00125 (NEW)",
"active_tp_orders": "",
"binance_open_orders_raw": [
{
"orderId": 2000000417435021,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.00125,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "VIRTUALUSDT",
"side": "SELL",
"quantity": 98.9,
"entry_price": 0.565,
"entry_value_usdt": 55.878499999999995,
"notional_usdt": 54.988400000000006,
"margin_usdt": 6.873550000000001,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.556,
"pnl": 0.8901,
"pnl_percent": 12.949640287769784,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000417274368,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.4822,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417274350,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.5926,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.5926 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.4822 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000417274368,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.4822,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417274350,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.5926,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "GIGGLEUSDT",
"side": "SELL",
"quantity": 3.3,
"entry_price": 30.41,
"entry_value_usdt": 100.353,
"notional_usdt": 100.57952256,
"margin_usdt": 12.57244032,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 30.4786432,
"pnl": -0.22652256,
"pnl_percent": -1.8017389960455983,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416998896,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 25.42,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416998891,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 32.06,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 32.06 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 25.42 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416998896,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 25.42,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416998891,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 32.06,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "TAOUSDT",
"side": "SELL",
"quantity": 0.409,
"entry_price": 157.94,
"entry_value_usdt": 64.59746,
"notional_usdt": 64.4603372694,
"margin_usdt": 8.057542158675,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 157.6047366,
"pnl": 0.13712273,
"pnl_percent": 1.701793515934253,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416415747,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 153.21,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415742,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 161.88,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 161.88 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 153.21 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416415747,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 153.21,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415742,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 161.88,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "PUMPUSDT",
"side": "SELL",
"quantity": 24758,
"entry_price": 0.001987,
"entry_value_usdt": 49.194146,
"notional_usdt": 48.78118256,
"margin_usdt": 6.09764782,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.00197032,
"pnl": 0.41296344,
"pnl_percent": 6.7725039587478175,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416415778,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.001928,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415771,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.002036,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.002036 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.001928 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416415778,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.001928,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415771,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.002036,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "ETHFIUSDT",
"side": "SELL",
"quantity": 129.1,
"entry_price": 0.4374,
"entry_value_usdt": 56.46834,
"notional_usdt": 55.511666397,
"margin_usdt": 6.938958299625,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.42998967,
"pnl": 0.9566736,
"pnl_percent": 13.786991630310002,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000417139079,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.3741,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417139075,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.4585,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.4585 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.3741 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000417139079,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.3741,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417139075,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.4585,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "BANANAS31USDT",
"side": "BUY",
"quantity": 3946,
"entry_price": 0.004487,
"entry_value_usdt": 17.705702,
"notional_usdt": 17.771126680000002,
"margin_usdt": 2.2213908350000002,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.00450358,
"pnl": 0.06542468,
"pnl_percent": 2.9452124754084523,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416416751,
"type": "TAKE_PROFIT_MARKET",
"side": "SELL",
"stopPrice": 0.005503,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416416740,
"type": "STOP_MARKET",
"side": "SELL",
"stopPrice": 0.004149,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.004149 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.005503 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416416751,
"type": "TAKE_PROFIT_MARKET",
"side": "SELL",
"stopPrice": 0.005503,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416416740,
"type": "STOP_MARKET",
"side": "SELL",
"stopPrice": 0.004149,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "ZILUSDT",
"side": "SELL",
"quantity": 4996,
"entry_price": 0.00424,
"entry_value_usdt": 21.18304,
"notional_usdt": 20.7334,
"margin_usdt": 2.591675,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.00415,
"pnl": 0.44964,
"pnl_percent": 17.349397590361445,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000417092136,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.00342,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417092132,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.00451,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.00451 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.00342 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000417092136,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.00342,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000417092132,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.00451,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "NEIROUSDT",
"side": "SELL",
"quantity": 682371,
"entry_price": 0.0000752,
"entry_value_usdt": 51.3142992,
"notional_usdt": 50.68651788,
"margin_usdt": 6.335814735,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.00007428,
"pnl": 0.62778132,
"pnl_percent": 9.908454496499731,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416415930,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.000073,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415926,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.000077,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.000077 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.000073 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416415930,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.000073,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415926,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.000077,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "EIGENUSDT",
"side": "SELL",
"quantity": 265.8,
"entry_price": 0.2025,
"entry_value_usdt": 53.82450000000001,
"notional_usdt": 52.964349936000005,
"margin_usdt": 6.620543742000001,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.19926392,
"pnl": 0.86015006,
"pnl_percent": 12.992136197866994,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416415985,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.1965,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415975,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.2075,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.2075 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.1965 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416415985,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.1965,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416415975,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.2075,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
},
{
"symbol": "ICXUSDT",
"side": "SELL",
"quantity": 704,
"entry_price": 0.0389,
"entry_value_usdt": 27.385599999999997,
"notional_usdt": 27.456,
"margin_usdt": 3.432,
"original_notional_usdt": null,
"original_margin_usdt": null,
"mark_price": 0.039,
"pnl": -0.0704,
"pnl_percent": -2.051282051282051,
"leverage": 8,
"entry_time": null,
"stop_loss_price": null,
"take_profit_price": null,
"take_profit_1": null,
"take_profit_2": null,
"atr": null,
"entry_order_id": null,
"entry_order_type": null,
"open_orders": [
{
"orderId": 2000000416942463,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.0272,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416942454,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.0428,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
],
"active_sl_orders": "STOP_MARKET @ 0.0428 (NEW)",
"active_tp_orders": "TAKE_PROFIT_MARKET @ 0.0272 (NEW)",
"binance_open_orders_raw": [
{
"orderId": 2000000416942463,
"type": "TAKE_PROFIT_MARKET",
"side": "BUY",
"stopPrice": 0.0272,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
},
{
"orderId": 2000000416942454,
"type": "STOP_MARKET",
"side": "BUY",
"stopPrice": 0.0428,
"price": 0,
"origType": "CONDITIONAL",
"reduceOnly": true,
"status": "NEW"
}
]
}
]