1、主单增加减仓、加仓状态

2、bug修复
This commit is contained in:
2025-02-20 12:00:04 +08:00
parent b132ee879b
commit ade768c28a
13 changed files with 312 additions and 52 deletions

View File

@ -22,3 +22,55 @@ type StoplossMarket struct {
Symbol string `json:"symbol"`
Type int `json:"type" comment:"对冲类型 1-现货 2-合约"`
}
type BinanceSpotOrder struct {
Symbol string `json:"symbol"` // 交易对
OrderID int64 `json:"orderId"` // 系统的订单ID
OrderListID int64 `json:"orderListId"` // 除非此单是订单列表的一部分, 否则此值为 -1
ClientOrderID string `json:"clientOrderId"` // 客户自己设置的ID
Price string `json:"price"` // 订单价格
OrigQty string `json:"origQty"` // 用户设置的原始订单数量
ExecutedQty string `json:"executedQty"` // 交易的订单数量
OrigQuoteOrderQty string `json:"origQuoteOrderQty"` // 原始的交易金额
CummulativeQuoteQty string `json:"cummulativeQuoteQty"` // 累计交易的金额
Status string `json:"status"` // 订单状态
TimeInForce string `json:"timeInForce"` // 订单的时效方式
Type string `json:"type"` // 订单类型,比如市价单,现价单等
Side string `json:"side"` // 订单方向,买还是卖
StopPrice string `json:"stopPrice"` // 止损价格
IcebergQty string `json:"icebergQty"` // 冰山数量
Time int64 `json:"time"` // 订单时间
UpdateTime int64 `json:"updateTime"` // 最后更新时间
IsWorking bool `json:"isWorking"` // 订单是否出现在orderbook中
WorkingTime int64 `json:"workingTime"` // 订单添加到 order book 的时间
SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 如何处理自我交易模式
}
type BinanceFutureOrder struct {
AvgPrice string `json:"avgPrice"` // 平均成交价
ClientOrderID string `json:"clientOrderId"` // 用户自定义的订单号
CumQuote string `json:"cumQuote"` // 成交金额
ExecutedQty string `json:"executedQty"` // 成交量
OrderID int64 `json:"orderId"` // 系统订单号
OrigQty string `json:"origQty"` // 原始委托数量
OrigType string `json:"origType"` // 触发前订单类型
Price string `json:"price"` // 委托价格
ReduceOnly bool `json:"reduceOnly"` // 是否仅减仓
Side string `json:"side"` // 买卖方向
PositionSide string `json:"positionSide"` // 持仓方向
Status string `json:"status"` // 订单状态
StopPrice string `json:"stopPrice"` // 触发价,对`TRAILING_STOP_MARKET`无效
ClosePosition bool `json:"closePosition"` // 是否条件全平仓
Symbol string `json:"symbol"` // 交易对
Time int64 `json:"time"` // 订单时间
TimeInForce string `json:"timeInForce"` // 有效方法
Type string `json:"type"` // 订单类型
ActivatePrice string `json:"activatePrice"` // 跟踪止损激活价格, 仅`TRAILING_STOP_MARKET` 订单返回此字段
PriceRate string `json:"priceRate"` // 跟踪止损回调比例, 仅`TRAILING_STOP_MARKET` 订单返回此字段
UpdateTime int64 `json:"updateTime"` // 更新时间
WorkingType string `json:"workingType"` // 条件价格触发类型
PriceProtect bool `json:"priceProtect"` // 是否开启条件单触发保护
PriceMatch string `json:"priceMatch"` // 盘口价格下单模式
SelfTradePreventionMode string `json:"selfTradePreventionMode"` // 订单自成交保护模式
GoodTillDate int64 `json:"goodTillDate"` // 订单TIF为GTD时的自动取消时间
}