diff --git a/v2/withdraw_service.go b/v2/withdraw_service.go index e911a649..187c83ad 100644 --- a/v2/withdraw_service.go +++ b/v2/withdraw_service.go @@ -117,13 +117,14 @@ type CreateWithdrawResponse struct { // // See https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data type ListWithdrawsService struct { - c *Client - coin *string - status *int - startTime *int64 - endTime *int64 - offset *int - limit *int + c *Client + coin *string + withdrawOrderId *string + status *int + startTime *int64 + endTime *int64 + offset *int + limit *int } // Coin sets the coin parameter. @@ -132,6 +133,12 @@ func (s *ListWithdrawsService) Coin(coin string) *ListWithdrawsService { return s } +// WithdrawOrderId sets the withdrawOrderId parameter. +func (s *ListWithdrawsService) WithdrawOrderId(withdrawOrderId string) *ListWithdrawsService { + s.withdrawOrderId = &withdrawOrderId + return s +} + // Status sets the status parameter. func (s *ListWithdrawsService) Status(status int) *ListWithdrawsService { s.status = &status @@ -174,6 +181,9 @@ func (s *ListWithdrawsService) Do(ctx context.Context) (res []*Withdraw, err err if s.coin != nil { r.setParam("coin", *s.coin) } + if s.withdrawOrderId != nil { + r.setParam("withdrawOrderId", *s.withdrawOrderId) + } if s.status != nil { r.setParam("status", *s.status) } @@ -208,10 +218,11 @@ type Withdraw struct { ApplyTime string `json:"applyTime"` Coin string `json:"coin"` ID string `json:"id"` - WithdrawOrderID string `json:"withdrawOrderID"` + WithdrawOrderID string `json:"withdrawOrderId"` Network string `json:"network"` TransferType int `json:"transferType"` Status int `json:"status"` TransactionFee string `json:"transactionFee"` + Info string `json:"info"` TxID string `json:"txId"` }