Skip to content

Latest commit

 

History

History
77 lines (57 loc) · 2.27 KB

File metadata and controls

77 lines (57 loc) · 2.27 KB

WithdrawalApi

All URIs are relative to https://api.gateio.ws/api/v4

Method HTTP request Description
withdraw POST /withdrawals Withdraw

withdraw

LedgerRecord withdraw(ledgerRecord)

Withdraw

Example

// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.WithdrawalApi;

public class Example {
    public static void main(String[] args) {
        ApiClient defaultClient = Configuration.getDefaultApiClient();
        defaultClient.setBasePath("https://api.gateio.ws/api/v4");
        
        // Configure APIv4 authorization: apiv4
        defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");

        WithdrawalApi apiInstance = new WithdrawalApi(defaultClient);
        LedgerRecord ledgerRecord = new LedgerRecord(); // LedgerRecord | 
        try {
            LedgerRecord result = apiInstance.withdraw(ledgerRecord);
            System.out.println(result);
        } catch (GateApiException e) {
            System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
            e.printStackTrace();
        } catch (ApiException e) {
            System.err.println("Exception when calling WithdrawalApi#withdraw");
            System.err.println("Status code: " + e.getCode());
            System.err.println("Response headers: " + e.getResponseHeaders());
            e.printStackTrace();
        }
    }
}

Parameters

Name Type Description Notes
ledgerRecord LedgerRecord

Return type

LedgerRecord

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
202 Withdraw request is accepted. Refer to withdrawal records for status -