Skip to content

Commit

Permalink
Merge pull request #1694 from c9s/c9s/max/fix-withdrawal-query-api
Browse files Browse the repository at this point in the history
FIX: [max] fix max withdrawal api parameters
  • Loading branch information
c9s authored Aug 16, 2024
2 parents a916859 + 4154cc9 commit 7488a10
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
3 changes: 1 addition & 2 deletions pkg/exchange/max/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -845,8 +845,7 @@ func (e *Exchange) QueryWithdrawHistory(
}

withdraws, err := req.
From(startTime).
To(endTime).
Timestamp(startTime).
Limit(limit).
Do(ctx)

Expand Down
14 changes: 9 additions & 5 deletions pkg/exchange/max/maxapi/account.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,15 @@ type Withdraw struct {
type GetWithdrawHistoryRequest struct {
client requestgen.AuthenticatedAPIClient

currency *string `param:"currency"`
state *string `param:"state"` // submitting, submitted, rejected, accepted, checking, refunded, canceled, suspect
from *time.Time `param:"from,seconds"` // seconds
to *time.Time `param:"to,seconds"` // seconds
limit *int `param:"limit"`
currency *string `param:"currency"`
state *string `param:"state"` // submitting, submitted, rejected, accepted, checking, refunded, canceled, suspect
timestamp *time.Time `param:"timestamp,milliseconds"` // milli-seconds

// order could be desc or asc
order *string `param:"order"`

// limit's default = 50
limit *int `param:"limit"`
}

func (c *RestClient) NewGetWithdrawalHistoryRequest() *GetWithdrawHistoryRequest {
Expand Down
31 changes: 15 additions & 16 deletions pkg/exchange/max/maxapi/get_withdraw_history_request_requestgen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7488a10

Please sign in to comment.