not to omit empty all fields

This commit is contained in:
c9s 2021-12-06 13:34:39 +08:00
parent 634ce6180b
commit 5d6bd5a964
2 changed files with 7 additions and 7 deletions

View File

@ -23,12 +23,12 @@ type AverageCostPnlReport struct {
Profit fixedpoint.Value `json:"profit"`
NetProfit fixedpoint.Value `json:"netProfit"`
UnrealizedProfit fixedpoint.Value `json:"unrealizedProfit"`
AverageCost float64 `json:"averageCost,omitempty"`
AverageCost float64 `json:"averageCost"`
BuyVolume float64 `json:"buyVolume,omitempty"`
SellVolume float64 `json:"sellVolume,omitempty"`
FeeInUSD float64 `json:"feeInUSD,omitempty"`
Stock float64 `json:"stock,omitempty"`
CurrencyFees map[string]float64 `json:"currencyFees,omitempty"`
Stock float64 `json:"stock"`
CurrencyFees map[string]float64 `json:"currencyFees"`
}
func (report *AverageCostPnlReport) JSON() ([]byte, error) {

View File

@ -52,10 +52,10 @@ type Market struct {
Symbol string `json:"symbol"`
LocalSymbol string `json:"localSymbol,omitempty" `// LocalSymbol is used for exchange's API
PricePrecision int `json:"pricePrecision,omitempty"`
VolumePrecision int `json:"volumePrecision,omitempty"`
QuoteCurrency string `json:"quoteCurrency,omitempty"`
BaseCurrency string `json:"baseCurrency,omitempty"`
PricePrecision int `json:"pricePrecision"`
VolumePrecision int `json:"volumePrecision"`
QuoteCurrency string `json:"quoteCurrency"`
BaseCurrency string `json:"baseCurrency"`
// The MIN_NOTIONAL filter defines the minimum notional value allowed for an order on a symbol.
// An order's notional value is the price * quantity