@@ -204,29 +204,34 @@ func (s *CreateOrderService) Do(ctx context.Context, opts ...RequestOption) (res
204
204
205
205
// CreateOrderResponse define create order response
206
206
type CreateOrderResponse struct {
207
- Symbol string `json:"symbol"`
208
- OrderID int64 `json:"orderId"`
209
- ClientOrderID string `json:"clientOrderId"`
210
- Price string `json:"price"`
211
- OrigQuantity string `json:"origQty"`
212
- ExecutedQuantity string `json:"executedQty"`
213
- CumQuote string `json:"cumQuote"`
214
- ReduceOnly bool `json:"reduceOnly"`
215
- Status OrderStatusType `json:"status"`
216
- StopPrice string `json:"stopPrice"`
217
- TimeInForce TimeInForceType `json:"timeInForce"`
218
- Type OrderType `json:"type"`
219
- Side SideType `json:"side"`
220
- UpdateTime int64 `json:"updateTime"`
221
- WorkingType WorkingType `json:"workingType"`
222
- ActivatePrice string `json:"activatePrice"`
223
- PriceRate string `json:"priceRate"`
224
- AvgPrice string `json:"avgPrice"`
225
- PositionSide PositionSideType `json:"positionSide"`
226
- ClosePosition bool `json:"closePosition"`
227
- PriceProtect bool `json:"priceProtect"`
228
- RateLimitOrder10s string `json:"rateLimitOrder10s,omitempty"`
229
- RateLimitOrder1m string `json:"rateLimitOrder1m,omitempty"`
207
+ Symbol string `json:"symbol"` //
208
+ OrderID int64 `json:"orderId"` //
209
+ ClientOrderID string `json:"clientOrderId"` //
210
+ Price string `json:"price"` //
211
+ OrigQuantity string `json:"origQty"` //
212
+ ExecutedQuantity string `json:"executedQty"` //
213
+ CumQuote string `json:"cumQuote"` //
214
+ ReduceOnly bool `json:"reduceOnly"` //
215
+ Status OrderStatusType `json:"status"` //
216
+ StopPrice string `json:"stopPrice"` // please ignore when order type is TRAILING_STOP_MARKET
217
+ TimeInForce TimeInForceType `json:"timeInForce"` //
218
+ Type OrderType `json:"type"` //
219
+ Side SideType `json:"side"` //
220
+ UpdateTime int64 `json:"updateTime"` // update time
221
+ WorkingType WorkingType `json:"workingType"` //
222
+ ActivatePrice string `json:"activatePrice"` // activation price, only return with TRAILING_STOP_MARKET order
223
+ PriceRate string `json:"priceRate"` // callback rate, only return with TRAILING_STOP_MARKET order
224
+ AvgPrice string `json:"avgPrice"` //
225
+ PositionSide PositionSideType `json:"positionSide"` //
226
+ ClosePosition bool `json:"closePosition"` // if Close-All
227
+ PriceProtect bool `json:"priceProtect"` // if conditional order trigger is protected
228
+ PriceMatch string `json:"priceMatch"` // price match mode
229
+ SelfTradePreventionMode string `json:"selfTradePreventionMode"` // self trading preventation mode
230
+ GoodTillDate int64 `json:"goodTillDate"` // order pre-set auto cancel time for TIF GTD order
231
+ CumQty string `json:"cumQty"` //
232
+ OrigType OrderType `json:"origType"` //
233
+ RateLimitOrder10s string `json:"rateLimitOrder10s,omitempty"` //
234
+ RateLimitOrder1m string `json:"rateLimitOrder1m,omitempty"` //
230
235
}
231
236
232
237
// ListOpenOrdersService list opened orders
@@ -368,30 +373,33 @@ func (s *GetOrderService) Do(ctx context.Context, opts ...RequestOption) (res *O
368
373
369
374
// Order define order info
370
375
type Order struct {
371
- Symbol string `json:"symbol"`
372
- OrderID int64 `json:"orderId"`
373
- ClientOrderID string `json:"clientOrderId"`
374
- Price string `json:"price"`
375
- ReduceOnly bool `json:"reduceOnly"`
376
- OrigQuantity string `json:"origQty"`
377
- ExecutedQuantity string `json:"executedQty"`
378
- CumQuantity string `json:"cumQty"`
379
- CumQuote string `json:"cumQuote"`
380
- Status OrderStatusType `json:"status"`
381
- TimeInForce TimeInForceType `json:"timeInForce"`
382
- Type OrderType `json:"type"`
383
- Side SideType `json:"side"`
384
- StopPrice string `json:"stopPrice"`
385
- Time int64 `json:"time"`
386
- UpdateTime int64 `json:"updateTime"`
387
- WorkingType WorkingType `json:"workingType"`
388
- ActivatePrice string `json:"activatePrice"`
389
- PriceRate string `json:"priceRate"`
390
- AvgPrice string `json:"avgPrice"`
391
- OrigType string `json:"origType"`
392
- PositionSide PositionSideType `json:"positionSide"`
393
- PriceProtect bool `json:"priceProtect"`
394
- ClosePosition bool `json:"closePosition"`
376
+ Symbol string `json:"symbol"`
377
+ OrderID int64 `json:"orderId"`
378
+ ClientOrderID string `json:"clientOrderId"`
379
+ Price string `json:"price"`
380
+ ReduceOnly bool `json:"reduceOnly"`
381
+ OrigQuantity string `json:"origQty"`
382
+ ExecutedQuantity string `json:"executedQty"`
383
+ CumQuantity string `json:"cumQty"`
384
+ CumQuote string `json:"cumQuote"`
385
+ Status OrderStatusType `json:"status"`
386
+ TimeInForce TimeInForceType `json:"timeInForce"`
387
+ Type OrderType `json:"type"`
388
+ Side SideType `json:"side"`
389
+ StopPrice string `json:"stopPrice"`
390
+ Time int64 `json:"time"`
391
+ UpdateTime int64 `json:"updateTime"`
392
+ WorkingType WorkingType `json:"workingType"`
393
+ ActivatePrice string `json:"activatePrice"`
394
+ PriceRate string `json:"priceRate"`
395
+ AvgPrice string `json:"avgPrice"`
396
+ OrigType OrderType `json:"origType"`
397
+ PositionSide PositionSideType `json:"positionSide"`
398
+ PriceProtect bool `json:"priceProtect"`
399
+ ClosePosition bool `json:"closePosition"`
400
+ PriceMatch string `json:"priceMatch"`
401
+ SelfTradePreventionMode string `json:"selfTradePreventionMode"`
402
+ GoodTillDate int64 `json:"goodTillDate"`
395
403
}
396
404
397
405
// ListOrdersService all account orders; active, canceled, or filled
0 commit comments