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 |
| getUserDefaultBank | GET /otc/get_user_def_bank | Get user's default bank account information |
| getBankList | GET /otc/bank_list | Get user bank card list |
| markOtcOrderPaid | POST /otc/order/paid | Mark fiat order as paid |
| 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 |
Promise<{ response: http.IncomingMessage; body: OtcQuoteResponse; }> createOtcQuote(otcQuoteRequest)
Fiat and stablecoin quote
Create fiat and stablecoin quotes, supporting both PAY and GET directions
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const otcQuoteRequest = new OtcQuoteRequest(); // OtcQuoteRequest |
api.createOtcQuote(otcQuoteRequest)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| otcQuoteRequest | OtcQuoteRequest |
Promise<{ response: AxiosResponse; body: OtcQuoteResponse; }> OtcQuoteResponse
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcActionResponse; }> createOtcOrder(otcOrderRequest)
Create fiat order
Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const otcOrderRequest = new OtcOrderRequest(); // OtcOrderRequest |
api.createOtcOrder(otcOrderRequest)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| otcOrderRequest | OtcOrderRequest |
Promise<{ response: AxiosResponse; body: OtcActionResponse; }> OtcActionResponse
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcStableCoinOrderCreateResponse; }> createStableCoinOrder(otcStableCoinOrderRequest)
Create stablecoin order
Create stablecoin order
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const otcStableCoinOrderRequest = new OtcStableCoinOrderRequest(); // OtcStableCoinOrderRequest |
api.createStableCoinOrder(otcStableCoinOrderRequest)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| otcStableCoinOrderRequest | OtcStableCoinOrderRequest |
Promise<{ response: AxiosResponse; body: OtcStableCoinOrderCreateResponse; }> OtcStableCoinOrderCreateResponse
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcUserDefaultBankResponse; }> getUserDefaultBank()
Get user's default bank account information
Get user's default bank account information for order placement
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
api.getUserDefaultBank()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: OtcUserDefaultBankResponse; }> OtcUserDefaultBankResponse
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcBankListResponse; }> getBankList()
Get user bank card list
Get user bank card list for selecting bank card when placing orders
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
api.getBankList()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: OtcBankListResponse; }> OtcBankListResponse
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcActionResponse; }> markOtcOrderPaid(otcMarkOrderPaidRequest)
Mark fiat order as paid
Mark fiat order as paid
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const otcMarkOrderPaidRequest = new OtcMarkOrderPaidRequest(); // OtcMarkOrderPaidRequest |
api.markOtcOrderPaid(otcMarkOrderPaidRequest)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| otcMarkOrderPaidRequest | OtcMarkOrderPaidRequest |
Promise<{ response: AxiosResponse; body: OtcActionResponse; }> OtcActionResponse
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcActionResponse; }> cancelOtcOrder(orderId)
Fiat order cancellation
Cancel fiat order
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const orderId = "orderId_example"; // string | Order ID
api.cancelOtcOrder(orderId)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | string | Order ID | [default to undefined] |
Promise<{ response: AxiosResponse; body: OtcActionResponse; }> OtcActionResponse
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcOrderListResponse; }> listOtcOrders(opts)
Fiat order list
Query the fiat order list with filters such as type, currency, time range, and status
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const opts = {
'type': "type_example", // string | BUY for on-ramp, SELL for off-ramp
'fiatCurrency': "fiatCurrency_example", // string | Fiat currency
'cryptoCurrency': "cryptoCurrency_example", // string | Digital currency
'startTime': "startTime_example", // string | starttime for example : 2025-09-09
'endTime': "endTime_example", // string | endtime for example :2025-09-09
'status': "status_example", // string | DONE: Completed CANCEL: Canceled PROCESSING: In Progress
'pn': "pn_example", // string | Page number
'ps': "ps_example" // string | Number of items per page
};
api.listOtcOrders(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| type | string | BUY for on-ramp, SELL for off-ramp | [optional] [default to undefined] |
| fiatCurrency | string | Fiat currency | [optional] [default to undefined] |
| cryptoCurrency | string | Digital currency | [optional] [default to undefined] |
| startTime | string | starttime for example : 2025-09-09 | [optional] [default to undefined] |
| endTime | string | endtime for example :2025-09-09 | [optional] [default to undefined] |
| status | string | DONE: Completed CANCEL: Canceled PROCESSING: In Progress | [optional] [default to undefined] |
| pn | string | Page number | [optional] [default to undefined] |
| ps | string | Number of items per page | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: OtcOrderListResponse; }> OtcOrderListResponse
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcStableCoinOrderListResponse; }> listStableCoinOrders(opts)
Stablecoin order list
Query stablecoin order list with filtering by currency, time range, status, etc.
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const opts = {
'pageSize': "10", // string | Number of records per page
'pageNumber': "1", // string | Page number
'coinName': "USDT", // string | ordercurrency
'startTime': "startTime_example", // string | Start Time
'endTime': "endTime_example", // string | End time
'status': "status_example" // string | Status: PROCESSING: in progress / DONE:completed / FAILED: failed
};
api.listStableCoinOrders(opts)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| pageSize | string | Number of records per page | [optional] [default to undefined] |
| pageNumber | string | Page number | [optional] [default to undefined] |
| coinName | string | ordercurrency | [optional] [default to undefined] |
| startTime | string | Start Time | [optional] [default to undefined] |
| endTime | string | End time | [optional] [default to undefined] |
| status | string | Status: PROCESSING: in progress / DONE:completed / FAILED: failed | [optional] [default to undefined] |
Promise<{ response: AxiosResponse; body: OtcStableCoinOrderListResponse; }> OtcStableCoinOrderListResponse
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: OtcOrderDetailResponse; }> getOtcOrderDetail(orderId)
Fiat order details
Query fiat order details
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.OTCApi(client);
const orderId = "orderId_example"; // string | Order ID
api.getOtcOrderDetail(orderId)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| orderId | string | Order ID | [default to undefined] |
Promise<{ response: AxiosResponse; body: OtcOrderDetailResponse; }> OtcOrderDetailResponse
- Content-Type: Not defined
- Accept: application/json