mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
add db tags
This commit is contained in:
parent
8388f443a9
commit
f223940b69
|
@ -29,31 +29,31 @@ const (
|
|||
type Order struct {
|
||||
SubmitOrder
|
||||
|
||||
OrderID uint64 `json:"orderID"` // order id
|
||||
Status OrderStatus `json:"status"`
|
||||
ExecutedQuantity float64 `json:"executedQuantity"`
|
||||
CreationTime time.Time
|
||||
OrderID uint64 `json:"orderID" db:"order_id"` // order id
|
||||
Status OrderStatus `json:"status" db:"status"`
|
||||
ExecutedQuantity float64 `json:"executedQuantity" db:"executed_quantity"`
|
||||
CreationTime time.Time `json:"creationTime" db:"created_at"`
|
||||
}
|
||||
|
||||
type SubmitOrder struct {
|
||||
ClientOrderID string `json:"clientOrderID"`
|
||||
ClientOrderID string `json:"clientOrderID" db:"client_order_id"`
|
||||
|
||||
Symbol string
|
||||
Side SideType
|
||||
Type OrderType
|
||||
Symbol string `json:"symbol" db:"symbol"`
|
||||
Side SideType `json:"side" db:"side"`
|
||||
Type OrderType `json:"orderType" db:"order_type"`
|
||||
|
||||
Quantity float64
|
||||
Price float64
|
||||
StopPrice float64
|
||||
Quantity float64 `json:"quantity" db:"quantity"`
|
||||
Price float64 `json:"price" db:"price"`
|
||||
StopPrice float64 `json:"stopPrice" db:"stop_price"`
|
||||
|
||||
Market Market
|
||||
Market Market `json:"market" db:"-"`
|
||||
|
||||
// TODO: we can probably remove these field
|
||||
StopPriceString string
|
||||
PriceString string
|
||||
QuantityString string
|
||||
StopPriceString string `json:"-"`
|
||||
PriceString string `json:"-"`
|
||||
QuantityString string `json:"-"`
|
||||
|
||||
TimeInForce string `json:"timeInForce"` // GTC, IOC, FOK
|
||||
TimeInForce string `json:"timeInForce" db:"time_in_force"` // GTC, IOC, FOK
|
||||
}
|
||||
|
||||
func (o *SubmitOrder) SlackAttachment() slack.Attachment {
|
||||
|
|
Loading…
Reference in New Issue
Block a user