|
1 | 1 | package ws
|
2 | 2 |
|
3 | 3 | import (
|
| 4 | + sjson "encoding/json" |
4 | 5 | "strconv"
|
5 | 6 | "time"
|
6 | 7 | )
|
@@ -60,26 +61,26 @@ type Instrument struct {
|
60 | 61 | }
|
61 | 62 |
|
62 | 63 | type Order struct {
|
63 |
| - OrderID string `json:"order_id"` |
64 |
| - OrderLinkID string `json:"order_link_id"` |
65 |
| - Symbol string `json:"symbol"` |
66 |
| - Side string `json:"side"` |
67 |
| - OrderType string `json:"order_type"` |
68 |
| - Price float64 `json:"price,string"` |
69 |
| - Qty float64 `json:"qty"` |
70 |
| - TimeInForce string `json:"time_in_force"` // GoodTillCancel/ImmediateOrCancel/FillOrKill/PostOnly |
71 |
| - CreateType string `json:"create_type"` |
72 |
| - CancelType string `json:"cancel_type"` |
73 |
| - OrderStatus string `json:"order_status"` |
74 |
| - LeavesQty float64 `json:"leaves_qty"` |
75 |
| - CumExecQty float64 `json:"cum_exec_qty"` |
76 |
| - CumExecValue float64 `json:"cum_exec_value,string"` |
77 |
| - CumExecFee float64 `json:"cum_exec_fee,string"` |
78 |
| - Timestamp time.Time `json:"timestamp"` |
79 |
| - TakeProfit float64 `json:"take_profit,string"` |
80 |
| - StopLoss float64 `json:"stop_loss,string"` |
81 |
| - TrailingStop float64 `json:"trailing_stop,string"` |
82 |
| - LastExecPrice float64 `json:"last_exec_price,string"` |
| 64 | + OrderID string `json:"order_id"` |
| 65 | + OrderLinkID string `json:"order_link_id"` |
| 66 | + Symbol string `json:"symbol"` |
| 67 | + Side string `json:"side"` |
| 68 | + OrderType string `json:"order_type"` |
| 69 | + Price sjson.Number `json:"price"` |
| 70 | + Qty float64 `json:"qty"` |
| 71 | + TimeInForce string `json:"time_in_force"` // GoodTillCancel/ImmediateOrCancel/FillOrKill/PostOnly |
| 72 | + CreateType string `json:"create_type"` |
| 73 | + CancelType string `json:"cancel_type"` |
| 74 | + OrderStatus string `json:"order_status"` |
| 75 | + LeavesQty float64 `json:"leaves_qty"` |
| 76 | + CumExecQty float64 `json:"cum_exec_qty"` |
| 77 | + CumExecValue sjson.Number `json:"cum_exec_value"` |
| 78 | + CumExecFee sjson.Number `json:"cum_exec_fee"` |
| 79 | + Timestamp time.Time `json:"timestamp"` |
| 80 | + TakeProfit sjson.Number `json:"take_profit"` |
| 81 | + StopLoss sjson.Number `json:"stop_loss"` |
| 82 | + TrailingStop sjson.Number `json:"trailing_stop"` |
| 83 | + LastExecPrice sjson.Number `json:"last_exec_price"` |
83 | 84 | }
|
84 | 85 |
|
85 | 86 | type Execution struct {
|
|
0 commit comments