mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
binance: make asset parameter optional
This commit is contained in:
parent
92a5eac412
commit
4ce716d6ad
|
@ -62,8 +62,12 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
||||||
endTime = until
|
endTime = until
|
||||||
}
|
}
|
||||||
|
|
||||||
withdraws, err := e.Client.NewListWithdrawsService().
|
req := e.Client.NewListWithdrawsService()
|
||||||
Asset(asset).
|
if len(asset) > 0 {
|
||||||
|
req.Asset(asset)
|
||||||
|
}
|
||||||
|
|
||||||
|
withdraws, err := req.
|
||||||
StartTime(startTime.UnixNano() / int64(time.Millisecond)).
|
StartTime(startTime.UnixNano() / int64(time.Millisecond)).
|
||||||
EndTime(endTime.UnixNano() / int64(time.Millisecond)).
|
EndTime(endTime.UnixNano() / int64(time.Millisecond)).
|
||||||
Do(ctx)
|
Do(ctx)
|
||||||
|
@ -130,8 +134,12 @@ func (e *Exchange) QueryDepositHistory(ctx context.Context, asset string, since,
|
||||||
endTime = until
|
endTime = until
|
||||||
}
|
}
|
||||||
|
|
||||||
deposits, err := e.Client.NewListDepositsService().
|
req := e.Client.NewListDepositsService()
|
||||||
Asset(asset).
|
if len(asset) > 0 {
|
||||||
|
req.Asset(asset)
|
||||||
|
}
|
||||||
|
|
||||||
|
deposits, err := req.
|
||||||
StartTime(startTime.UnixNano() / int64(time.Millisecond)).
|
StartTime(startTime.UnixNano() / int64(time.Millisecond)).
|
||||||
EndTime(endTime.UnixNano() / int64(time.Millisecond)).
|
EndTime(endTime.UnixNano() / int64(time.Millisecond)).
|
||||||
Do(ctx)
|
Do(ctx)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user