mirror of
https://github.com/discountry/ritmex-bot.git
synced 2026-09-10 08:48:07 +00:00
feat: 优化订单去重和取消逻辑,确保在处理STOP订单时避免精度损失
This commit is contained in:
@@ -78,7 +78,8 @@ export function lighterOrderToAster(symbol: string, order: LighterOrder): AsterO
|
||||
? "SELL"
|
||||
: "BUY";
|
||||
return {
|
||||
orderId: order.order_index,
|
||||
// Use string order id to avoid precision loss; prefer on-chain order_index for cancellation
|
||||
orderId: String(order.order_index ?? order.client_order_index ?? ""),
|
||||
clientOrderId: String(order.client_order_index ?? order.order_index ?? ""),
|
||||
symbol,
|
||||
side,
|
||||
|
||||
Reference in New Issue
Block a user