mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 16:25:16 +00:00
max: group the request building statement
This commit is contained in:
parent
d5fe13272e
commit
3cfc810f8d
|
@ -24,6 +24,7 @@ var log = logrus.WithField("exchange", "max")
|
|||
|
||||
func init() {
|
||||
_ = types.ExchangeTradeHistoryService(&Exchange{})
|
||||
|
||||
}
|
||||
|
||||
type Exchange struct {
|
||||
|
@ -290,13 +291,14 @@ func (e *Exchange) queryClosedOrdersByLastOrderID(
|
|||
walletType = maxapi.WalletTypeMargin
|
||||
}
|
||||
|
||||
req := e.v3client.NewGetWalletOrderHistoryRequest(walletType).Market(market)
|
||||
if lastOrderID == 0 {
|
||||
lastOrderID = 1
|
||||
}
|
||||
|
||||
req.FromID(lastOrderID)
|
||||
req.Limit(1000)
|
||||
req := e.v3client.NewGetWalletOrderHistoryRequest(walletType).
|
||||
Market(market).
|
||||
FromID(lastOrderID).
|
||||
Limit(1000)
|
||||
|
||||
maxOrders, err := req.Do(ctx)
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue
Block a user