Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
f0cii committed Feb 6, 2022
1 parent 813e4bc commit 3d5b0bd
Showing 1 changed file with 21 additions and 20 deletions.
41 changes: 21 additions & 20 deletions ws/ws_response.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package ws

import (
sjson "encoding/json"
"strconv"
"time"
)
Expand Down Expand Up @@ -60,26 +61,26 @@ type Instrument struct {
}

type Order struct {
OrderID string `json:"order_id"`
OrderLinkID string `json:"order_link_id"`
Symbol string `json:"symbol"`
Side string `json:"side"`
OrderType string `json:"order_type"`
Price float64 `json:"price,string"`
Qty float64 `json:"qty"`
TimeInForce string `json:"time_in_force"` // GoodTillCancel/ImmediateOrCancel/FillOrKill/PostOnly
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus string `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue float64 `json:"cum_exec_value,string"`
CumExecFee float64 `json:"cum_exec_fee,string"`
Timestamp time.Time `json:"timestamp"`
TakeProfit float64 `json:"take_profit,string"`
StopLoss float64 `json:"stop_loss,string"`
TrailingStop float64 `json:"trailing_stop,string"`
LastExecPrice float64 `json:"last_exec_price,string"`
OrderID string `json:"order_id"`
OrderLinkID string `json:"order_link_id"`
Symbol string `json:"symbol"`
Side string `json:"side"`
OrderType string `json:"order_type"`
Price sjson.Number `json:"price"`
Qty float64 `json:"qty"`
TimeInForce string `json:"time_in_force"` // GoodTillCancel/ImmediateOrCancel/FillOrKill/PostOnly
CreateType string `json:"create_type"`
CancelType string `json:"cancel_type"`
OrderStatus string `json:"order_status"`
LeavesQty float64 `json:"leaves_qty"`
CumExecQty float64 `json:"cum_exec_qty"`
CumExecValue sjson.Number `json:"cum_exec_value"`
CumExecFee sjson.Number `json:"cum_exec_fee"`
Timestamp time.Time `json:"timestamp"`
TakeProfit sjson.Number `json:"take_profit"`
StopLoss sjson.Number `json:"stop_loss"`
TrailingStop sjson.Number `json:"trailing_stop"`
LastExecPrice sjson.Number `json:"last_exec_price"`
}

type Execution struct {
Expand Down

0 comments on commit 3d5b0bd

Please sign in to comment.