All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| withdraw | POST /withdrawals | Withdraw |
| withdrawPushOrder | POST /withdrawals/push | UID transfer |
| cancelWithdrawal | DELETE /withdrawals/{withdrawal_id} | Cancel withdrawal with specified ID |
LedgerRecord withdraw(ledgerRecord)
Withdraw
If the recipient's on-chain address is also Gate, no transaction fee will be charged
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.auth.*;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.WithdrawalApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WithdrawalApiapiInstance = newWithdrawalApi(defaultClient);
LedgerRecordledgerRecord = newLedgerRecord(); // LedgerRecord | try {
LedgerRecordresult = apiInstance.withdraw(ledgerRecord);
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling WithdrawalApi#withdraw");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ledgerRecord | LedgerRecord |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Withdrawal request accepted. Check withdrawal record status for processing result | - |
UidPushWithdrawalResp withdrawPushOrder(uidPushWithdrawal)
UID transfer
Transfers between main spot accounts. Both parties cannot be sub-accounts
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.auth.*;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.WithdrawalApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WithdrawalApiapiInstance = newWithdrawalApi(defaultClient);
UidPushWithdrawaluidPushWithdrawal = newUidPushWithdrawal(); // UidPushWithdrawal | try {
UidPushWithdrawalRespresult = apiInstance.withdrawPushOrder(uidPushWithdrawal);
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling WithdrawalApi#withdrawPushOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| uidPushWithdrawal | UidPushWithdrawal |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Request accepted. Check withdrawal record status for processing result | - |
WithdrawalsDel cancelWithdrawal(withdrawalId)
Cancel withdrawal with specified ID
// Import classes:importio.gate.gateapi.ApiClient;
importio.gate.gateapi.ApiException;
importio.gate.gateapi.Configuration;
importio.gate.gateapi.GateApiException;
importio.gate.gateapi.auth.*;
importio.gate.gateapi.models.*;
importio.gate.gateapi.api.WithdrawalApi;
publicclassExample {
publicstaticvoidmain(String[] args) {
ApiClientdefaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WithdrawalApiapiInstance = newWithdrawalApi(defaultClient);
StringwithdrawalId = "210496"; // String | try {
WithdrawalsDelresult = apiInstance.cancelWithdrawal(withdrawalId);
System.out.println(result);
} catch (GateApiExceptione) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiExceptione) {
System.err.println("Exception when calling WithdrawalApi#cancelWithdrawal");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| withdrawalId | String |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 202 | Cancellation request accepted. Check record status for cancellation result | - |