chore(wallet,positions): use reduceOnly and IOC order for close position tx (#3263)
This commit is contained in:
parent
b1b0039b33
commit
fcda4d7fcd
@ -45,11 +45,12 @@ export const PositionsManager = ({
|
|||||||
{
|
{
|
||||||
marketId: marketId,
|
marketId: marketId,
|
||||||
type: Schema.OrderType.TYPE_MARKET as const,
|
type: Schema.OrderType.TYPE_MARKET as const,
|
||||||
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_FOK as const,
|
timeInForce: Schema.OrderTimeInForce.TIME_IN_FORCE_IOC as const,
|
||||||
side: openVolume.startsWith('-')
|
side: openVolume.startsWith('-')
|
||||||
? Schema.Side.SIDE_BUY
|
? Schema.Side.SIDE_BUY
|
||||||
: Schema.Side.SIDE_SELL,
|
: Schema.Side.SIDE_SELL,
|
||||||
size: openVolume.replace('-', ''),
|
size: openVolume.replace('-', ''),
|
||||||
|
reduceOnly: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
@ -45,6 +45,7 @@ export interface OrderSubmission {
|
|||||||
size: string;
|
size: string;
|
||||||
price?: string;
|
price?: string;
|
||||||
expiresAt?: string;
|
expiresAt?: string;
|
||||||
|
reduceOnly?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface OrderCancellation {
|
export interface OrderCancellation {
|
||||||
|
Loading…
Reference in New Issue
Block a user