diff --git a/pkg/exchange/bybit/bybitapi/v3/get_trades_request_requestgen.go b/pkg/exchange/bybit/bybitapi/v3/get_trades_request_requestgen.go index 3336db113..e5322aedb 100644 --- a/pkg/exchange/bybit/bybitapi/v3/get_trades_request_requestgen.go +++ b/pkg/exchange/bybit/bybitapi/v3/get_trades_request_requestgen.go @@ -7,6 +7,7 @@ import ( "encoding/json" "fmt" "github.com/c9s/bbgo/pkg/exchange/bybit/bybitapi" + "github.com/sirupsen/logrus" "net/url" "reflect" "regexp" @@ -233,6 +234,15 @@ func (g *GetTradesRequest) Do(ctx context.Context) (*TradesResponse, error) { if err != nil { 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 if err := response.DecodeJSON(&apiResponse); err != nil {