mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
kucoin: fix go 1.17 compatibility issue
This commit is contained in:
parent
3b5015e1ca
commit
388cfe0854
|
@ -126,7 +126,7 @@ func (c *RestClient) newAuthenticatedRequest(method, refURL string, params url.V
|
|||
// set location to UTC so that it outputs "2020-12-08T09:08:57.715Z"
|
||||
t := time.Now().In(time.UTC)
|
||||
// timestamp := t.Format("2006-01-02T15:04:05.999Z07:00")
|
||||
timestamp := strconv.FormatInt(t.UnixMilli(), 10)
|
||||
timestamp := strconv.FormatInt(t.UnixNano() / int64(time.Millisecond), 10)
|
||||
|
||||
var body []byte
|
||||
|
||||
|
|
|
@ -96,7 +96,7 @@ func (r *GetFillsRequest) Do(ctx context.Context) (*FillListPage, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if !params.Has("tradeType") {
|
||||
if _, ok := params["tradeType"]; !ok {
|
||||
params.Add("tradeType", "TRADE")
|
||||
}
|
||||
|
||||
|
@ -188,7 +188,7 @@ func (r *ListOrdersRequest) Do(ctx context.Context) (*OrderListPage, error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
if !params.Has("tradeType") {
|
||||
if _, ok := params["tradeType"]; !ok {
|
||||
params.Add("tradeType", "TRADE")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user