mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-27 09:15:15 +00:00
s
This commit is contained in:
parent
60331c1c67
commit
5f984c55df
|
@ -7,6 +7,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"github.com/c9s/bbgo/pkg/exchange/bybit/bybitapi"
|
"github.com/c9s/bbgo/pkg/exchange/bybit/bybitapi"
|
||||||
|
"github.com/sirupsen/logrus"
|
||||||
"net/url"
|
"net/url"
|
||||||
"reflect"
|
"reflect"
|
||||||
"regexp"
|
"regexp"
|
||||||
|
@ -233,6 +234,15 @@ func (g *GetTradesRequest) Do(ctx context.Context) (*TradesResponse, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
if limitStatus := response.Header.Get("X-Bapi-Limit-Status"); len(limitStatus) != 0 {
|
||||||
|
logrus.Infof("[bybit] limit status: %d", limitStatus)
|
||||||
|
}
|
||||||
|
if limit := response.Header.Get("X-Bapi-Limit"); len(limit) != 0 {
|
||||||
|
logrus.Infof("[bybit] rate limit: %d", limit)
|
||||||
|
}
|
||||||
|
if ts := response.Header.Get("X-Bapi-Limit-Reset-Timestamp"); len(ts) != 0 {
|
||||||
|
logrus.Infof("[bybit] rate limit ts: %d", ts)
|
||||||
|
}
|
||||||
|
|
||||||
var apiResponse bybitapi.APIResponse
|
var apiResponse bybitapi.APIResponse
|
||||||
if err := response.DecodeJSON(&apiResponse); err != nil {
|
if err := response.DecodeJSON(&apiResponse); err != nil {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user