rename funding rate query method name

This commit is contained in:
c9s 2021-10-19 15:29:55 +08:00
parent af602df302
commit 1e6692ec8d
2 changed files with 2 additions and 2 deletions

View File

@ -919,7 +919,7 @@ type FundingRate struct {
Time time.Time
}
func (e *Exchange) QueryLastFundingRate(ctx context.Context, symbol string) (*FundingRate, error) {
func (e *Exchange) QueryFundingRateHistory(ctx context.Context, symbol string) (*FundingRate, error) {
futuresClient := binance.NewFuturesClient(e.key, e.secret)
rates, err := futuresClient.NewFundingRateService().
Symbol(symbol).

View File

@ -96,7 +96,7 @@ func (s *Strategy) listenToFundingRate(ctx context.Context, exchange *binance.Ex
case <-ctx.Done():
return
case <-fundingRateTicker.C:
fundingRate, err := exchange.QueryLastFundingRate(ctx, s.Symbol)
fundingRate, err := exchange.QueryFundingRateHistory(ctx, s.Symbol)
if err != nil {
log.WithError(err).Error("can not query last funding rate")
continue