From 12ec3fd87fbe8d89cae478189d797cfb86cb6e21 Mon Sep 17 00:00:00 2001 From: c9s Date: Sun, 26 Mar 2023 00:23:25 +0800 Subject: [PATCH] binance: add incomeType parameter --- pkg/exchange/binance/futures.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/exchange/binance/futures.go b/pkg/exchange/binance/futures.go index f6bcd1301..3374a79d5 100644 --- a/pkg/exchange/binance/futures.go +++ b/pkg/exchange/binance/futures.go @@ -369,9 +369,10 @@ func (e *Exchange) queryFuturesDepth(ctx context.Context, symbol string) (snapsh // QueryFuturesIncomeHistory queries the income history on the binance futures account // This is more binance futures specific API, the convert function is not designed yet. // TODO: consider other futures platforms and design the common data structure for this -func (e *Exchange) QueryFuturesIncomeHistory(ctx context.Context, symbol string, startTime, endTime time.Time) ([]binanceapi.FuturesIncome, error) { +func (e *Exchange) QueryFuturesIncomeHistory(ctx context.Context, symbol string, incomeType binanceapi.FuturesIncomeType, startTime, endTime time.Time) ([]binanceapi.FuturesIncome, error) { req := e.futuresClient2.NewFuturesGetIncomeHistoryRequest() req.Symbol(symbol) + req.IncomeType(incomeType) req.StartTime(startTime) req.EndTime(endTime) resp, err := req.Do(ctx)