All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| createOtcQuote | POST /otc/quote | Fiat and stablecoin quote |
| createOtcOrder | POST /otc/order/create | Create fiat order |
| createStableCoinOrder | POST /otc/stable_coin/order/create | Create stablecoin order |
| getBankListInnerPath | GET /otc/bank/list | Get user bank card list |
| createOtcBank | POST /otc/bank/create | Create bank card |
| deleteOtcBank | POST /otc/bank/delete | Delete bank card |
| setDefaultOtcBank | POST /otc/bank/set_default | Set default bank card |
| getOtcBankSupplementChecklist | GET /otc/bank/bank_supplement_checklist | Query the checklist of materials to supplement for a bank card |
| submitOtcBankPersonalSupplement | POST /otc/bank/personal/bank_supplement | Submit Bank Card Supplement Materials (Personal) |
| submitOtcBankEnterpriseSupplement | POST /otc/bank/enterprise/bank_supplement | Submit Bank Card Supplement Materials (Enterprise) |
| markOtcOrderPaid | POST /otc/order/paid | Mark fiat order as paid (deposit confirmation) |
| cancelOtcOrder | POST /otc/order/cancel | Fiat order cancellation |
| listOtcOrders | GET /otc/order/list | Fiat order list |
| listStableCoinOrders | GET /otc/stable_coin/order/list | Stablecoin order list |
| getOtcOrderDetail | GET /otc/order/detail | Fiat order details |
OtcQuoteResponse createOtcQuote(otcQuoteRequest)
Fiat and stablecoin quote
Create fiat and stablecoin quotes, supporting both PAY and GET directions
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcQuoteRequestotcQuoteRequest = newOtcQuoteRequest(); // OtcQuoteRequest | try {
OtcQuoteResponseresult = apiInstance.createOtcQuote(otcQuoteRequest);
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 OtcApi#createOtcQuote");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcQuoteRequest | OtcQuoteRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Quote retrieved successfully | - |
OtcActionResponse createOtcOrder(otcOrderRequest)
Create fiat order
Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcOrderRequestotcOrderRequest = newOtcOrderRequest(); // OtcOrderRequest | try {
OtcActionResponseresult = apiInstance.createOtcOrder(otcOrderRequest);
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 OtcApi#createOtcOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcOrderRequest | OtcOrderRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order created successfully | - |
OtcStableCoinOrderCreateResponse createStableCoinOrder(otcStableCoinOrderRequest)
Create stablecoin order
Create a stablecoin order. All request body fields except `promotion_code` are required.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcStableCoinOrderRequestotcStableCoinOrderRequest = newOtcStableCoinOrderRequest(); // OtcStableCoinOrderRequest | try {
OtcStableCoinOrderCreateResponseresult = apiInstance.createStableCoinOrder(otcStableCoinOrderRequest);
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 OtcApi#createStableCoinOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcStableCoinOrderRequest | OtcStableCoinOrderRequest |
OtcStableCoinOrderCreateResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Stablecoin order created successfully | - |
OtcBankListResponse getBankListInnerPath()
Get user bank card list
List the user's bank cards for selecting a card when placing an order. Default card: use the `is_default` field in each list item (`1` indicates the default). The deprecated standalone default-bank-card endpoint is no longer required.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
try {
OtcBankListResponseresult = apiInstance.getBankListInnerPath();
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 OtcApi#getBankListInnerPath");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
OtcBankCreateResponse createOtcBank(bankAccountName, bankName, bankCountry, bankAddress, iban, swift, documentationFile, remittanceLineNumber, agentBankName, agentBankSwift)
Create bank card
Bind a bank card. Under the Global entity, an account with a non-matching name may enter manual review (`status` pending) and require subsequent supplementary materials. Corresponding Inner: `POST /bank/create`. Fields and protocol are subject to the production form/gateway; in some environments `bank_account_name` is passed Base64-encoded, see the integration notes for details.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringbankAccountName = "bankAccountName_example"; // String | StringbankName = "bankName_example"; // String | StringbankCountry = "bankCountry_example"; // String | StringbankAddress = "bankAddress_example"; // String | Stringiban = "iban_example"; // String | Stringswift = "swift_example"; // String | StringdocumentationFile = "documentationFile_example"; // String | Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment)StringremittanceLineNumber = "remittanceLineNumber_example"; // String | StringagentBankName = "agentBankName_example"; // String | StringagentBankSwift = "agentBankSwift_example"; // String | try {
OtcBankCreateResponseresult = apiInstance.createOtcBank(bankAccountName, bankName, bankCountry, bankAddress, iban, swift, documentationFile, remittanceLineNumber, agentBankName, agentBankSwift);
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 OtcApi#createOtcBank");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| bankAccountName | String | ||
| bankName | String | ||
| bankCountry | String | ||
| bankAddress | String | ||
| iban | String | ||
| swift | String | ||
| documentationFile | String | Account opening proof file content (multipart file field, binary/Base64; jpg/jpeg/png/pdf, etc.; maximum 10 MB per file, subject to the live environment) | |
| remittanceLineNumber | String | [optional] | |
| agentBankName | String | [optional] | |
| agentBankSwift | String | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Accepted successfully | - |
OtcActionResponse deleteOtcBank(otcBankIdRequest)
Delete bank card
Delete the specified bank card. Corresponds to Inner: `POST /bank/delete`.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcBankIdRequestotcBankIdRequest = newOtcBankIdRequest(); // OtcBankIdRequest | try {
OtcActionResponseresult = apiInstance.deleteOtcBank(otcBankIdRequest);
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 OtcApi#deleteOtcBank");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcBankIdRequest | OtcBankIdRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Deleted successfully | - |
OtcActionResponse setDefaultOtcBank(otcBankIdRequest)
Set default bank card
Set the specified bank card as default. Corresponds to Inner: `POST /bank/set_default`.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcBankIdRequestotcBankIdRequest = newOtcBankIdRequest(); // OtcBankIdRequest | try {
OtcActionResponseresult = apiInstance.setDefaultOtcBank(otcBankIdRequest);
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 OtcApi#setDefaultOtcBank");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcBankIdRequest | OtcBankIdRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Set successfully | - |
OtcBankSupplementChecklistResponse getOtcBankSupplementChecklist(bankId)
Query the checklist of materials to supplement for a bank card
① `bank_id` must be specified. After verifying that the card belongs to the current user and its status allows supplementary documents, the endpoint returns the required items based on the user's approved advanced verification type (personal/enterprise); each item's `description` states the submission requirements. Corresponding Inner endpoint: `GET /bank/bank_supplement_checklist`.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringbankId = "bankId_example"; // String | Bank card ID (otc_rds / the id returned by the list endpoint).try {
OtcBankSupplementChecklistResponseresult = apiInstance.getOtcBankSupplementChecklist(bankId);
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 OtcApi#getOtcBankSupplementChecklist");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| bankId | String | Bank card ID (otc_rds / the id returned by the list endpoint). |
OtcBankSupplementChecklistResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
OtcActionResponse submitOtcBankPersonalSupplement(bankId, idDocumentFront, idDocumentBack, addressProof)
Submit Bank Card Supplement Materials (Personal)
Personal professional verification (type=1) users submit non-same-person/supplementary materials. Must match `user_type=personal` returned by `GET /otc/bank/bank_supplement_checklist?bank_id=`, otherwise the request is rejected. multipart/form-data is recommended: each material item is a separate file field, with field names matching the checklist `code` (`id_document_front`, `id_document_back`, `address_proof`).
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringbankId = "bankId_example"; // String | StringidDocumentFront = "idDocumentFront_example"; // String | ID document front-side file content (multipart file field, binary/Base64)StringidDocumentBack = "idDocumentBack_example"; // String | ID document back-side file content (multipart file field, binary/Base64)StringaddressProof = "addressProof_example"; // String | Proof-of-address file content (multipart file field, binary/Base64)try {
OtcActionResponseresult = apiInstance.submitOtcBankPersonalSupplement(bankId, idDocumentFront, idDocumentBack, addressProof);
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 OtcApi#submitOtcBankPersonalSupplement");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| bankId | String | ||
| idDocumentFront | String | ID document front-side file content (multipart file field, binary/Base64) | |
| idDocumentBack | String | ID document back-side file content (multipart file field, binary/Base64) | |
| addressProof | String | Proof-of-address file content (multipart file field, binary/Base64) |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Accepted successfully | - |
OtcActionResponse submitOtcBankEnterpriseSupplement(bankId, certificate, shareHolders, passport, shareHoldingStructure, uid, fundsStatement, additional)
Submit Bank Card Supplement Materials (Enterprise)
Enterprise professional verification (type=2) users submit supplementary materials. Must match `user_type=enterprise` returned by the checklist. multipart file field names: `certificate`, `share_holders`, `passport`, `share_holding_structure`.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringbankId = "bankId_example"; // String | Stringcertificate = "certificate_example"; // String | Business license / registration certificate file content (multipart file field, binary/Base64)StringshareHolders = "shareHolders_example"; // String | Register of shareholders file content (multipart file field, binary/Base64)Stringpassport = "passport_example"; // String | Legal representative / shareholder passport file content (multipart file field, binary/Base64)StringshareHoldingStructure = "shareHoldingStructure_example"; // String | Ownership structure chart file content (multipart file field, binary/Base64)Stringuid = "uid_example"; // String | StringfundsStatement = "fundsStatement_example"; // String | Proof-of-funds file content (multipart file field, binary/Base64, optional)Stringadditional = "additional_example"; // String | Other supplementary material file content (multipart file field, binary/Base64, optional)try {
OtcActionResponseresult = apiInstance.submitOtcBankEnterpriseSupplement(bankId, certificate, shareHolders, passport, shareHoldingStructure, uid, fundsStatement, additional);
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 OtcApi#submitOtcBankEnterpriseSupplement");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| bankId | String | ||
| certificate | String | Business license / registration certificate file content (multipart file field, binary/Base64) | |
| shareHolders | String | Register of shareholders file content (multipart file field, binary/Base64) | |
| passport | String | Legal representative / shareholder passport file content (multipart file field, binary/Base64) | |
| shareHoldingStructure | String | Ownership structure chart file content (multipart file field, binary/Base64) | |
| uid | String | [optional] | |
| fundsStatement | String | Proof-of-funds file content (multipart file field, binary/Base64, optional) | [optional] |
| additional | String | Other supplementary material file content (multipart file field, binary/Base64, optional) | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Accepted successfully | - |
OtcActionResponse markOtcOrderPaid(otcMarkOrderPaidRequest)
Mark fiat order as paid (deposit confirmation)
Mark a fiat BUY order as paid (deposit confirmation). A user payment receipt must be uploaded: `payment_receipt_file_key` is required; supported formats are jpg/jpeg/png/pdf, with a maximum size of 10 MB per file (validated jointly by the service and gateway). The compatibility field name `payment_receipt` is subject to the gateway/live environment. The persisted field is `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (commonly associated by `client_order_id`); the Inner path corresponding to this OpenAPI endpoint, `POST /order/paid`, still primarily uses `order_id`. If the gateway standardizes on the merchant order ID, follow the gateway documentation.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
OtcMarkOrderPaidRequestotcMarkOrderPaidRequest = newOtcMarkOrderPaidRequest(); // OtcMarkOrderPaidRequest | try {
OtcActionResponseresult = apiInstance.markOtcOrderPaid(otcMarkOrderPaidRequest);
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 OtcApi#markOtcOrderPaid");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcMarkOrderPaidRequest | OtcMarkOrderPaidRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The order has been marked as paid | - |
OtcActionResponse cancelOtcOrder(orderId)
Fiat order cancellation
Cancel fiat order
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringorderId = "orderId_example"; // String | Order IDtry {
OtcActionResponseresult = apiInstance.cancelOtcOrder(orderId);
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 OtcApi#cancelOtcOrder");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | String | Order ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Order cancelled successfully | - |
OtcOrderListResponse listOtcOrders().type(type).fiatCurrency(fiatCurrency).cryptoCurrency(cryptoCurrency).startTime(startTime).endTime(endTime).status(status).pn(pn).ps(ps).execute();
Fiat order list
Query the fiat order list with filters such as type, currency, time range, and status
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
Stringtype = "type_example"; // String | BUY for on-ramp, SELL for off-rampStringfiatCurrency = "fiatCurrency_example"; // String | Fiat currencyStringcryptoCurrency = "cryptoCurrency_example"; // String | Digital currencyStringstartTime = "startTime_example"; // String | starttime for example : 2025-09-09StringendTime = "endTime_example"; // String | endtime for example :2025-09-09Stringstatus = "status_example"; // String | DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursedStringpn = "pn_example"; // String | Page numberStringps = "ps_example"; // String | Number of items per pagetry {
OtcOrderListResponseresult = apiInstance.listOtcOrders()
.type(type)
.fiatCurrency(fiatCurrency)
.cryptoCurrency(cryptoCurrency)
.startTime(startTime)
.endTime(endTime)
.status(status)
.pn(pn)
.ps(ps)
.execute();
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 OtcApi#listOtcOrders");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| type | String | BUY for on-ramp, SELL for off-ramp | [optional] |
| fiatCurrency | String | Fiat currency | [optional] |
| cryptoCurrency | String | Digital currency | [optional] |
| startTime | String | starttime for example : 2025-09-09 | [optional] |
| endTime | String | endtime for example :2025-09-09 | [optional] |
| status | String | DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed | [optional] |
| pn | String | Page number | [optional] |
| ps | String | Number of items per page | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
OtcStableCoinOrderListResponse listStableCoinOrders().pageSize(pageSize).pageNumber(pageNumber).coinName(coinName).startTime(startTime).endTime(endTime).status(status).execute();
Stablecoin order list
Query stablecoin order list with filtering by currency, time range, status, etc.
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringpageSize = "10"; // String | Number of records per pageStringpageNumber = "1"; // String | Page numberStringcoinName = "USDT"; // String | ordercurrencyStringstartTime = "startTime_example"; // String | Start TimeStringendTime = "endTime_example"; // String | End timeStringstatus = "status_example"; // String | Status: PROCESSING: in progress / DONE:completed / FAILED: failedtry {
OtcStableCoinOrderListResponseresult = apiInstance.listStableCoinOrders()
.pageSize(pageSize)
.pageNumber(pageNumber)
.coinName(coinName)
.startTime(startTime)
.endTime(endTime)
.status(status)
.execute();
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 OtcApi#listStableCoinOrders");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| pageSize | String | Number of records per page | [optional] |
| pageNumber | String | Page number | [optional] |
| coinName | String | ordercurrency | [optional] |
| startTime | String | Start Time | [optional] |
| endTime | String | End time | [optional] |
| status | String | Status: PROCESSING: in progress / DONE:completed / FAILED: failed | [optional] |
OtcStableCoinOrderListResponse
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |
OtcOrderDetailResponse getOtcOrderDetail(orderId)
Fiat order details
Query fiat order details
// 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.OtcApi;
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");
OtcApiapiInstance = newOtcApi(defaultClient);
StringorderId = "orderId_example"; // String | Order IDtry {
OtcOrderDetailResponseresult = apiInstance.getOtcOrderDetail(orderId);
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 OtcApi#getOtcOrderDetail");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | String | Order ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Query successful | - |