mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
max: update deposit and withdraw types
This commit is contained in:
parent
3f0290479b
commit
be672c89e6
|
@ -14,6 +14,7 @@ import (
|
|||
"github.com/sirupsen/logrus"
|
||||
"golang.org/x/time/rate"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/datatype"
|
||||
maxapi "github.com/c9s/bbgo/pkg/exchange/max/maxapi"
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
|
@ -456,7 +457,8 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
|||
|
||||
txIDs[d.TxID] = struct{}{}
|
||||
allWithdraws = append(allWithdraws, types.Withdraw{
|
||||
ApplyTime: time.Unix(d.CreatedAt, 0),
|
||||
Exchange: types.ExchangeMax,
|
||||
ApplyTime: datatype.Time(time.Unix(d.CreatedAt, 0)),
|
||||
Asset: toGlobalCurrency(d.Currency),
|
||||
Amount: util.MustParseFloat(d.Amount),
|
||||
Address: "",
|
||||
|
@ -505,13 +507,14 @@ func (e *Exchange) QueryDepositHistory(ctx context.Context, asset string, since,
|
|||
}
|
||||
|
||||
allDeposits = append(allDeposits, types.Deposit{
|
||||
Time: time.Unix(d.CreatedAt, 0),
|
||||
Amount: util.MustParseFloat(d.Amount),
|
||||
Asset: toGlobalCurrency(d.Currency),
|
||||
Address: "", // not supported
|
||||
AddressTag: "", // not supported
|
||||
TransactionID: d.TxID,
|
||||
Status: toGlobalDepositStatus(d.State),
|
||||
Exchange: types.ExchangeMax,
|
||||
Time: datatype.Time(time.Unix(d.CreatedAt, 0)),
|
||||
Amount: util.MustParseFloat(d.Amount),
|
||||
Asset: toGlobalCurrency(d.Currency),
|
||||
Address: "", // not supported
|
||||
AddressTag: "", // not supported
|
||||
TransactionID: d.TxID,
|
||||
Status: toGlobalDepositStatus(d.State),
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user