Files
trade-drift-dlob/src/utils/types.ts
2025-07-15 10:19:55 -07:00

25 lines
703 B
TypeScript

import { AssetType, MarketTypeStr } from '@drift-labs/sdk';
import { TradeOffsetPrice } from '@drift/common';
export type AuctionParamArgs = {
// mandatory args
marketIndex: number;
marketType: MarketTypeStr;
direction: 'long' | 'short';
amount: string;
assetType: AssetType;
// optional settings args
reduceOnly?: boolean;
allowInfSlippage?: boolean;
slippageTolerance?: number;
isOracleOrder?: boolean;
auctionDuration?: number;
auctionStartPriceOffset?: number | 'marketBased';
auctionEndPriceOffset?: number;
auctionStartPriceOffsetFrom?: TradeOffsetPrice | 'marketBased';
auctionEndPriceOffsetFrom?: TradeOffsetPrice;
additionalEndPriceBuffer?: string;
userOrderId?: number;
};