-
-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
okx: implement QueryDepositHistory method
- Loading branch information
Showing
4 changed files
with
366 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
pkg/exchange/okex/okexapi/get_asset_deposit_history_request.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package okexapi | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/c9s/requestgen" | ||
|
||
"github.com/c9s/bbgo/pkg/fixedpoint" | ||
"github.com/c9s/bbgo/pkg/types" | ||
) | ||
|
||
//go:generate -command GetRequest requestgen -method GET -responseType .APIResponse -responseDataField Data | ||
//go:generate -command PostRequest requestgen -method POST -responseType .APIResponse -responseDataField Data | ||
|
||
type DepositRecord struct { | ||
ActualDepBlkConfirm types.StrInt64 `json:"actualDepBlkConfirm"` | ||
Amount fixedpoint.Value `json:"amt"` | ||
AreaCodeFrom string `json:"areaCodeFrom"` | ||
Currency string `json:"ccy"` | ||
Chain string `json:"chain"` | ||
DepId string `json:"depId"` | ||
From string `json:"from"` | ||
FromWdId string `json:"fromWdId"` | ||
State types.StrInt64 `json:"state"` | ||
To string `json:"to"` | ||
|
||
Ts types.MillisecondTimestamp `json:"ts"` | ||
|
||
TxId string `json:"txId"` | ||
} | ||
|
||
//go:generate GetRequest -url "/api/v5/asset/deposit-history" -type GetAssetDepositHistoryRequest -responseDataType []DepositRecord | ||
type GetAssetDepositHistoryRequest struct { | ||
client requestgen.AuthenticatedAPIClient | ||
|
||
currency *string `param:"ccy"` | ||
after *time.Time `param:"after,milliseconds"` | ||
before *time.Time `param:"before,milliseconds"` | ||
limit *uint64 `param:"limit" defaultValue:"100"` | ||
} | ||
|
||
func (c *RestClient) NewGetAssetDepositHistoryRequest() *GetAssetDepositHistoryRequest { | ||
return &GetAssetDepositHistoryRequest{ | ||
client: c, | ||
} | ||
} |
230 changes: 230 additions & 0 deletions
230
pkg/exchange/okex/okexapi/get_asset_deposit_history_request_requestgen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.