# OTC
OTC Trading
# Fiat and stablecoin quote
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/quote'
query_param = ''
body='{"side":"PAY","pay_coin":"USDT","get_coin":"USD","pay_amount":"30000","get_amount":"30000","create_quote_token":"0","promotion_code":""}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/quote"
query_param=""
body_param='{"side":"PAY","pay_coin":"USDT","get_coin":"USD","pay_amount":"30000","get_amount":"30000","create_quote_token":"0","promotion_code":""}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/quote
Fiat and stablecoin quote
Create fiat and stablecoin quotes, supporting both PAY and GET directions
Body parameter
{
"side": "PAY",
"pay_coin": "USDT",
"get_coin": "USD",
"pay_amount": "30000",
"get_amount": "30000",
"create_quote_token": "0",
"promotion_code": ""
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcQuoteRequest | true | none |
| » side | body | string | true | PAY: specify the payment amount (pay_amount is required); GET: specify the receive amount (get_amount is required). |
| » pay_coin | body | string | true | Payment currency. Supported currencies are available on the OTC web quote page. |
| » get_coin | body | string | true | Receive currency. Supported currencies are available on the OTC web quote page. |
| » pay_amount | body | string | false | User payment currency amount |
| » get_amount | body | string | false | Amount of currency received by the user |
| » create_quote_token | body | string | false | Create quote token: 0: quote preview only; 1: generate quote token for order placement. |
| » promotion_code | body | string | false | Promotion code |
Example responses
200 Response
{
"code": 0,
"message": "success",
"data": {
"type": "BUY",
"pay_coin": "USD",
"get_coin": "USDT",
"pay_amount": "30000.00",
"get_amount": "29891.00",
"rate": "1.0036",
"rate_reci": "0.9964",
"promotion_code": "",
"side": "PAY",
"validity_period": "300",
"order_type": "FIAT",
"quote_token": "",
"refresh_limit": 20,
"refresh_limit_msg": ""
},
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Quote retrieved successfully | OtcQuoteResponse |
Response Schema
Status Code 200
OtcQuoteResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» type | string | BUY (on-ramp) or SELL (off-ramp) |
| »» pay_coin | string | Payment currency |
| »» get_coin | string | Currency |
| »» pay_amount | string | Payment amount |
| »» get_amount | string | Redemption Amount |
| »» rate | string | Exchange rate |
| »» rate_reci | string | Reciprocal of the exchange rate |
| »» promotion_code | string | Promotion code |
| »» side | string | Quote method |
| »» order_type | string | Order type: FIAT (fiat) / STABLE (stablecoin) |
| »» quote_token | string | Quote token required when placing an order |
| »» validity_period | string | Quote validity period (seconds) |
| »» refresh_limit | integer | Quote refresh limit |
| »» refresh_limit_msg | string | Quote refresh limit message |
| » timestamp | integer | Server Unix timestamp in seconds |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Create fiat order
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/order/create'
query_param = ''
body='{"type":"BUY","side":"FIAT","crypto_currency":"USDT","fiat_currency":"USD","crypto_amount":"30000","fiat_amount":"30000","promotion_code":"","quote_token":"","bank_id":"2","receive_type":"GATE"}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/order/create"
query_param=""
body_param='{"type":"BUY","side":"FIAT","crypto_currency":"USDT","fiat_currency":"USD","crypto_amount":"30000","fiat_amount":"30000","promotion_code":"","quote_token":"","bank_id":"2","receive_type":"GATE"}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/order/create
Create fiat order
Create a fiat order, supporting BUY for on-ramp and SELL for off-ramp
Body parameter
{
"type": "BUY",
"side": "FIAT",
"crypto_currency": "USDT",
"fiat_currency": "USD",
"crypto_amount": "30000",
"fiat_amount": "30000",
"promotion_code": "",
"quote_token": "",
"bank_id": "2",
"receive_type": "GATE"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcOrderRequest | true | none |
| » type | body | string | true | BUY (on-ramp) or SELL (off-ramp) |
| » side | body | string | true | The side returned by the quote endpoint (used for order validation). For backward compatibility, FIAT/CRYPTO or PAY/GET are accepted; new integrations should use the value returned by the quote response. |
| » crypto_currency | body | string | true | Cryptocurrency (supported currencies can be queried from the OTC web fiat quote page) |
| » fiat_currency | body | string | true | Fiat currency (supported currencies can be queried from the OTC web fiat quote page) |
| » crypto_amount | body | string | true | Amount of cryptocurrency |
| » fiat_amount | body | string | true | Fiat amount |
| » promotion_code | body | string | false | Promotion code |
| » quote_token | body | string | true | Parameter returned by the quote API |
| » bank_id | body | string | true | Bank card ID used to place the order. Select one from the list returned by GET /otc/bank/list; the default card has is_default=1. |
| » receive_type | body | string | false | Name used for the remittance. Allowed values depend on the user type: Corporate users: YOU (remit in your company's name), GATE (remit in Gate's name), RECIPIENT (remit in the recipient's name); Individual users: GATE (remit in Gate's name), PERSON (remit in the user's own name). |
# Detailed descriptions
» receive_type: Name used for the remittance. Allowed values depend on the user type:
Corporate users: YOU (remit in your company's name), GATE (remit in Gate's name), RECIPIENT (remit in the recipient's name);
Individual users: GATE (remit in Gate's name), PERSON (remit in the user's own name).
# Enumerated Values
| Parameter | Value |
|---|---|
| » receive_type | YOU |
| » receive_type | GATE |
| » receive_type | RECIPIENT |
| » receive_type | PERSON |
Example responses
200 Response
{
"code": 0,
"message": "success",
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Order created successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Create stablecoin order
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/stable_coin/order/create'
query_param = ''
body='{"pay_coin":"USDC","get_coin":"USDT","pay_amount":"30000","get_amount":"20000","side":"PAY","promotion_code":"","quote_token":"dsafjkdshfjdsjkfah"}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/stable_coin/order/create"
query_param=""
body_param='{"pay_coin":"USDC","get_coin":"USDT","pay_amount":"30000","get_amount":"20000","side":"PAY","promotion_code":"","quote_token":"dsafjkdshfjdsjkfah"}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/stable_coin/order/create
Create stablecoin order
Create a stablecoin order. All request body fields except promotion_code are required.
Body parameter
{
"pay_coin": "USDC",
"get_coin": "USDT",
"pay_amount": "30000",
"get_amount": "20000",
"side": "PAY",
"promotion_code": "",
"quote_token": "dsafjkdshfjdsjkfah"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcStableCoinOrderRequest | true | none |
| » pay_coin | body | string | true | Currency paid by the user. Supported currencies can be queried from the OTC web stablecoin quote page. |
| » get_coin | body | string | true | Currency to be received by the user. Supported currencies can be queried from the OTC web stablecoin quote page. |
| » pay_amount | body | string | true | User payment currency amount |
| » get_amount | body | string | true | Amount of currency received by the user |
| » side | body | string | true | The side returned by the quote endpoint (used for order validation). For backward compatibility, PAY/GET are accepted; new integrations should use the value returned by the quote response. |
| » promotion_code | body | string | false | Promotion code (optional) |
| » quote_token | body | string | true | Parameter returned by the quote API |
Example responses
200 Response
{
"code": 0,
"message": "success",
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Stablecoin order created successfully | OtcStableCoinOrderCreateResponse |
Response Schema
Status Code 200
OtcStableCoinOrderCreateResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | Business code; 0 indicates success |
| » message | string | Message |
| » timestamp | integer | Server Unix timestamp in seconds |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Get user bank card list
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/list'
query_param = ''
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('GET', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('GET', host + prefix + url, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="GET"
url="/otc/bank/list"
query_param=""
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
GET /otc/bank/list
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.
Example responses
200 Response
{
"code": 0,
"message": "string",
"data": {
"lists": [
{}
]
},
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Query successful | OtcBankListResponse |
Response Schema
Status Code 200
OtcBankListResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» lists | array | Bank card list |
| »»» OtcBankListItem | object | none |
| »»»» id | string | Bank card ID (used when placing an order; the synonymous bank_id field has been consolidated into id) |
| »»»» bank_account_name | string | Bank account name |
| »»»» bank_name | string | Bank name |
| »»»» bank_country | string | Bank country |
| »»»» bank_address | string | Bank address |
| »»»» iban | string | IBAN number |
| »»»» swift | string | SWIFT code |
| »»»» remittance_line_number | string | Remittance routing number |
| »»»» agent_bank_name | string | Correspondent bank name |
| »»»» agent_bank_swift | string | Correspondent bank SWIFT code |
| »»»» submit_time | string | Submission time |
| »»»» update_time | string | Update time |
| »»»» status | string | Status |
| »»»» is_default | integer | Whether it is the default bank card. 1 - Yes, 0 - No |
| »»» timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Create bank card
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/create'
query_param = ''
body='{}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/bank/create"
query_param=""
body_param='{}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/bank/create
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):
- Pre-upload (recommended): call
POST /otc/upload/pre_upload(scene=bank) to obtain a temporary-bucket Policy and upload directly to S3, then passdocumentation_file_key+file_typein this endpoint; - Multipart direct upload: pass the
documentation_filefile 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.
Body parameter
{}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcBankCreateMultipartRequest | true | none |
| » bank_account_name | body | string | true | none |
| » bank_name | body | string | true | none |
| » bank_country | body | string | true | none |
| » bank_address | body | string | true | none |
| » iban | body | string | true | none |
| » swift | body | string | true | none |
| » remittance_line_number | body | string | false | none |
| » agent_bank_name | body | string | false | none |
| » agent_bank_swift | body | string | false | none |
| » documentation_file | body | string | false | Multipart direct upload; mutually exclusive with documentation_file_key |
| » documentation_file_key | body | string | false | Pre-upload mode; file_key returned by pre_upload (plaintext or base64 accepted) |
| » file_type | body | string | false | Required when using documentation_file_key; plaintext MIME or its base64 |
| » None | body | object | false | none |
| » None | body | object | false | none |
Example responses
200 Response
{
"code": 0,
"message": "string",
"data": {
"bank_id": 0,
"status": 0
},
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Accepted successfully | OtcBankCreateResponse |
Response Schema
Status Code 200
Bank card created successfully (Inner returns bank_id and status).
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» bank_id | integer | Bank card primary key in otc_rds. |
| »» status | integer | Review status (e.g., pending review). |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Delete bank card
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/delete'
query_param = ''
body='{"bank_id":"string"}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/bank/delete"
query_param=""
body_param='{"bank_id":"string"}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/bank/delete
Delete bank card
Delete the specified bank card. Corresponds to Inner: POST /bank/delete.
Body parameter
{
"bank_id": "string"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcBankIdRequest | true | none |
| » bank_id | body | string | true | Bank card ID |
Example responses
200 Response
{
"code": 0,
"message": "string",
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Deleted successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Set default bank card
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/set_default'
query_param = ''
body='{"bank_id":"string"}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/bank/set_default"
query_param=""
body_param='{"bank_id":"string"}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/bank/set_default
Set default bank card
Set the specified bank card as default. Corresponds to Inner: POST /bank/set_default.
Body parameter
{
"bank_id": "string"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcBankIdRequest | true | none |
| » bank_id | body | string | true | Bank card ID |
Example responses
200 Response
{
"code": 0,
"message": "string",
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Set successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Query the checklist of materials to supplement for a bank card
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/bank_supplement_checklist'
query_param = 'bank_id=string'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('GET', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('GET', host + prefix + url + "?" + query_param, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="GET"
url="/otc/bank/bank_supplement_checklist"
query_param="bank_id=string"
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url?$query_param"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
GET /otc/bank/bank_supplement_checklist
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.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| bank_id | query | string | true | Bank card ID (otc_rds / the id returned by the list endpoint). |
Example responses
200 Response
{
"code": 0,
"message": "string",
"data": {
"user_type": "personal",
"items": [
{}
]
},
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Query successful | OtcBankSupplementChecklistResponse |
Response Schema
Status Code 200
OtcBankSupplementChecklistResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» user_type | string | personal or enterprise, matching the supplementary document submission type; items[].description describes the submission requirements for each item |
| »» items | array | [Supplementary document item] |
| »»» None | OtcBankSupplementChecklistItem | Supplementary document item |
| »»»» description | string | Supplementary document submission description |
| »»» timestamp | integer | none |
# Enumerated Values
| Property | Value |
|---|---|
| user_type | personal |
| user_type | enterprise |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Submit Bank Card Supplement Materials (Personal)
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/personal/bank_supplement'
query_param = ''
body='{}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/bank/personal/bank_supplement"
query_param=""
body_param='{}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/bank/personal/bank_supplement
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):
- Pre-upload (recommended): call
POST /otc/upload/pre_upload(scene=bank) to upload to the temporary bucket, then fill file items by category in therelationship_proofJSON; passkeyas plaintext object path (base64_decode(pre_upload.file_key), e.g.otc_temp/{uid}/bank/xxx.png), andfile_typeas plaintext MIME; the server base64-encodes before persistence—do not pass base64file_keydirectly; - Multipart direct upload: one file field per material item; field names match checklist
code(id_document_front,id_document_back,address_proof).
Body parameter
{}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcBankPersonalSupplementMultipartRequest | true | none |
| » bank_id | body | string | true | none |
| » id_document_front | body | string | false | ID document front-side file content (multipart file field, binary/Base64) |
| » id_document_back | body | string | false | ID document back-side file content (multipart file field, binary/Base64) |
| » address_proof | body | string | false | Proof-of-address file content (multipart file field, binary/Base64) |
| » relationship_proof | body | string | false | Optional. JSON string of relationship_proof. |
| » None | body | object | false | none |
| » None | body | object | false | none |
Example responses
200 Response
{
"code": 0,
"message": "string",
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Accepted successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Submit Bank Card Supplement Materials (Enterprise)
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/bank/enterprise/bank_supplement'
query_param = ''
body='{}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/bank/enterprise/bank_supplement"
query_param=""
body_param='{}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/bank/enterprise/bank_supplement
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):
- Pre-upload (recommended): call
POST /otc/upload/pre_upload(scene=bank), fill file items by category inrelationship_proof; passkeyas plaintext object path (base64_decode(pre_upload.file_key)), andfile_typeas plaintext MIME; - Multipart direct upload: file field names
certificate,share_holders,passport,share_holding_structure; optionalfunds_statement,additional.
Body parameter
{}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcBankEnterpriseSupplementMultipartRequest | true | none |
| » uid | body | string | false | none |
| » bank_id | body | string | true | none |
| » certificate | body | string | false | Business license / registration certificate file content (multipart file field, binary/Base64) |
| » share_holders | body | string | false | Register of shareholders file content (multipart file field, binary/Base64) |
| » passport | body | string | false | Legal representative / shareholder passport file content (multipart file field, binary/Base64) |
| » share_holding_structure | body | string | false | Ownership structure chart file content (multipart file field, binary/Base64) |
| » funds_statement | body | string | false | Proof-of-funds file content (multipart file field, binary/Base64, optional) |
| » additional | body | string | false | Other supplementary material file content (multipart file field, binary/Base64, optional) |
| » relationship_proof | body | string | false | Optional. JSON string of relationship_proof. |
| » None | body | object | false | none |
| » None | body | object | false | none |
Example responses
200 Response
{
"code": 0,
"message": "string",
"timestamp": 0
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Accepted successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Pre-upload file (temporary bucket)
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/upload/pre_upload'
query_param = ''
body='{"content_type":"aW1hZ2UvcG5n","scene":"bank"}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/upload/pre_upload"
query_param=""
body_param='{"content_type":"aW1hZ2UvcG5n","scene":"bank"}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/upload/pre_upload
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 |
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.
Body parameter
{
"content_type": "aW1hZ2UvcG5n",
"scene": "bank"
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcUploadPreUploadRequest | true | none |
| » content_type | body | string | true | Base64 of the file MIME type, required. Only image/png, image/jpeg, image/jpg, and application/pdf are supported. |
| » scene | body | string | false | Business scene, optional, defaults to general; determines temporary path and production directory after relocation |
# Enumerated Values
| Parameter | Value |
|---|---|
| » content_type | aW1hZ2UvcG5n |
| » content_type | aW1hZ2UvanBlZw== |
| » content_type | aW1hZ2UvanBn |
| » content_type | YXBwbGljYXRpb24vcGRm |
| » scene | general |
| » scene | bank |
| » scene | assessment |
| » scene | credit |
Example responses
200 Response
{
"code": 0,
"message": "success",
"data": {
"file_key": "b3RjX3RlbXAvMTIzNDU2Nzg5MC9iYW5rLzIwMjYwODMxMDc1MTI1MjgyMjMzOTQ1OS5wbmc=",
"url": "https://example-bucket.s3.us-east-2.amazonaws.com",
"fields": {
"key": "otc_temp/1234567890/bank/202608310751252822339459.png",
"Content-Type": "image/png",
"X-Amz-Credential": "AKIAEXAMPLE/20260831/us-east-2/s3/aws4_request",
"X-Amz-Algorithm": "AWS4-HMAC-SHA256",
"X-Amz-Date": "20260831T075125Z",
"Policy": "eyJleHBpcmF0aW9uIjoiMjAyNi0wOC0zMVQwOToyMToyNVoiLCJjb25kaXRpb25zIjpbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMSwxMDQ4NTc2MF1dfQ==",
"X-Amz-Signature": "EXAMPLE_SIGNATURE"
},
"expires_in": 5400
},
"timestamp": 1788162685
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Pre-upload credentials issued successfully | OtcUploadPreUploadResponse |
Response Schema
Status Code 200
OtcUploadPreUploadResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | 0 success; 10010400 parameter error |
| » message | string | Response message |
| » data | OtcUploadPreUploadData | Pre-upload credentials and S3 direct-upload parameters |
| »» file_key | string | Base64 temporary object path; pass back unchanged on business submit—do not decode |
| »» url | string | S3 direct upload URL |
| »» fields | OtcUploadPreUploadPolicyFields | S3 POST Policy signature fields; send unchanged as form-data during direct upload |
| »»» key | string | Plaintext temporary object path, identical to base64_decode(file_key) |
| »»» Content-Type | string | Must match the decoded content_type from the pre-upload request |
| »»» X-Amz-Credential | string | AWS temporary credential and scope; submit them unchanged during direct upload |
| »»» X-Amz-Algorithm | string | AWS signing algorithm; submit it unchanged during direct upload |
| »»» X-Amz-Date | string | AWS signing timestamp; submit it unchanged during direct upload |
| »»» Policy | string | Base64-encoded S3 POST Policy; submit it unchanged during direct upload |
| »»» X-Amz-Signature | string | S3 POST Policy signature; submit it unchanged during direct upload |
| »» expires_in | integer | Policy validity period in seconds; currently 5400 (90 minutes); aligns with expiration in fields.Policy; call this endpoint again after expiry |
| » timestamp | integer | Response timestamp (in seconds) |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Mark fiat order as paid (deposit confirmation)
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/order/paid'
query_param = ''
body='{"order_id":"203","client_order_id":"","payment_receipt_file_key":"b3RjX3RlbXAvMTIzNDU2Nzg5MC9nZW5lcmFsLzIwMjYwODMxMjEwMDEyMzQ1Njc4LnBuZw==","payment_receipt":""}'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param, body)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url, headers=headers, data=body)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/order/paid"
query_param=""
body_param='{"order_id":"203","client_order_id":"","payment_receipt_file_key":"b3RjX3RlbXAvMTIzNDU2Nzg5MC9nZW5lcmFsLzIwMjYwODMxMjEwMDEyMzQ1Njc4LnBuZw==","payment_receipt":""}'
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url -d "$body_param" -H "Content-Type: application/json" \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/order/paid
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.
Body parameter
{
"order_id": "203",
"client_order_id": "",
"payment_receipt_file_key": "b3RjX3RlbXAvMTIzNDU2Nzg5MC9nZW5lcmFsLzIwMjYwODMxMjEwMDEyMzQ1Njc4LnBuZw==",
"payment_receipt": ""
}
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | body | OtcMarkOrderPaidRequest | true | none |
| » order_id | body | string | true | Order ID |
| » client_order_id | body | string | false | Client order ID (used by some gateway/Inner Pay paths, optional) |
| » payment_receipt_file_key | body | string | true | User payment receipt: required. Recommended: call POST /otc/upload/pre_upload (scene=general) to upload to the temporary bucket, then pass the returned base64 file_key unchanged (do not decode); the server moves to the production bucket and persists. Still compatible with legacy production-bucket base64 keys. Single file; jpg/jpeg/png/pdf; ≤10MB. |
| » payment_receipt | body | string | false | Alias compatible with payment_receipt_file_key (depends on the gateway's external field name) |
Example responses
200 Response
{
"code": 0,
"message": "success",
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | The order has been marked as paid | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Fiat order cancellation
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/order/cancel'
query_param = 'order_id=string'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('POST', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('POST', host + prefix + url + "?" + query_param, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="POST"
url="/otc/order/cancel"
query_param="order_id=string"
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url?$query_param"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
POST /otc/order/cancel
Fiat order cancellation
Cancel fiat order
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| order_id | query | string | true | Order ID |
Example responses
200 Response
{
"code": 0,
"message": "success",
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Order cancelled successfully | OtcActionResponse |
Response Schema
Status Code 200
OtcActionResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » timestamp | integer | none |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Fiat order list
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/order/list'
query_param = ''
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('GET', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('GET', host + prefix + url, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="GET"
url="/otc/order/list"
query_param=""
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
GET /otc/order/list
Fiat order list
Query the fiat order list with filters such as type, currency, time range, and status
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| type | query | string | false | BUY (on-ramp) or SELL (off-ramp) |
| fiat_currency | query | string | false | Fiat currency |
| crypto_currency | query | string | false | Digital currency |
| start_time | query | string | false | Start Time |
| end_time | query | string | false | End time |
| status | query | string | false | DONE: completed CANCEL: canceled PROCESSING: in progress DISBURSED: disbursed |
| pn | query | string | false | Page number |
| ps | query | string | false | Number of items per page |
# Detailed descriptions
status: DONE: completed
CANCEL: canceled
PROCESSING: in progress
DISBURSED: disbursed
Example responses
200 Response
{
"code": 0,
"message": "Success",
"data": {
"pn": 1,
"ps": 10,
"total_pn": 1,
"count": 2,
"list": [
{
"time": "2025-02-11 07:45:06",
"timestamp": 1739000013,
"order_id": "41",
"trade_no": "20250207043457590939",
"type": "SELL",
"status": "PROCESSING",
"fiat_currency": "USD",
"fiat_currency_info": {
"name": "USD",
"icon": "http://icon.url"
},
"fiat_amount": "199600",
"crypto_currency": "USDT",
"crypto_currency_info": {
"name": "USDT",
"icon": "http://icon.url"
},
"crypto_amount": "200000",
"rate": "0.998000",
"promotion_code": ""
}
]
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Query successful | OtcOrderListResponse |
Response Schema
Status Code 200
OtcOrderListResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» pn | integer | none |
| »» ps | integer | none |
| »» total_pn | integer | none |
| »» count | integer | none |
| »» list | array | none |
| »»» OtcOrderListItem | object | none |
| »»»» time | string | Current time |
| »»»» timestamp | integer | Current timestamp |
| »»»» order_id | string | orderId |
| »»»» trade_no | string | Trade number |
| »»»» type | string | BUY deposit / SELL withdrawal |
| »»»» status | string | Order status |
| »»»» fiat_currency | string | Fiat currency |
| »»»» fiat_currency_info | object | none |
| »»»»» name | string | Name |
| »»»»» icon | string | Image |
| »»»» fiat_amount | string | Fiat amount |
| »»»» crypto_currency | string | Digital currency |
| »»»» crypto_currency_info | object | none |
| »»»»» name | string | none |
| »»»»» icon | string | none |
| »»»» crypto_amount | string | Cryptocurrency amount |
| »»»» rate | string | Exchange rate |
| »»»» promotion_code | string | Promotion code |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Stablecoin order list
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/stable_coin/order/list'
query_param = ''
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('GET', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('GET', host + prefix + url, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="GET"
url="/otc/stable_coin/order/list"
query_param=""
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
GET /otc/stable_coin/order/list
Stablecoin order list
Query stablecoin order list with filtering by currency, time range, status, etc.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| page_size | query | string | false | Number of records per page |
| page_number | query | string | false | Page number |
| coin_name | query | string | false | ordercurrency |
| start_time | query | string | false | Start Time |
| end_time | query | string | false | End time |
| status | query | string | false | Status: PROCESSING: in progress / DONE:completed / FAILED: failed |
Example responses
200 Response
{
"code": 0,
"message": "success",
"data": {
"total": 20,
"page_size": 10,
"page_number": 1,
"total_page": 10,
"list": [
{
"id": 1,
"trade_no": "89875324974",
"pay_coin": "USDT",
"pay_icon": "https://icon.com",
"pay_amount": "30000.00",
"get_coin": "JDUSD",
"get_icon": "https://icon.com",
"get_amount": "20000.00",
"rate": "1.5",
"rate_reci": "0.6667",
"status": "PROCESSING",
"create_timest": 17878979789,
"create_time": "2025-09-09 10:00:00"
}
]
}
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Query successful | OtcStableCoinOrderListResponse |
Response Schema
Status Code 200
OtcStableCoinOrderListResponse
| Name | Type | Description |
|---|---|---|
| » code | integer | none |
| » message | string | none |
| » data | object | none |
| »» total | integer | none |
| »» page_size | integer | none |
| »» page_number | integer | none |
| »» total_page | integer | none |
| »» list | array | none |
| »»» OtcStableCoinOrderListItem | object | none |
| »»»» id | integer | Order ID |
| »»»» trade_no | string | Transaction reference number |
| »»»» pay_coin | string | Payment currency |
| »»»» pay_icon | string | Payment currency icon |
| »»»» pay_amount | string | Payment amount |
| »»»» get_coin | string | Received currency |
| »»»» get_icon | string | Received currency icon |
| »»»» get_amount | string | Received amount |
| »»»» rate | string | Exchange rate |
| »»»» rate_reci | string | Reciprocal of the exchange rate |
| »»»» status | string | PROCESSING: in progress / DONE: completed / FAILED: failed |
| »»»» create_timest | integer | Created time |
| »»»» create_time | string | Created time |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Fiat order details
Code samples
# coding: utf-8
import requests
import time
import hashlib
import hmac
host = "https://api.gateio.ws"
prefix = "/api/v4"
headers = {'Accept': 'application/json', 'Content-Type': 'application/json'}
url = '/otc/order/detail'
query_param = 'order_id=string'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('GET', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('GET', host + prefix + url + "?" + query_param, headers=headers)
print(r.json())
key="YOUR_API_KEY"
secret="YOUR_API_SECRET"
host="https://api.gateio.ws"
prefix="/api/v4"
method="GET"
url="/otc/order/detail"
query_param="order_id=string"
body_param=''
timestamp=$(date +%s)
body_hash=$(printf "$body_param" | openssl sha512 | awk '{print $NF}')
sign_string="$method\n$prefix$url\n$query_param\n$body_hash\n$timestamp"
sign=$(printf "$sign_string" | openssl sha512 -hmac "$secret" | awk '{print $NF}')
full_url="$host$prefix$url?$query_param"
curl -X $method $full_url \
-H "Timestamp: $timestamp" -H "KEY: $key" -H "SIGN: $sign"
GET /otc/order/detail
Fiat order details
Query fiat order details
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| order_id | query | string | true | Order ID |
Example responses
200 Response
{
"message": "成功",
"code": 0,
"data": {
"order_id": "265",
"uid": "2124269088",
"type": "BUY",
"fiat_currency": "USD",
"fiat_amount": "300000",
"crypto_currency": "USDT",
"crypto_amount": "299700",
"rate": "1.001001",
"bank_account_name": "",
"bank_name": "",
"bank_country": "",
"bank_address": "",
"bank_account_number_iban": "",
"swift_code": "",
"intermediate_bank_name": "",
"intermediary_bank_swift_code": "",
"gate_bank_account_name": "",
"gate_bank_name": "",
"gate_bank_country": "",
"gate_bank_address": "",
"gate_bank_account_number_iban": "",
"gate_swift_code": "",
"gate_intermediary_bank_name": "",
"gate_intermediary_bank_swift_code": "",
"gate_transfer_remark": "",
"gate_reference_code": "OTIK7M39QF42",
"status": "PROCESSING",
"create_time": "2025-03-07 07:51:52"
},
"timestamp": 1752051076
}
Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK (opens new window) | Query successful | OtcOrderDetailResponse |
Response Schema
Status Code 200
OtcOrderDetailResponse
| Name | Type | Description |
|---|---|---|
| » message | string | none |
| » code | integer | none |
| » data | object | none |
| »» order_id | string | Order ID |
| »» uid | string | User ID |
| »» type | string | Order Type |
| »» fiat_currency | string | Fiat currency |
| »» fiat_amount | string | Fiat amount |
| »» crypto_currency | string | Digital currency |
| »» crypto_amount | string | Cryptocurrency amount |
| »» rate | string | Exchange rate |
| »» bank_account_name | string | User payment/receiving name |
| »» bank_name | string | User payment/receiving bank name |
| »» bank_country | string | User payment/receiving bank country |
| »» bank_address | string | User payment/receiving bank address |
| »» bank_account_number_iban | string | User payment/receiving bank account number/IBAN |
| »» swift_code | string | User payment/receiving bank SWIFT code |
| »» intermediate_bank_name | string | User payment/receiving intermediary bank name |
| »» intermediary_bank_swift_code | string | User payment/receiving intermediary bank SWIFT code |
| »» gate_bank_account_name | string | Gate beneficiary name, shown for BUY only |
| »» gate_bank_name | string | Gate beneficiary bank name, shown for BUY only |
| »» gate_bank_country | string | Gate beneficiary bank country, shown for BUY only |
| »» gate_bank_address | string | Gate beneficiary bank address, shown for BUY only |
| »» gate_bank_account_number_iban | string | Gate beneficiary bank account number/IBAN, shown for BUY only |
| »» gate_swift_code | string | Gate beneficiary bank SWIFT code, shown for BUY only |
| »» gate_intermediary_bank_name | string | Gate beneficiary intermediary bank name, shown for BUY only |
| »» gate_intermediary_bank_swift_code | string | Gate beneficiary intermediary bank SWIFT code, shown for BUY only |
| »» gate_transfer_remark | string | Transfer remark (mutually exclusive with gate_reference_code; empty when a BUY deposit order has a reference code), shown for BUY only |
| »» gate_reference_code | string | Be sure to include the reference code when making the transfer so that your order can be processed promptly. (Mutually exclusive with gate_transfer_remark.) |
| »» status | string | Status |
| »» create_time | string | Created time |
WARNING
To perform this operation, you must be authenticated by API key and secret
# Schemas
# OtcQuoteResponse
{
"code": 0,
"message": "string",
"data": {
"type": "string",
"pay_coin": "string",
"get_coin": "string",
"pay_amount": "string",
"get_amount": "string",
"rate": "string",
"rate_reci": "string",
"promotion_code": "string",
"side": "string",
"order_type": "string",
"quote_token": "string",
"validity_period": "string",
"refresh_limit": 0,
"refresh_limit_msg": "string"
},
"timestamp": 0
}
OtcQuoteResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » type | string | true | none | BUY (on-ramp) or SELL (off-ramp) |
| » pay_coin | string | true | none | Payment currency |
| » get_coin | string | true | none | Currency |
| » pay_amount | string | true | none | Payment amount |
| » get_amount | string | true | none | Redemption Amount |
| » rate | string | true | none | Exchange rate |
| » rate_reci | string | true | none | Reciprocal of the exchange rate |
| » promotion_code | string | true | none | Promotion code |
| » side | string | true | none | Quote method |
| » order_type | string | true | none | Order type: FIAT (fiat) / STABLE (stablecoin) |
| » quote_token | string | true | none | Quote token required when placing an order |
| » validity_period | string | false | none | Quote validity period (seconds) |
| » refresh_limit | integer | false | none | Quote refresh limit |
| » refresh_limit_msg | string | false | none | Quote refresh limit message |
| timestamp | integer | true | none | Server Unix timestamp in seconds |
# OtcBankCreateResponse
{
"code": 0,
"message": "string",
"data": {
"bank_id": 0,
"status": 0
},
"timestamp": 0
}
Bank card created successfully (Inner returns bank_id and status).
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » bank_id | integer | true | none | Bank card primary key in otc_rds. |
| » status | integer | true | none | Review status (e.g., pending review). |
| timestamp | integer | false | none | none |
# OtcStableCoinOrderCreateResponse
{
"code": 0,
"message": "string",
"timestamp": 0
}
OtcStableCoinOrderCreateResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | Business code; 0 indicates success |
| message | string | true | none | Message |
| timestamp | integer | true | none | Server Unix timestamp in seconds |
# OtcUploadPreUploadResponse
{
"code": 0,
"message": "string",
"data": {
"file_key": "string",
"url": "string",
"fields": {
"key": "string",
"Content-Type": "string",
"X-Amz-Credential": "string",
"X-Amz-Algorithm": "string",
"X-Amz-Date": "string",
"Policy": "string",
"X-Amz-Signature": "string"
},
"expires_in": 0
},
"timestamp": 0
}
OtcUploadPreUploadResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | 0 success; 10010400 parameter error |
| message | string | true | none | Response message |
| data | OtcUploadPreUploadData | true | none | Pre-upload credentials and S3 direct-upload parameters |
| timestamp | integer | true | none | Response timestamp (in seconds) |
# OtcStableCoinOrderListResponse
{
"code": 0,
"message": "string",
"data": {
"total": 0,
"page_size": 0,
"page_number": 0,
"total_page": 0,
"list": [
{}
]
}
}
OtcStableCoinOrderListResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » total | integer | true | none | none |
| » page_size | integer | true | none | none |
| » page_number | integer | true | none | none |
| » total_page | integer | true | none | none |
| » list | array | true | none | none |
| »» OtcStableCoinOrderListItem | object | false | none | none |
| »»» id | integer | false | none | Order ID |
| »»» trade_no | string | false | none | Transaction reference number |
| »»» pay_coin | string | false | none | Payment currency |
| »»» pay_icon | string | false | none | Payment currency icon |
| »»» pay_amount | string | false | none | Payment amount |
| »»» get_coin | string | false | none | Received currency |
| »»» get_icon | string | false | none | Received currency icon |
| »»» get_amount | string | false | none | Received amount |
| »»» rate | string | false | none | Exchange rate |
| »»» rate_reci | string | false | none | Reciprocal of the exchange rate |
| »»» status | string | false | none | PROCESSING: in progress / DONE: completed / FAILED: failed |
| »»» create_timest | integer | false | none | Created time |
| »»» create_time | string | false | none | Created time |
# OtcBankCreateMultipartRequest
{}
*Inner create-bank-card multipart/form-data. Account-opening proof file (choose one):
- Pre-upload:
documentation_file_key+file_type(callPOST /otc/upload/pre_uploadfirst,scene=bank); - Multipart direct upload:
documentation_filefile field.*
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| bank_account_name | string | true | none | none |
| bank_name | string | true | none | none |
| bank_country | string | true | none | none |
| bank_address | string | true | none | none |
| iban | string | true | none | none |
| swift | string | true | none | none |
| remittance_line_number | string | false | none | none |
| agent_bank_name | string | false | none | none |
| agent_bank_swift | string | false | none | none |
| documentation_file | string | false | none | Multipart direct upload; mutually exclusive with documentation_file_key |
| documentation_file_key | string | false | none | Pre-upload mode; file_key returned by pre_upload (plaintext or base64 accepted) |
| file_type | string | false | none | Required when using documentation_file_key; plaintext MIME or its base64 |
oneOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
xor
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
# OtcOrderRequest
{
"type": "BUY",
"side": "FIAT",
"crypto_currency": "USDT",
"fiat_currency": "USD",
"crypto_amount": "30000",
"fiat_amount": "30000",
"promotion_code": "",
"quote_token": "",
"bank_id": "2",
"receive_type": "GATE"
}
Fiat Order Request Body
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| type | string | true | none | BUY (on-ramp) or SELL (off-ramp) |
| side | string | true | none | The side returned by the quote endpoint (used for order validation). For backward compatibility, FIAT/CRYPTO or PAY/GET are accepted; new integrations should use the value returned by the quote response. |
| crypto_currency | string | true | none | Cryptocurrency (supported currencies can be queried from the OTC web fiat quote page) |
| fiat_currency | string | true | none | Fiat currency (supported currencies can be queried from the OTC web fiat quote page) |
| crypto_amount | string | true | none | Amount of cryptocurrency |
| fiat_amount | string | true | none | Fiat amount |
| promotion_code | string | false | none | Promotion code |
| quote_token | string | true | none | Parameter returned by the quote API |
| bank_id | string | true | none | Bank card ID used to place the order. Select one from the list returned by GET /otc/bank/list; the default card has is_default=1. |
| receive_type | string | false | none | Name used for the remittance. Allowed values depend on the user type: Corporate users: YOU (remit in your company's name), GATE (remit in Gate's name), RECIPIENT (remit in the recipient's name); Individual users: GATE (remit in Gate's name), PERSON (remit in the user's own name). |
# Enumerated Values
| Property | Value |
|---|---|
| receive_type | YOU |
| receive_type | GATE |
| receive_type | RECIPIENT |
| receive_type | PERSON |
# OtcBankEnterpriseSupplementMultipartRequest
{}
Enterprise supplement multipart/form-data. File field names: certificate, share_holders, passport, share_holding_structure; optional funds_statement, additional. Optional string field relationship_proof (JSON) is merged into the request.
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| uid | string | false | none | none |
| bank_id | string | true | none | none |
| certificate | string | false | none | Business license / registration certificate file content (multipart file field, binary/Base64) |
| share_holders | string | false | none | Register of shareholders file content (multipart file field, binary/Base64) |
| passport | string | false | none | Legal representative / shareholder passport file content (multipart file field, binary/Base64) |
| share_holding_structure | string | false | none | Ownership structure chart file content (multipart file field, binary/Base64) |
| funds_statement | string | false | none | Proof-of-funds file content (multipart file field, binary/Base64, optional) |
| additional | string | false | none | Other supplementary material file content (multipart file field, binary/Base64, optional) |
| relationship_proof | string | false | none | Optional. JSON string of relationship_proof. |
anyOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
or
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
# OtcUploadPreUploadRequest
{
"content_type": "aW1hZ2UvcG5n",
"scene": "bank"
}
File pre-upload request body
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| content_type | string | true | none | Base64 of the file MIME type, required. Only image/png, image/jpeg, image/jpg, and application/pdf are supported. |
| scene | string | false | none | Business scene, optional, defaults to general; determines temporary path and production directory after relocation |
# Enumerated Values
| Property | Value |
|---|---|
| content_type | aW1hZ2UvcG5n |
| content_type | aW1hZ2UvanBlZw== |
| content_type | aW1hZ2UvanBn |
| content_type | YXBwbGljYXRpb24vcGRm |
| scene | general |
| scene | bank |
| scene | assessment |
| scene | credit |
# OtcBankSupplementChecklistResponse
{
"code": 0,
"message": "string",
"data": {
"user_type": "personal",
"items": [
{}
]
},
"timestamp": 0
}
OtcBankSupplementChecklistResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » user_type | string | true | none | personal or enterprise, matching the supplementary document submission type; items[].description describes the submission requirements for each item |
| » items | [OtcBankSupplementChecklistItem] | true | none | [Supplementary document item] |
| timestamp | integer | false | none | none |
# Enumerated Values
| Property | Value |
|---|---|
| user_type | personal |
| user_type | enterprise |
# OtcStableCoinOrderRequest
{
"pay_coin": "USDC",
"get_coin": "USDT",
"pay_amount": "30000",
"get_amount": "20000",
"side": "PAY",
"promotion_code": "",
"quote_token": "dsafjkdshfjdsjkfah"
}
Stablecoin Order Request Body
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| pay_coin | string | true | none | Currency paid by the user. Supported currencies can be queried from the OTC web stablecoin quote page. |
| get_coin | string | true | none | Currency to be received by the user. Supported currencies can be queried from the OTC web stablecoin quote page. |
| pay_amount | string | true | none | User payment currency amount |
| get_amount | string | true | none | Amount of currency received by the user |
| side | string | true | none | The side returned by the quote endpoint (used for order validation). For backward compatibility, PAY/GET are accepted; new integrations should use the value returned by the quote response. |
| promotion_code | string | false | none | Promotion code (optional) |
| quote_token | string | true | none | Parameter returned by the quote API |
# OtcBankListResponse
{
"code": 0,
"message": "string",
"data": {
"lists": [
{}
]
},
"timestamp": 0
}
OtcBankListResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » lists | array | true | none | Bank card list |
| »» OtcBankListItem | object | false | none | none |
| »»» id | string | true | none | Bank card ID (used when placing an order; the synonymous bank_id field has been consolidated into id) |
| »»» bank_account_name | string | true | none | Bank account name |
| »»» bank_name | string | true | none | Bank name |
| »»» bank_country | string | false | none | Bank country |
| »»» bank_address | string | false | none | Bank address |
| »»» iban | string | false | none | IBAN number |
| »»» swift | string | false | none | SWIFT code |
| »»» remittance_line_number | string | false | none | Remittance routing number |
| »»» agent_bank_name | string | false | none | Correspondent bank name |
| »»» agent_bank_swift | string | false | none | Correspondent bank SWIFT code |
| »»» submit_time | string | false | none | Submission time |
| »»» update_time | string | false | none | Update time |
| »»» status | string | false | none | Status |
| »»» is_default | integer | false | none | Whether it is the default bank card. 1 - Yes, 0 - No |
| »» timestamp | integer | true | none | none |
# OtcOrderDetailResponse
{
"message": "string",
"code": 0,
"data": {
"order_id": "string",
"uid": "string",
"type": "string",
"fiat_currency": "string",
"fiat_amount": "string",
"crypto_currency": "string",
"crypto_amount": "string",
"rate": "string",
"bank_account_name": "string",
"bank_name": "string",
"bank_country": "string",
"bank_address": "string",
"bank_account_number_iban": "string",
"swift_code": "string",
"intermediate_bank_name": "string",
"intermediary_bank_swift_code": "string",
"gate_bank_account_name": "string",
"gate_bank_name": "string",
"gate_bank_country": "string",
"gate_bank_address": "string",
"gate_bank_account_number_iban": "string",
"gate_swift_code": "string",
"gate_intermediary_bank_name": "string",
"gate_intermediary_bank_swift_code": "string",
"gate_transfer_remark": "string",
"gate_reference_code": "string",
"status": "string",
"create_time": "string"
}
}
OtcOrderDetailResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| message | string | true | none | none |
| code | integer | true | none | none |
| data | object | true | none | none |
| » order_id | string | true | none | Order ID |
| » uid | string | true | none | User ID |
| » type | string | true | none | Order Type |
| » fiat_currency | string | true | none | Fiat currency |
| » fiat_amount | string | true | none | Fiat amount |
| » crypto_currency | string | true | none | Digital currency |
| » crypto_amount | string | true | none | Cryptocurrency amount |
| » rate | string | true | none | Exchange rate |
| » bank_account_name | string | false | none | User payment/receiving name |
| » bank_name | string | false | none | User payment/receiving bank name |
| » bank_country | string | false | none | User payment/receiving bank country |
| » bank_address | string | false | none | User payment/receiving bank address |
| » bank_account_number_iban | string | false | none | User payment/receiving bank account number/IBAN |
| » swift_code | string | false | none | User payment/receiving bank SWIFT code |
| » intermediate_bank_name | string | false | none | User payment/receiving intermediary bank name |
| » intermediary_bank_swift_code | string | false | none | User payment/receiving intermediary bank SWIFT code |
| » gate_bank_account_name | string | false | none | Gate beneficiary name, shown for BUY only |
| » gate_bank_name | string | false | none | Gate beneficiary bank name, shown for BUY only |
| » gate_bank_country | string | false | none | Gate beneficiary bank country, shown for BUY only |
| » gate_bank_address | string | false | none | Gate beneficiary bank address, shown for BUY only |
| » gate_bank_account_number_iban | string | false | none | Gate beneficiary bank account number/IBAN, shown for BUY only |
| » gate_swift_code | string | false | none | Gate beneficiary bank SWIFT code, shown for BUY only |
| » gate_intermediary_bank_name | string | false | none | Gate beneficiary intermediary bank name, shown for BUY only |
| » gate_intermediary_bank_swift_code | string | false | none | Gate beneficiary intermediary bank SWIFT code, shown for BUY only |
| » gate_transfer_remark | string | false | none | Transfer remark (mutually exclusive with gate_reference_code; empty when a BUY deposit order has a reference code), shown for BUY only |
| » gate_reference_code | string | false | none | Be sure to include the reference code when making the transfer so that your order can be processed promptly. (Mutually exclusive with gate_transfer_remark.) |
| » status | string | true | none | Status |
| » create_time | string | true | none | Created time |
# OtcOrderListResponse
{
"code": 0,
"message": "string",
"data": {
"pn": 0,
"ps": 0,
"total_pn": 0,
"count": 0,
"list": [
{}
]
}
}
OtcOrderListResponse
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| code | integer | true | none | none |
| message | string | true | none | none |
| data | object | true | none | none |
| » pn | integer | true | none | none |
| » ps | integer | true | none | none |
| » total_pn | integer | true | none | none |
| » count | integer | true | none | none |
| » list | array | true | none | none |
| »» OtcOrderListItem | object | false | none | none |
| »»» time | string | false | none | Current time |
| »»» timestamp | integer | false | none | Current timestamp |
| »»» order_id | string | false | none | orderId |
| »»» trade_no | string | false | none | Trade number |
| »»» type | string | false | none | BUY deposit / SELL withdrawal |
| »»» status | string | false | none | Order status |
| »»» fiat_currency | string | false | none | Fiat currency |
| »»» fiat_currency_info | object | false | none | none |
| »»»» name | string | true | none | Name |
| »»»» icon | string | true | none | Image |
| »»» fiat_amount | string | false | none | Fiat amount |
| »»» crypto_currency | string | false | none | Digital currency |
| »»» crypto_currency_info | object | false | none | none |
| »»»» name | string | true | none | none |
| »»»» icon | string | true | none | none |
| »»» crypto_amount | string | false | none | Cryptocurrency amount |
| »»» rate | string | false | none | Exchange rate |
| »»» promotion_code | string | false | none | Promotion code |
# OtcBankPersonalSupplementMultipartRequest
{}
Personal supplement multipart/form-data. File field names are fixed: id_document_front, id_document_back, address_proof (aligned with the checklist code); the optional string field relationship_proof (JSON text) is merged with the upload result.
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| bank_id | string | true | none | none |
| id_document_front | string | false | none | ID document front-side file content (multipart file field, binary/Base64) |
| id_document_back | string | false | none | ID document back-side file content (multipart file field, binary/Base64) |
| address_proof | string | false | none | Proof-of-address file content (multipart file field, binary/Base64) |
| relationship_proof | string | false | none | Optional. JSON string of relationship_proof. |
anyOf
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
or
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| None | object | false | none | none |
# OtcQuoteRequest
{
"side": "PAY",
"pay_coin": "USDT",
"get_coin": "USD",
"pay_amount": "30000",
"get_amount": "30000",
"create_quote_token": "0",
"promotion_code": ""
}
Fiat and Stablecoin Quote Request Body
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| side | string | true | none | PAY: specify the payment amount (pay_amount is required); GET: specify the receive amount (get_amount is required). |
| pay_coin | string | true | none | Payment currency. Supported currencies are available on the OTC web quote page. |
| get_coin | string | true | none | Receive currency. Supported currencies are available on the OTC web quote page. |
| pay_amount | string | false | none | User payment currency amount |
| get_amount | string | false | none | Amount of currency received by the user |
| create_quote_token | string | false | none | Create quote token: 0: quote preview only; 1: generate quote token for order placement. |
| promotion_code | string | false | none | Promotion code |
# OtcUploadPreUploadData
{
"file_key": "string",
"url": "string",
"fields": {
"key": "string",
"Content-Type": "string",
"X-Amz-Credential": "string",
"X-Amz-Algorithm": "string",
"X-Amz-Date": "string",
"Policy": "string",
"X-Amz-Signature": "string"
},
"expires_in": 0
}
Pre-upload credentials and S3 direct-upload parameters
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| file_key | string | true | none | Base64 temporary object path; pass back unchanged on business submit—do not decode |
| url | string | true | none | S3 direct upload URL |
| fields | OtcUploadPreUploadPolicyFields | true | none | S3 POST Policy signature fields; send unchanged as form-data during direct upload |
| expires_in | integer | true | none | Policy validity period in seconds; currently 5400 (90 minutes); aligns with expiration in fields.Policy; call this endpoint again after expiry |
# OtcMarkOrderPaidRequest
{
"order_id": "203",
"client_order_id": "",
"payment_receipt_file_key": "b3RjX3RlbXAvMTIzNDU2Nzg5MC9nZW5lcmFsLzIwMjYwODMxMjEwMDEyMzQ1Njc4LnBuZw==",
"payment_receipt": ""
}
Request body for marking a fiat order as paid (deposit confirmation). Must include the user's payment receipt (consistent with §3.2).
payment_receipt_file_key is required; the order primary key on this path is order_id. When accessed via the Pay gateway using client_order_id, the gateway's rewritten field takes precedence.
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| order_id | string | true | none | Order ID |
| client_order_id | string | false | none | Client order ID (used by some gateway/Inner Pay paths, optional) |
| payment_receipt_file_key | string | true | none | User payment receipt: required. Recommended: call POST /otc/upload/pre_upload (scene=general) to upload to the temporary bucket, then pass the returned base64 file_key unchanged (do not decode); the server moves to the production bucket and persists. Still compatible with legacy production-bucket base64 keys. Single file; jpg/jpeg/png/pdf; ≤10MB. |
| payment_receipt | string | false | none | Alias compatible with payment_receipt_file_key (depends on the gateway's external field name) |
# OtcUploadPreUploadPolicyFields
{
"key": "string",
"Content-Type": "string",
"X-Amz-Credential": "string",
"X-Amz-Algorithm": "string",
"X-Amz-Date": "string",
"Policy": "string",
"X-Amz-Signature": "string"
}
S3 POST Policy signature fields; send unchanged as form-data during direct upload
# Properties
| Name | Type | Required | Restrictions | Description |
|---|---|---|---|---|
| key | string | true | none | Plaintext temporary object path, identical to base64_decode(file_key) |
| Content-Type | string | true | none | Must match the decoded content_type from the pre-upload request |
| X-Amz-Credential | string | true | none | AWS temporary credential and scope; submit them unchanged during direct upload |
| X-Amz-Algorithm | string | true | none | AWS signing algorithm; submit it unchanged during direct upload |
| X-Amz-Date | string | true | none | AWS signing timestamp; submit it unchanged during direct upload |
| Policy | string | true | none | Base64-encoded S3 POST Policy; submit it unchanged during direct upload |
| X-Amz-Signature | string | true | none | S3 POST Policy signature; submit it unchanged during direct upload |