mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-23 15:25:14 +00:00
max: group the request building statement
This commit is contained in:
parent
a7dcc39c22
commit
ddaa8f7343
|
@ -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