mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 06:53:52 +00:00
rename funding rate query method name
This commit is contained in:
parent
af602df302
commit
1e6692ec8d
|
@ -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).
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user