mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 00:38:07 +00:00
更新 MakerEngine,清理历史挂单并重置状态;修复 getPosition 函数以处理未定义的选项
This commit is contained in:
@@ -21,9 +21,9 @@ export function getPosition(snapshot: AsterAccountSnapshot | null, symbol: strin
|
||||
withExposure.sort((a, b) => Math.abs(Number(b.positionAmt)) - Math.abs(Number(a.positionAmt)))[0] ??
|
||||
positions[0];
|
||||
return {
|
||||
positionAmt: Number(selected.positionAmt) || 0,
|
||||
entryPrice: Number(selected.entryPrice) || 0,
|
||||
unrealizedProfit: Number(selected.unrealizedProfit) || 0,
|
||||
positionAmt: Number(selected?.positionAmt) || 0,
|
||||
entryPrice: Number(selected?.entryPrice) || 0,
|
||||
unrealizedProfit: Number(selected?.unrealizedProfit) || 0,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user