From a6015fb3e24bd2b48e5552e33dbcdcfbdcbe36fd Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 19 Jan 2021 23:30:25 +0800 Subject: [PATCH] add isMargin, isIsolated columns --- pkg/types/order.go | 4 +++- pkg/types/trade.go | 3 +++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pkg/types/order.go b/pkg/types/order.go index 9fa61c63c..2dc437a63 100644 --- a/pkg/types/order.go +++ b/pkg/types/order.go @@ -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 { diff --git a/pkg/types/trade.go b/pkg/types/trade.go index a86dc4b9d..2fc23b89a 100644 --- a/pkg/types/trade.go +++ b/pkg/types/trade.go @@ -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 {