Add data + fix positions

This commit is contained in:
2025-04-24 23:48:28 +07:00
parent 1d14d31af2
commit af89121c40
9 changed files with 549 additions and 9 deletions

View File

@@ -117,7 +117,7 @@ export type DecreasePositionAmounts = {
receiveTokenAmount: bigint;
receiveUsd: bigint;
triggerOrderType?: OrderType.LimitDecrease | OrderType.StopLossDecrease;
triggerOrderType?: OrderType.LimitDecrease | OrderType.StopLossDecrease | OrderType.MarketDecrease;
triggerThresholdType?: TriggerThresholdType;
decreaseSwapType: DecreasePositionSwapType;
};

View File

@@ -464,7 +464,7 @@ export const closeGmxPositionImpl = async (
indexPrice: 0n,
collateralPrice: 0n,
acceptablePrice: position.markPrice,
triggerOrderType: OrderType.LimitDecrease,
triggerOrderType: OrderType.MarketDecrease,
triggerPrice: position.markPrice,
}