package com.xcong.excoin.modules.okxNewPrice.okxpi.enumerates; import lombok.Getter; @Getter public enum TradeTypeEnum { /** * 1 - 开仓 2 - 平仓 */ OPEN_ORDER(1,"open","开仓"), CLOSE_ORDER(2,"close","平仓"), /** * 交易模式 * 保证金模式:isolated:逐仓 ;cross:全仓 * 非保证金模式:cash:非保证金 * spot_isolated:现货逐仓(仅适用于现货带单) ,现货带单时,tdMode 的值需要指定为spot_isolated */ ISOLATED(1,"isolated","逐仓"), CROSS(2,"cross","全仓"), /** * 持仓方向 * long:开平仓模式开多,pos为正 * short:开平仓模式开空,pos为正 * net:买卖模式(交割/永续/期权:pos为正代表开多,pos为负代表开空。币币杠杆时,pos均为正,posCcy为交易货币时,代表开多;posCcy为计价货币时,代表开空。) */ LONG(1,"long","持仓方向-long"), SHORT(2,"short","持仓方向-short"), /** * 订单类型 * market:市价单 * limit:限价单 * post_only:只做maker单 * fok:全部成交或立即取消 * ioc:立即成交并取消剩余 * optimal_limit_ioc:市价委托立即成交并取消剩余(仅适用交割、永续) * mmp:做市商保护(仅适用于组合保证金账户模式下的期权订单) * mmp_and_post_only:做市商保护且只做maker单(仅适用于组合保证金账户模式下的期权订单) */ MARKET(1,"market","市价单"), LIMIT(2,"limit","限价单"), /** * 订单方向 * buy:买, sell:卖 */ BUY(1,"buy","买"), SELL(2,"sell","卖") ; private int code; private String value; private String description; TradeTypeEnum(int code, String value, String description) { this.code = code; this.value = value; this.description = description; } }