add isMargin, isIsolated columns

This commit is contained in:
c9s 2021-01-19 23:30:25 +08:00
parent c644fb0036
commit a6015fb3e2
2 changed files with 6 additions and 1 deletions

View File

@ -24,7 +24,6 @@ var (
SideEffectTypeAutoRepay MarginOrderSideEffectType = "AUTO_REPAY"
)
// OrderType define order type
type OrderType string
@ -120,6 +119,9 @@ type Order struct {
IsWorking bool `json:"isWorking" db:"is_working"`
CreationTime time.Time `json:"creationTime" db:"created_at"`
UpdateTime time.Time `json:"updateTime" db:"updated_at"`
IsMargin bool `json:"isMargin" db:"is_margin"`
IsIsolated bool `json:"isIsolated" db:"is_isolated"`
}
func (o Order) String() string {

View File

@ -34,6 +34,9 @@ type Trade struct {
Time time.Time `json:"tradedAt" db:"traded_at"`
Fee float64 `json:"fee" db:"fee"`
FeeCurrency string `json:"feeCurrency" db:"fee_currency"`
IsMargin bool `json:"isMargin" db:"is_margin"`
IsIsolated bool `json:"isIsolated" db:"is_isolated"`
}
func (trade Trade) PlainText() string {