56 lines
2.6 KiB
Go
56 lines
2.6 KiB
Go
package futuresdto
|
|
|
|
type OrderTriggerReject struct {
|
|
Symbol string `json:"s"`
|
|
OrderNo int `json:"i"`
|
|
Reason string `json:"r"`
|
|
}
|
|
|
|
type ReceiveBase struct {
|
|
EventType string `json:"e"` // 事件类型
|
|
EventTime int64 `json:"E"` // 事件时间
|
|
MatchTime int64 `json:"T"` // 撮合时间
|
|
}
|
|
|
|
type OrderTradeUpdate struct {
|
|
ReceiveBase
|
|
OrderDetails map[string]interface{} `json:"o"` // 订单详情
|
|
}
|
|
|
|
type OrderDetails struct {
|
|
Symbol string `json:"s"` // 交易对
|
|
ClientOrderId string `json:"c"` // 客户端自定义订单ID
|
|
Side string `json:"S"` // 订单方向
|
|
OrderType string `json:"o"` // 订单类型
|
|
TimeInForce string `json:"f"` // 有效方式
|
|
OriginalQuantity string `json:"q"` // 订单原始数量
|
|
OriginalPrice string `json:"p"` // 订单原始价格
|
|
AveragePrice string `json:"ap"` // 订单平均价格
|
|
StopPrice string `json:"sp"` // 条件订单触发价格,对追踪止损单无效
|
|
ExecutionType string `json:"x"` // 本次事件的具体执行类型
|
|
OrderStatus string `json:"X"` // 订单的当前状态
|
|
OrderId int64 `json:"i"` // 订单ID
|
|
LastFilledQuantity string `json:"l"` // 订单末次成交量
|
|
CumulativeQuantity string `json:"z"` // 订单累计已成交量
|
|
LastFilledPrice string `json:"L"` // 订单末次成交价格
|
|
CommissionAsset string `json:"N"` // 手续费资产类型
|
|
CommissionAmount string `json:"n"` // 手续费数量
|
|
TransactionTime int64 `json:"T"` // 成交时间
|
|
TradeId int64 `json:"t"` // 成交ID
|
|
BidValue string `json:"b"` // 买单净值
|
|
AskValue string `json:"a"` // 卖单净值
|
|
IsMaker bool `json:"m"` // 该成交是作为挂单成交吗?
|
|
ReduceOnly bool `json:"R"` // 是否是只减仓单
|
|
TriggerPriceType string `json:"wt"` // 触发价类型
|
|
OriginalOrderType string `json:"ot"` // 原始订单类型
|
|
PositionSide string `json:"ps"` // 持仓方向
|
|
ClosePosition bool `json:"cp"` // 是否为触发平仓单
|
|
ActivationPrice string `json:"AP"` // 追踪止损激活价格
|
|
CallbackRate string `json:"cr"` // 追踪止损回调比例
|
|
TriggerProtection bool `json:"pP"` // 是否开启条件单触发保护
|
|
RealizedProfitLoss string `json:"rp"` // 该交易实现盈亏
|
|
PreventSelfTrade string `json:"V"` // 自成交防止模式
|
|
PriceMatchingMode string `json:"pm"` // 价格匹配模式
|
|
GTDCancelTime int64 `json:"gtd"` // TIF为GTD的订单自动取消时间
|
|
}
|