mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
kucoin: fix kline query param
This commit is contained in:
parent
be10019007
commit
b79ab5d68d
|
@ -39,20 +39,20 @@ func (g *GetKLinesRequest) GetParameters() (map[string]interface{}, error) {
|
|||
// assign parameter of symbol
|
||||
params["symbol"] = symbol
|
||||
|
||||
// check interval field -> json key interval
|
||||
// check interval field -> json key type
|
||||
interval := g.interval
|
||||
|
||||
switch interval {
|
||||
case "1min", "3min", "5min", "15min", "30min", "1hour", "2hour", "4hour", "6hour", "8hour", "12hour", "1day", "1week":
|
||||
params["interval"] = interval
|
||||
params["type"] = interval
|
||||
|
||||
default:
|
||||
return params, fmt.Errorf("interval value %v is invalid", interval)
|
||||
return params, fmt.Errorf("type value %v is invalid", interval)
|
||||
|
||||
}
|
||||
|
||||
// assign parameter of interval
|
||||
params["interval"] = interval
|
||||
params["type"] = interval
|
||||
|
||||
// check startAt field -> json key startAt
|
||||
if g.startAt != nil {
|
||||
|
|
|
@ -296,7 +296,7 @@ type GetKLinesRequest struct {
|
|||
|
||||
symbol string `param:"symbol"`
|
||||
|
||||
interval string `param:"interval" validValues:"1min,3min,5min,15min,30min,1hour,2hour,4hour,6hour,8hour,12hour,1day,1week"`
|
||||
interval string `param:"type" validValues:"1min,3min,5min,15min,30min,1hour,2hour,4hour,6hour,8hour,12hour,1day,1week"`
|
||||
|
||||
startAt *time.Time `param:"startAt,seconds"`
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user