mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
max: deposit request currency field is optional
This commit is contained in:
parent
fae3b6a215
commit
76012f0b71
|
@ -128,7 +128,7 @@ type Deposit struct {
|
|||
type GetDepositHistoryRequest struct {
|
||||
client requestgen.AuthenticatedAPIClient
|
||||
|
||||
currency string `param:"currency"`
|
||||
currency *string `param:"currency"`
|
||||
from *int64 `param:"from"` // seconds
|
||||
to *int64 `param:"to"` // seconds
|
||||
state *string `param:"state"` // submitting, submitted, rejected, accepted, checking, refunded, canceled, suspect
|
||||
|
|
|
@ -12,7 +12,7 @@ import (
|
|||
)
|
||||
|
||||
func (g *GetDepositHistoryRequest) Currency(currency string) *GetDepositHistoryRequest {
|
||||
g.currency = currency
|
||||
g.currency = ¤cy
|
||||
return g
|
||||
}
|
||||
|
||||
|
@ -52,10 +52,13 @@ func (g *GetDepositHistoryRequest) GetQueryParameters() (url.Values, error) {
|
|||
func (g *GetDepositHistoryRequest) GetParameters() (map[string]interface{}, error) {
|
||||
var params = map[string]interface{}{}
|
||||
// check currency field -> json key currency
|
||||
currency := g.currency
|
||||
if g.currency != nil {
|
||||
currency := *g.currency
|
||||
|
||||
// assign parameter of currency
|
||||
params["currency"] = currency
|
||||
// assign parameter of currency
|
||||
params["currency"] = currency
|
||||
} else {
|
||||
}
|
||||
// check from field -> json key from
|
||||
if g.from != nil {
|
||||
from := *g.from
|
||||
|
|
Loading…
Reference in New Issue
Block a user