types: add order.originalStatus

This commit is contained in:
c9s 2023-11-17 16:18:55 +08:00
parent fe9dc9a79d
commit b307275e60
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -258,11 +258,22 @@ type Order struct {
OrderID uint64 `json:"orderID" db:"order_id"` // order id
UUID string `json:"uuid,omitempty"`
Status OrderStatus `json:"status" db:"status"`
Status OrderStatus `json:"status" db:"status"`
// OriginalStatus stores the original order status from the specific exchange
OriginalStatus string `json:"originalStatus,omitempty" db:"-"`
// ExecutedQuantity is how much quantity has been executed
ExecutedQuantity fixedpoint.Value `json:"executedQuantity" db:"executed_quantity"`
IsWorking bool `json:"isWorking" db:"is_working"`
CreationTime Time `json:"creationTime" db:"created_at"`
UpdateTime Time `json:"updateTime" db:"updated_at"`
// IsWorking means if the order is still on the order book (active order)
IsWorking bool `json:"isWorking" db:"is_working"`
// CreationTime is the time when this order is created
CreationTime Time `json:"creationTime" db:"created_at"`
// UpdateTime is the latest time when this order gets updated
UpdateTime Time `json:"updateTime" db:"updated_at"`
IsFutures bool `json:"isFutures,omitempty" db:"is_futures"`
IsMargin bool `json:"isMargin,omitempty" db:"is_margin"`