mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
max: replace time type fields
This commit is contained in:
parent
d95daba3f0
commit
4944fdda2d
|
@ -690,7 +690,7 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
|||
txIDs[d.TxID] = struct{}{}
|
||||
withdraw := types.Withdraw{
|
||||
Exchange: types.ExchangeMax,
|
||||
ApplyTime: types.Time(time.Unix(d.CreatedAt, 0)),
|
||||
ApplyTime: types.Time(d.CreatedAt),
|
||||
Asset: toGlobalCurrency(d.Currency),
|
||||
Amount: d.Amount,
|
||||
Address: "",
|
||||
|
@ -710,7 +710,7 @@ func (e *Exchange) QueryWithdrawHistory(ctx context.Context, asset string, since
|
|||
startTime = endTime
|
||||
} else {
|
||||
// its in descending order, so we get the first record
|
||||
startTime = time.Unix(withdraws[0].CreatedAt, 0)
|
||||
startTime = withdraws[0].CreatedAt.Time()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/c9s/requestgen"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/fixedpoint"
|
||||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
type AccountService struct {
|
||||
|
@ -147,11 +148,11 @@ type Withdraw struct {
|
|||
// "failed", "pending", "confirmed",
|
||||
// "kgi_manually_processing", "kgi_manually_confirmed", "kgi_possible_failed",
|
||||
// "sygna_verifying"
|
||||
State string `json:"state"`
|
||||
Confirmations int `json:"confirmations"`
|
||||
CreatedAt int64 `json:"created_at"`
|
||||
UpdatedAt int64 `json:"updated_at"`
|
||||
Notes string `json:"notes"`
|
||||
State string `json:"state"`
|
||||
Confirmations int `json:"confirmations"`
|
||||
CreatedAt types.MillisecondTimestamp `json:"created_at"`
|
||||
UpdatedAt types.MillisecondTimestamp `json:"updated_at"`
|
||||
Notes string `json:"notes"`
|
||||
}
|
||||
|
||||
//go:generate GetRequest -url "v2/withdrawals" -type GetWithdrawHistoryRequest -responseType []Withdraw
|
||||
|
|
Loading…
Reference in New Issue
Block a user