binance: add incomeType parameter

This commit is contained in:
c9s 2023-03-26 00:23:25 +08:00
parent f50999b780
commit 12ec3fd87f
No known key found for this signature in database
GPG Key ID: 7385E7E464CB0A54

View File

@ -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)