[go: up one dir, main page]

Skip to content

Commit

Permalink
apiv4 supports wallets and withdrawals
Browse files Browse the repository at this point in the history
  • Loading branch information
revilwang committed Jun 16, 2020
1 parent acf3131 commit 9ac98d7
Show file tree
Hide file tree
Showing 21 changed files with 774 additions and 18 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ but will not receive any future API upgrade support
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 4.12.0
- Package version: 4.12.0
- API version: 4.13.0
- Package version: 4.13.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)

Expand Down Expand Up @@ -134,8 +134,12 @@ Class | Method | HTTP request | Description
*SpotApi* | [**ListSpotAccounts**](docs/SpotApi.md#listspotaccounts) | **Get** /spot/accounts | List spot accounts
*SpotApi* | [**ListTickers**](docs/SpotApi.md#listtickers) | **Get** /spot/tickers | Retrieve ticker information
*SpotApi* | [**ListTrades**](docs/SpotApi.md#listtrades) | **Get** /spot/trades | Retrieve market trades
*WalletApi* | [**GetDepositAddress**](docs/WalletApi.md#getdepositaddress) | **Get** /wallet/deposit_address | Generate currency deposit address
*WalletApi* | [**ListDeposits**](docs/WalletApi.md#listdeposits) | **Get** /wallet/deposits | Retrieve deposit records. Time range cannot exceed 30 days
*WalletApi* | [**ListWithdrawals**](docs/WalletApi.md#listwithdrawals) | **Get** /wallet/withdrawals | Retrieve withdrawal records. Time range cannot exceed 30 days
*WalletApi* | [**Transfer**](docs/WalletApi.md#transfer) | **Post** /wallet/transfers | Transfer between accounts
*WalletApi* | [**TransferWithSubAccount**](docs/WalletApi.md#transferwithsubaccount) | **Post** /wallet/sub_account_transfers | Transfer between main and sub accounts
*WithdrawalApi* | [**Withdraw**](docs/WithdrawalApi.md#withdraw) | **Post** /withdrawals | Withdraw


## Documentation For Models
Expand All @@ -145,6 +149,7 @@ Class | Method | HTTP request | Description
- [CancelOrderResult](docs/CancelOrderResult.md)
- [Contract](docs/Contract.md)
- [CurrencyPair](docs/CurrencyPair.md)
- [DepositAddress](docs/DepositAddress.md)
- [FundingAccount](docs/FundingAccount.md)
- [FundingBookItem](docs/FundingBookItem.md)
- [FundingRateRecord](docs/FundingRateRecord.md)
Expand All @@ -161,6 +166,7 @@ Class | Method | HTTP request | Description
- [FuturesTicker](docs/FuturesTicker.md)
- [FuturesTrade](docs/FuturesTrade.md)
- [InsuranceRecord](docs/InsuranceRecord.md)
- [LedgerRecord](docs/LedgerRecord.md)
- [Loan](docs/Loan.md)
- [LoanPatch](docs/LoanPatch.md)
- [LoanRecord](docs/LoanRecord.md)
Expand Down
20 changes: 20 additions & 0 deletions api_futures.go
Original file line number Diff line number Diff line change
Expand Up @@ -769,15 +769,19 @@ FuturesApiService List personal trading history
* @param "Contract" (optional.String) - Futures contract, return related data only if specified
* @param "Order" (optional.Int32) - Futures order ID, return related data only if specified
* @param "Limit" (optional.Int32) - Maximum number of record returned in one list
* @param "Offset" (optional.Int32) - List offset, starting from 0
* @param "LastId" (optional.String) - Specify list staring point using the `id` of last record in previous list-query results
* @param "CountTotal" (optional.Int32) - Whether to return total number matched. Default to 0(no return)
@return []MyFuturesTrade
*/

type GetMyTradesOpts struct {
Contract optional.String
Order optional.Int32
Limit optional.Int32
Offset optional.Int32
LastId optional.String
CountTotal optional.Int32
}

func (a *FuturesApiService) GetMyTrades(ctx context.Context, settle string, localVarOptionals *GetMyTradesOpts) ([]MyFuturesTrade, *http.Response, error) {
Expand Down Expand Up @@ -807,9 +811,15 @@ func (a *FuturesApiService) GetMyTrades(ctx context.Context, settle string, loca
if localVarOptionals != nil && localVarOptionals.Limit.IsSet() {
localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Offset.IsSet() {
localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.LastId.IsSet() {
localVarQueryParams.Add("last_id", parameterToString(localVarOptionals.LastId.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.CountTotal.IsSet() {
localVarQueryParams.Add("count_total", parameterToString(localVarOptionals.CountTotal.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}

Expand Down Expand Up @@ -1772,13 +1782,17 @@ Zero-fill order cannot be retrieved 60 seconds after cancellation
* @param status List orders based on status
* @param optional nil or *ListFuturesOrdersOpts - Optional Parameters:
* @param "Limit" (optional.Int32) - Maximum number of record returned in one list
* @param "Offset" (optional.Int32) - List offset, starting from 0
* @param "LastId" (optional.String) - Specify list staring point using the `id` of last record in previous list-query results
* @param "CountTotal" (optional.Int32) - Whether to return total number matched. Default to 0(no return)
@return []FuturesOrder
*/

type ListFuturesOrdersOpts struct {
Limit optional.Int32
Offset optional.Int32
LastId optional.String
CountTotal optional.Int32
}

func (a *FuturesApiService) ListFuturesOrders(ctx context.Context, settle string, contract string, status string, localVarOptionals *ListFuturesOrdersOpts) ([]FuturesOrder, *http.Response, error) {
Expand All @@ -1804,9 +1818,15 @@ func (a *FuturesApiService) ListFuturesOrders(ctx context.Context, settle string
if localVarOptionals != nil && localVarOptionals.Limit.IsSet() {
localVarQueryParams.Add("limit", parameterToString(localVarOptionals.Limit.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.Offset.IsSet() {
localVarQueryParams.Add("offset", parameterToString(localVarOptionals.Offset.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.LastId.IsSet() {
localVarQueryParams.Add("last_id", parameterToString(localVarOptionals.LastId.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.CountTotal.IsSet() {
localVarQueryParams.Add("count_total", parameterToString(localVarOptionals.CountTotal.Value(), ""))
}
// to determine the Content-Type header
localVarHttpContentTypes := []string{}

Expand Down
Loading

0 comments on commit 9ac98d7

Please sign in to comment.