import { OrderTypeEnum, OrderSideEnum, TimeInForceEnum, PositionSideEnum, PriceSourceEnum } from "@shared/types"; import { IFormatCurrentPair } from "@shared/types/interface"; export type CloseValuesType = { /** 可平多 */ buy: number; /** 可平空 */ sell: number; }; export interface FuturesFormProps { /** 是否登陆 */ isLogin?: boolean; /** 当前交易对 */ currentPair: IFormatCurrentPair; avbBalance?: string; leverage?: number; /** 最新价格 */ lastPrice?: string; /** 买一 */ buyOnePrice?: string; /** 卖一 */ sellOnePrice?: string; /** 可平量 */ closeValues?: CloseValuesType; /** 开仓按数量/成本下单 */ openBaseQty?: boolean; handlePlaceOrder?: (params: any) => void; handleBaseOnChange?: (bool: boolean) => void; } export interface IPlaceNormalOrderParams { side: OrderSideEnum; positionSide: PositionSideEnum; orderType: OrderTypeEnum; price?: string; /** 数量张 */ orderQty: string; postOnly?: boolean; timeInForce?: TimeInForceEnum; } export interface IPlaceStopOrderParams extends IPlaceNormalOrderParams { ordPx?: string; /** 触发类型 */ triggerPxType?: PriceSourceEnum; } export interface IPlaceOrderParams extends IPlaceStopOrderParams { /** 成本 */ cost?: string; /** 价值订单 */ orderValue?: string; /** 数量(面值) */ quantityValue: string; /** 是否平仓 */ isClose: boolean; /** 是否市场价格单 */ isMarket: boolean; sideText: string; /** 买单 */ isBuy: boolean; isCondition: boolean; }