refactor pnl updater

This commit is contained in:
c9s 2020-06-09 23:27:46 +08:00
parent 825cefd76d
commit fce3beccd0

View File

@ -54,15 +54,24 @@ type ExecutionReportEvent struct {
OrderType string `json:"o"`
TimeInForce string `json:"f"`
Quantity string `json:"q"`
Price string `json:"p"`
StopPrice string `json:"P"`
OrderQuantity string `json:"q"`
OrderPrice string `json:"p"`
StopPrice string `json:"P"`
IsOnBook bool `json:"w"`
IsMaker bool `json:"m"`
CommissionAmount string `json:"n"`
CommissionAsset string `json:"N"`
CurrentExecutionType string `json:"x"`
CurrentOrderStatus string `json:"X"`
OrderID int `json:"i"`
TradeID int64 `json:"t"`
TransactionTime int64 `json:"T"`
LastExecutedQuantity string `json:"l"`
CumulativeFilledQuantity string `json:"z"`
LastExecutedPrice string `json:"L"`
@ -193,4 +202,3 @@ func ParseEvent(message string) (interface{}, error) {
return nil, fmt.Errorf("unsupported message: %s", message)
}