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) |
| createOtcUploadPreUpload | POST /otc/upload/pre_upload | Pre-upload file (temporary bucket) |
| 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcQuoteRequest otcQuoteRequest = new OtcQuoteRequest(); // OtcQuoteRequest |
try {
OtcQuoteResponse result = apiInstance.createOtcQuote(otcQuoteRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcOrderRequest otcOrderRequest = new OtcOrderRequest(); // OtcOrderRequest |
try {
OtcActionResponse result = apiInstance.createOtcOrder(otcOrderRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcStableCoinOrderRequest otcStableCoinOrderRequest = new OtcStableCoinOrderRequest(); // OtcStableCoinOrderRequest |
try {
OtcStableCoinOrderCreateResponse result = apiInstance.createStableCoinOrder(otcStableCoinOrderRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
try {
OtcBankListResponse result = apiInstance.getBankListInnerPath();
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 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, remittanceLineNumber, agentBankName, agentBankSwift, documentationFile, documentationFileKey, fileType)
Create bank card
Bind a bank card. Under the Global entity, non-same-name accounts may enter manual review (`status` pending) and require supplementary materials later. Corresponds to Inner: `POST /bank/create`. Fields and protocol follow the live form/gateway; `bank_account_name` may be Base64-encoded in some environments—see integration notes. Account-opening proof supports two methods (choose one): 1. Pre-upload (recommended): call `POST /otc/upload/pre_upload` (`scene=bank`) to obtain a temporary-bucket Policy and upload directly to S3, then pass `documentation_file_key` + `file_type` in this endpoint; 2. Multipart direct upload: pass the `documentation_file` file field; the server writes directly to the production bucket. When using pre-upload, the server validates object existence and that the uid in the `file_key` path matches the caller; after validation, the object is moved to the production bucket and persisted. Cross-user references return `Invalid parameters file_key`; incomplete direct upload returns `Invalid parameters file not uploaded`.
// 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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String bankAccountName = "bankAccountName_example"; // String |
String bankName = "bankName_example"; // String |
String bankCountry = "bankCountry_example"; // String |
String bankAddress = "bankAddress_example"; // String |
String iban = "iban_example"; // String |
String swift = "swift_example"; // String |
String remittanceLineNumber = "remittanceLineNumber_example"; // String |
String agentBankName = "agentBankName_example"; // String |
String agentBankSwift = "agentBankSwift_example"; // String |
String documentationFile = "documentationFile_example"; // String | Multipart direct upload; mutually exclusive with documentation_file_key
String documentationFileKey = "documentationFileKey_example"; // String | Pre-upload mode; file_key returned by pre_upload (plaintext or base64 accepted)
String fileType = "fileType_example"; // String | Required when using documentation_file_key; plaintext MIME or its base64
try {
OtcBankCreateResponse result = apiInstance.createOtcBank(bankAccountName, bankName, bankCountry, bankAddress, iban, swift, remittanceLineNumber, agentBankName, agentBankSwift, documentationFile, documentationFileKey, fileType);
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 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 | ||
| remittanceLineNumber | String | [optional] | |
| agentBankName | String | [optional] | |
| agentBankSwift | String | [optional] | |
| documentationFile | String | Multipart direct upload; mutually exclusive with documentation_file_key | [optional] |
| documentationFileKey | String | Pre-upload mode; file_key returned by pre_upload (plaintext or base64 accepted) | [optional] |
| fileType | String | Required when using documentation_file_key; plaintext MIME or its base64 | [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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcBankIdRequest otcBankIdRequest = new OtcBankIdRequest(); // OtcBankIdRequest |
try {
OtcActionResponse result = apiInstance.deleteOtcBank(otcBankIdRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcBankIdRequest otcBankIdRequest = new OtcBankIdRequest(); // OtcBankIdRequest |
try {
OtcActionResponse result = apiInstance.setDefaultOtcBank(otcBankIdRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String bankId = "bankId_example"; // String | Bank card ID (otc_rds / the id returned by the list endpoint).
try {
OtcBankSupplementChecklistResponse result = apiInstance.getOtcBankSupplementChecklist(bankId);
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 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, relationshipProof)
Submit Bank Card Supplement Materials (Personal)
Personal professional verification (type=1) users submit non-same-person/supplementary materials. Must match `user_type=personal` from `GET /otc/bank/bank_supplement_checklist?bank_id=`; otherwise rejected. Two submission methods (can be mixed): 1. Pre-upload (recommended): call `POST /otc/upload/pre_upload` (`scene=bank`) to upload to the temporary bucket, then fill file items by category in the `relationship_proof` JSON; pass `key` as plaintext object path (`base64_decode(pre_upload.file_key)`, e.g. `otc_temp/{uid}/bank/xxx.png`), and `file_type` as plaintext MIME; the server base64-encodes before persistence—do not pass base64 `file_key` directly; 2. Multipart direct upload: one file field per material item; field names match checklist `code` (`id_document_front`, `id_document_back`, `address_proof`).
// 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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String bankId = "bankId_example"; // String |
String idDocumentFront = "idDocumentFront_example"; // String | ID document front-side file content (multipart file field, binary/Base64)
String idDocumentBack = "idDocumentBack_example"; // String | ID document back-side file content (multipart file field, binary/Base64)
String addressProof = "addressProof_example"; // String | Proof-of-address file content (multipart file field, binary/Base64)
String relationshipProof = "relationshipProof_example"; // String | Optional. JSON string of relationship_proof.
try {
OtcActionResponse result = apiInstance.submitOtcBankPersonalSupplement(bankId, idDocumentFront, idDocumentBack, addressProof, relationshipProof);
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 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) | [optional] |
| idDocumentBack | String | ID document back-side file content (multipart file field, binary/Base64) | [optional] |
| addressProof | String | Proof-of-address file content (multipart file field, binary/Base64) | [optional] |
| relationshipProof | String | Optional. JSON string of relationship_proof. | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Accepted successfully | - |
OtcActionResponse submitOtcBankEnterpriseSupplement(bankId, uid, certificate, shareHolders, passport, shareHoldingStructure, fundsStatement, additional, relationshipProof)
Submit Bank Card Supplement Materials (Enterprise)
Enterprise professional verification (type=2) users submit supplementary materials. Must match `user_type=enterprise` from the checklist. Two submission methods (can be mixed): 1. Pre-upload (recommended): call `POST /otc/upload/pre_upload` (`scene=bank`), fill file items by category in `relationship_proof`; pass `key` as plaintext object path (`base64_decode(pre_upload.file_key)`), and `file_type` as plaintext MIME; 2. Multipart direct upload: file field names `certificate`, `share_holders`, `passport`, `share_holding_structure`; optional `funds_statement`, `additional`.
// 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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String bankId = "bankId_example"; // String |
String uid = "uid_example"; // String |
String certificate = "certificate_example"; // String | Business license / registration certificate file content (multipart file field, binary/Base64)
String shareHolders = "shareHolders_example"; // String | Register of shareholders file content (multipart file field, binary/Base64)
String passport = "passport_example"; // String | Legal representative / shareholder passport file content (multipart file field, binary/Base64)
String shareHoldingStructure = "shareHoldingStructure_example"; // String | Ownership structure chart file content (multipart file field, binary/Base64)
String fundsStatement = "fundsStatement_example"; // String | Proof-of-funds file content (multipart file field, binary/Base64, optional)
String additional = "additional_example"; // String | Other supplementary material file content (multipart file field, binary/Base64, optional)
String relationshipProof = "relationshipProof_example"; // String | Optional. JSON string of relationship_proof.
try {
OtcActionResponse result = apiInstance.submitOtcBankEnterpriseSupplement(bankId, uid, certificate, shareHolders, passport, shareHoldingStructure, fundsStatement, additional, relationshipProof);
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 OtcApi#submitOtcBankEnterpriseSupplement");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| bankId | String | ||
| uid | String | [optional] | |
| certificate | String | Business license / registration certificate file content (multipart file field, binary/Base64) | [optional] |
| shareHolders | String | Register of shareholders file content (multipart file field, binary/Base64) | [optional] |
| passport | String | Legal representative / shareholder passport file content (multipart file field, binary/Base64) | [optional] |
| shareHoldingStructure | String | Ownership structure chart file content (multipart file field, binary/Base64) | [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] |
| relationshipProof | String | Optional. JSON string of relationship_proof. | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Accepted successfully | - |
OtcUploadPreUploadResponse createOtcUploadPreUpload(otcUploadPreUploadRequest)
Pre-upload file (temporary bucket)
After selecting a file, the client calls this endpoint first to obtain a temporary-bucket POST Policy and `file_key`; then upload directly to S3 using the returned `url` and `fields` (success HTTP 204); finally, in business submit endpoints (e.g. `POST /otc/order/paid`, `POST /otc/bank/create`), pass the same base64 `file_key` unchanged (do not decode). The server validates ownership and object existence, then moves to the production bucket and persists. Unsubmitted files remain in the temporary bucket and are reclaimed by lifecycle rules. Corresponds to Inner: `POST /upload/pre_upload`. `content_type` must be sent as base64 (plaintext containing `/` may be blocked by the gateway). Only the following MIME types are supported: | MIME | base64 | Extension | | --- | --- | --- | | image/png | aW1hZ2UvcG5n | .png | | image/jpeg | aW1hZ2UvanBlZw== | .jpeg | | image/jpg | aW1hZ2UvanBn | .jpg | | application/pdf | YXBwbGljYXRpb24vcGRm | .pdf | `scene` mapping to downstream endpoints: | scene | Typical use | | --- | --- | | general | Fiat buy payment receipt (`payment_receipt_file_key` in `POST /otc/order/paid`) | | bank | Add card, bank card supplementary materials | | assessment | Professional verification materials | | credit | Credit limit increase materials | Credential validity: response `expires_in` is 5400 seconds (90 minutes); `fields.Policy` `expiration` matches it. Complete the S3 direct upload within this window; after expiry, call this endpoint again for a new credential. File size: the S3 POST Policy enforces `content-length-range` 1 byte ~ 10MB (10485760 bytes). Uploads exceeding the limit are rejected by S3; all `scene` values share this limit. Direct S3 upload: `url` is the upload address; send each key-value pair in `fields` unchanged as form-data; the `file` field must be last. Object path is generated as `otc_temp/{uid}/{scene}/{unique filename}`; uid is taken from the login session. This endpoint returns `content type is required.` when `content_type` is missing. Ownership and object-existence checks for `file_key` are performed by the subsequent business submission endpoint.
// 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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcUploadPreUploadRequest otcUploadPreUploadRequest = new OtcUploadPreUploadRequest(); // OtcUploadPreUploadRequest |
try {
OtcUploadPreUploadResponse result = apiInstance.createOtcUploadPreUpload(otcUploadPreUploadRequest);
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 OtcApi#createOtcUploadPreUpload");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| otcUploadPreUploadRequest | OtcUploadPreUploadRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Pre-upload credentials issued 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 compatible field name `payment_receipt` depends on the gateway and production contract. The persisted field is `otc_trade_record.payment_receipt_file_key`. The Pay Inner path is `POST .../pay/order_set_paid` (which commonly identifies orders by `client_order_id`); the Inner path corresponding to this OpenAPI operation, `POST /order/paid`, still primarily uses `order_id`. If the gateway standardizes on the merchant order ID, follow the gateway documentation. Recommended pre-upload flow: first call `POST /otc/upload/pre_upload` (`scene=general`) and upload directly to the temporary bucket, then pass the returned base64 `file_key` unchanged (do not decode) to this endpoint. The service validates the uid and object existence before moving the object to the production bucket. A cross-user key returns `Invalid parameters file_key`; an object that has not been uploaded returns `Invalid parameters file not uploaded`. The legacy flow using a base64 key for an object uploaded directly to the production bucket remains supported.
// 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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
OtcMarkOrderPaidRequest otcMarkOrderPaidRequest = new OtcMarkOrderPaidRequest(); // OtcMarkOrderPaidRequest |
try {
OtcActionResponse result = apiInstance.markOtcOrderPaid(otcMarkOrderPaidRequest);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String orderId = "orderId_example"; // String | Order ID
try {
OtcActionResponse result = apiInstance.cancelOtcOrder(orderId);
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String type = "type_example"; // String | BUY for on-ramp, SELL for off-ramp
String fiatCurrency = "fiatCurrency_example"; // String | Fiat currency
String cryptoCurrency = "cryptoCurrency_example"; // String | Digital currency
String startTime = "startTime_example"; // String | starttime for example : 2025-09-09
String endTime = "endTime_example"; // String | endtime for example :2025-09-09
String status = "status_example"; // String | DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed
String pn = "pn_example"; // String | Page number
String ps = "ps_example"; // String | Number of items per page
try {
OtcOrderListResponse result = apiInstance.listOtcOrders()
.type(type)
.fiatCurrency(fiatCurrency)
.cryptoCurrency(cryptoCurrency)
.startTime(startTime)
.endTime(endTime)
.status(status)
.pn(pn)
.ps(ps)
.execute();
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String pageSize = "10"; // String | Number of records per page
String pageNumber = "1"; // String | Page number
String coinName = "USDT"; // String | ordercurrency
String startTime = "startTime_example"; // String | Start Time
String endTime = "endTime_example"; // String | End time
String status = "status_example"; // String | Status: PROCESSING: in progress / DONE:completed / FAILED: failed
try {
OtcStableCoinOrderListResponse result = apiInstance.listStableCoinOrders()
.pageSize(pageSize)
.pageNumber(pageNumber)
.coinName(coinName)
.startTime(startTime)
.endTime(endTime)
.status(status)
.execute();
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 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:
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.OtcApi;
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");
OtcApi apiInstance = new OtcApi(defaultClient);
String orderId = "orderId_example"; // String | Order ID
try {
OtcOrderDetailResponse result = apiInstance.getOtcOrderDetail(orderId);
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 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 | - |