@@ -239,29 +239,30 @@ type OrderListResult struct {
239
239
240
240
// Order ...
241
241
type Order struct {
242
- OrderID string `json:"order_id"`
243
- StopOrderID string `json:"stop_order_id"`
244
- UserID int `json:"user_id"`
245
- Symbol string `json:"symbol"`
246
- Side string `json:"side"`
247
- OrderType string `json:"order_type"`
248
- Price float64 `json:"price"`
249
- Qty float64 `json:"qty"`
250
- TimeInForce string `json:"time_in_force"`
251
- StopOrderType string `json:"stop_order_type,omitempty"`
252
- StopPx sjson.Number `json:"stop_px,omitempty"`
253
- OrderStatus string `json:"order_status"`
254
- LastExecTime string `json:"last_exec_time"`
255
- LastExecPrice float64 `json:"last_exec_price"`
256
- LeavesQty float64 `json:"leaves_qty"`
257
- CumExecQty float64 `json:"cum_exec_qty"`
258
- CumExecValue float64 `json:"cum_exec_value"`
259
- CumExecFee float64 `json:"cum_exec_fee"`
260
- RejectReason string `json:"reject_reason"`
261
- OrderLinkID string `json:"order_link_id"`
262
- CreatedAt time.Time `json:"created_at"`
263
- UpdatedAt time.Time `json:"updated_at"`
264
- ExtFields * ExtFields `json:"ext_fields,omitempty"`
242
+ OrderID string `json:"order_id"`
243
+ //StopOrderID string `json:"stop_order_id"`
244
+ UserID int `json:"user_id"`
245
+ Symbol string `json:"symbol"`
246
+ Side string `json:"side"`
247
+ OrderType string `json:"order_type"`
248
+ Price float64 `json:"price"`
249
+ Qty float64 `json:"qty"`
250
+ TimeInForce string `json:"time_in_force"`
251
+ //StopOrderType string `json:"stop_order_type,omitempty"`
252
+ //StopPx sjson.Number `json:"stop_px,omitempty"`
253
+ OrderStatus string `json:"order_status"`
254
+ //StopOrderStatus string `json:"stop_order_status"`
255
+ LastExecTime string `json:"last_exec_time"`
256
+ LastExecPrice float64 `json:"last_exec_price"`
257
+ LeavesQty float64 `json:"leaves_qty"`
258
+ CumExecQty float64 `json:"cum_exec_qty"`
259
+ CumExecValue float64 `json:"cum_exec_value"`
260
+ CumExecFee float64 `json:"cum_exec_fee"`
261
+ RejectReason string `json:"reject_reason"`
262
+ OrderLinkID string `json:"order_link_id"`
263
+ CreatedAt time.Time `json:"created_at"`
264
+ UpdatedAt time.Time `json:"updated_at"`
265
+ ExtFields * ExtFields `json:"ext_fields,omitempty"`
265
266
}
266
267
267
268
type ExtFields struct {
@@ -416,8 +417,8 @@ type OrderV2 struct {
416
417
OrderStatus string `json:"order_status"`
417
418
LastExecTime sjson.Number `json:"last_exec_time"`
418
419
LastExecPrice sjson.Number `json:"last_exec_price"`
419
- LeavesQty int `json:"leaves_qty"`
420
- CumExecQty int `json:"cum_exec_qty"`
420
+ LeavesQty float64 `json:"leaves_qty"`
421
+ CumExecQty float64 `json:"cum_exec_qty"`
421
422
CumExecValue sjson.Number `json:"cum_exec_value"`
422
423
CumExecFee sjson.Number `json:"cum_exec_fee"`
423
424
RejectReason string `json:"reject_reason"`
@@ -473,3 +474,76 @@ type QueryOrderResult struct {
473
474
RateLimitResetMs int64 `json:"rate_limit_reset_ms"`
474
475
RateLimit int `json:"rate_limit"`
475
476
}
477
+
478
+ type StopOrderV2 struct {
479
+ ClOrdID string `json:"clOrdID"`
480
+ UserID int64 `json:"user_id"`
481
+ Symbol string `json:"symbol"`
482
+ Side string `json:"side"`
483
+ OrderType string `json:"order_type"`
484
+ Price sjson.Number `json:"price"`
485
+ Qty float64 `json:"qty"`
486
+ TimeInForce string `json:"time_in_force"`
487
+ CreateType string `json:"create_type"`
488
+ CancelType string `json:"cancel_type"`
489
+ OrderStatus string `json:"order_status"`
490
+ LeavesQty float64 `json:"leaves_qty"`
491
+ LeavesValue string `json:"leaves_value"`
492
+ CreatedAt time.Time `json:"created_at"`
493
+ UpdatedAt time.Time `json:"updated_at"`
494
+ CrossStatus string `json:"cross_status"`
495
+ CrossSeq float64 `json:"cross_seq"`
496
+ StopOrderType string `json:"stop_order_type"`
497
+ TriggerBy string `json:"trigger_by"`
498
+ BasePrice sjson.Number `json:"base_price"`
499
+ ExpectedDirection string `json:"expected_direction"`
500
+ }
501
+
502
+ type CancelStopOrdersV2Result struct {
503
+ RetCode int `json:"ret_code"`
504
+ RetMsg string `json:"ret_msg"`
505
+ ExtCode string `json:"ext_code"`
506
+ ExtInfo string `json:"ext_info"`
507
+ Result []StopOrderV2 `json:"result"`
508
+ TimeNow string `json:"time_now"`
509
+ RateLimitStatus int `json:"rate_limit_status"`
510
+ RateLimitResetMs int64 `json:"rate_limit_reset_ms"`
511
+ RateLimit int `json:"rate_limit"`
512
+ }
513
+
514
+ type StopOrder struct {
515
+ UserID int64 `json:"user_id"`
516
+ StopOrderStatus string `json:"stop_order_status"`
517
+ Symbol string `json:"symbol"`
518
+ Side string `json:"side"`
519
+ OrderType string `json:"order_type"`
520
+ Price float64 `json:"price"`
521
+ Qty float64 `json:"qty"`
522
+ TimeInForce string `json:"time_in_force"`
523
+ StopOrderType string `json:"stop_order_type"`
524
+ TriggerBy string `json:"trigger_by"`
525
+ BasePrice float64 `json:"base_price"`
526
+ OrderLinkID string `json:"order_link_id"`
527
+ CreatedAt time.Time `json:"created_at"`
528
+ UpdatedAt time.Time `json:"updated_at"`
529
+ StopPx float64 `json:"stop_px"`
530
+ StopOrderID string `json:"stop_order_id"`
531
+ }
532
+
533
+ type GetStopOrdersResultData struct {
534
+ CurrentPage int `json:"current_page"`
535
+ LastPage int `json:"last_page"`
536
+ Data []StopOrder `json:"data"`
537
+ }
538
+
539
+ type GetStopOrdersResult struct {
540
+ RetCode int `json:"ret_code"`
541
+ RetMsg string `json:"ret_msg"`
542
+ ExtCode string `json:"ext_code"`
543
+ Result GetStopOrdersResultData `json:"result"`
544
+ ExtInfo interface {} `json:"ext_info"`
545
+ TimeNow string `json:"time_now"`
546
+ RateLimitStatus int `json:"rate_limit_status"`
547
+ RateLimitResetMs int64 `json:"rate_limit_reset_ms"`
548
+ RateLimit int `json:"rate_limit"`
549
+ }
0 commit comments