binance: update withdraw and deposit types

This commit is contained in:
c9s 2021-03-14 11:01:40 +08:00
parent ac45bb306a
commit 3f0290479b

View File

@ -14,6 +14,7 @@ import (
"github.com/sirupsen/logrus"
"github.com/c9s/bbgo/pkg/datatype"
"github.com/c9s/bbgo/pkg/fixedpoint"
"github.com/c9s/bbgo/pkg/types"
"github.com/c9s/bbgo/pkg/util"
@ -247,7 +248,8 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
txIDs[d.TxID] = struct{}{}
allWithdraws = append(allWithdraws, types.Withdraw{
ApplyTime: time.Unix(0, d.ApplyTime*int64(time.Millisecond)),
Exchange: types.ExchangeBinance,
ApplyTime: datatype.Time(time.Unix(0, d.ApplyTime*int64(time.Millisecond))),
Asset: d.Asset,
Amount: d.Amount,
Address: d.Address,
@ -311,7 +313,8 @@ func (e *Exchange) QueryDepositHistory(ctx context.Context, asset string, since,
txIDs[d.TxID] = struct{}{}
allDeposits = append(allDeposits, types.Deposit{
Time: time.Unix(0, d.InsertTime*int64(time.Millisecond)),
Exchange: types.ExchangeBinance,
Time: datatype.Time(time.Unix(0, d.InsertTime*int64(time.Millisecond))),
Asset: d.Asset,
Amount: d.Amount,
Address: d.Address,