All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| p2p_merchant_account_get_user_info | POST /p2p/merchant/account/get_user_info | Get account information |
| p2p_merchant_account_get_counterparty_user_info | POST /p2p/merchant/account/get_counterparty_user_info | Get counterparty information |
| p2p_merchant_account_get_myself_payment | POST /p2p/merchant/account/get_myself_payment | Get payment method list |
| p2p_merchant_account_set_merchant_work_hours | POST /p2p/merchant/account/set_merchant_work_hours | Set merchant working status and custom working hours |
| p2p_merchant_transaction_get_pending_transaction_list | POST /p2p/merchant/transaction/get_pending_transaction_list | Get pending orders |
| p2p_merchant_transaction_get_completed_transaction_list | POST /p2p/merchant/transaction/get_completed_transaction_list | Get all/historical orders |
| p2p_merchant_transaction_get_transaction_details | POST /p2p/merchant/transaction/get_transaction_details | Query order details |
| p2p_merchant_transaction_confirm_payment | POST /p2p/merchant/transaction/confirm-payment | Confirm payment |
| p2p_merchant_transaction_confirm_receipt | POST /p2p/merchant/transaction/confirm-receipt | Confirm receipt |
| p2p_merchant_transaction_cancel | POST /p2p/merchant/transaction/cancel | Cancel order |
| p2p_merchant_books_place_biz_push_order | POST /p2p/merchant/books/place_biz_push_order | Publish ad order |
| p2p_merchant_books_ads_update_status | POST /p2p/merchant/books/ads_update_status | Update ad status |
| p2p_merchant_books_ads_detail | POST /p2p/merchant/books/ads_detail | Query ad details |
| p2p_merchant_books_my_ads_list | POST /p2p/merchant/books/my_ads_list | Get my ad list |
| p2p_merchant_books_ads_list | POST /p2p/merchant/books/ads_list | Get Advertisement List |
| p2p_merchant_chat_get_chats_list | POST /p2p/merchant/chat/get_chats_list | Get chat history |
| p2p_merchant_chat_send_chat_message | POST /p2p/merchant/chat/send_chat_message | Send text message |
| p2p_merchant_chat_upload_chat_file | POST /p2p/merchant/chat/upload_chat_file | Upload chat file |
| p2p_merchant_chat_pre_upload_chat_file | POST /p2p/merchant/chat/pre_upload_chat_file | Pre-upload chat file |
P2pMerchantUserInfoResponse p2p_merchant_account_get_user_info()
Get account information
To query the spot account balance, use the Spot API GET /spot/accounts.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
try:
# Get account information
api_response = api_instance.p2p_merchant_account_get_user_info()
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_account_get_user_info: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pCounterpartyUserInfoResponse p2p_merchant_account_get_counterparty_user_info(get_counterparty_user_info_request)
Get counterparty information
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_counterparty_user_info_request = gate_api.GetCounterpartyUserInfoRequest() # GetCounterpartyUserInfoRequest |
try:
# Get counterparty information
api_response = api_instance.p2p_merchant_account_get_counterparty_user_info(get_counterparty_user_info_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_account_get_counterparty_user_info: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_counterparty_user_info_request | GetCounterpartyUserInfoRequest |
P2pCounterpartyUserInfoResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pPaymentMethodsResponse p2p_merchant_account_get_myself_payment(get_myself_payment_request=get_myself_payment_request)
Get payment method list
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_myself_payment_request = gate_api.GetMyselfPaymentRequest() # GetMyselfPaymentRequest | (optional)
try:
# Get payment method list
api_response = api_instance.p2p_merchant_account_get_myself_payment(get_myself_payment_request=get_myself_payment_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_account_get_myself_payment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_myself_payment_request | GetMyselfPaymentRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pMerchantWorkHoursResponse p2p_merchant_account_set_merchant_work_hours(set_merchant_work_hours_request)
Set merchant working status and custom working hours
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
set_merchant_work_hours_request = gate_api.SetMerchantWorkHoursRequest() # SetMerchantWorkHoursRequest |
try:
# Set merchant working status and custom working hours
api_response = api_instance.p2p_merchant_account_set_merchant_work_hours(set_merchant_work_hours_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_account_set_merchant_work_hours: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| set_merchant_work_hours_request | SetMerchantWorkHoursRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionListResponse p2p_merchant_transaction_get_pending_transaction_list(get_pending_transaction_list_request)
Get pending orders
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_pending_transaction_list_request = gate_api.GetPendingTransactionListRequest() # GetPendingTransactionListRequest |
try:
# Get pending orders
api_response = api_instance.p2p_merchant_transaction_get_pending_transaction_list(get_pending_transaction_list_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_get_pending_transaction_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_pending_transaction_list_request | GetPendingTransactionListRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionListResponse p2p_merchant_transaction_get_completed_transaction_list(get_completed_transaction_list_request)
Get all/historical orders
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_completed_transaction_list_request = gate_api.GetCompletedTransactionListRequest() # GetCompletedTransactionListRequest |
try:
# Get all/historical orders
api_response = api_instance.p2p_merchant_transaction_get_completed_transaction_list(get_completed_transaction_list_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_get_completed_transaction_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_completed_transaction_list_request | GetCompletedTransactionListRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionDetailResponse p2p_merchant_transaction_get_transaction_details(get_transaction_details_request)
Query order details
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_transaction_details_request = gate_api.GetTransactionDetailsRequest() # GetTransactionDetailsRequest |
try:
# Query order details
api_response = api_instance.p2p_merchant_transaction_get_transaction_details(get_transaction_details_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_get_transaction_details: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_transaction_details_request | GetTransactionDetailsRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionActionResponse p2p_merchant_transaction_confirm_payment(confirm_payment)
Confirm payment
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
confirm_payment = gate_api.ConfirmPayment() # ConfirmPayment |
try:
# Confirm payment
api_response = api_instance.p2p_merchant_transaction_confirm_payment(confirm_payment)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_confirm_payment: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| confirm_payment | ConfirmPayment |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionActionResponse p2p_merchant_transaction_confirm_receipt(confirm_receipt)
Confirm receipt
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
confirm_receipt = gate_api.ConfirmReceipt() # ConfirmReceipt |
try:
# Confirm receipt
api_response = api_instance.p2p_merchant_transaction_confirm_receipt(confirm_receipt)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_confirm_receipt: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| confirm_receipt | ConfirmReceipt |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pTransactionActionResponse p2p_merchant_transaction_cancel(cancel_order)
Cancel order
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
cancel_order = gate_api.CancelOrder() # CancelOrder |
try:
# Cancel order
api_response = api_instance.p2p_merchant_transaction_cancel(cancel_order)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_transaction_cancel: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| cancel_order | CancelOrder |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pMerchantBooksPlaceBizPushOrderResponse p2p_merchant_books_place_biz_push_order(place_biz_push_order)
Publish ad order
When publishing or editing an advertisement, trade_tips and auto_reply go through off-platform traffic diversion risk control; when hit, the advertisement is not saved, and code 70305102 with data.risk_event is returned.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
place_biz_push_order = gate_api.PlaceBizPushOrder() # PlaceBizPushOrder |
try:
# Publish ad order
api_response = api_instance.p2p_merchant_books_place_biz_push_order(place_biz_push_order)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_books_place_biz_push_order: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| place_biz_push_order | PlaceBizPushOrder |
P2pMerchantBooksPlaceBizPushOrderResponse
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pAdsUpdateStatusResponse p2p_merchant_books_ads_update_status(ads_update_status)
Update ad status
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
ads_update_status = gate_api.AdsUpdateStatus() # AdsUpdateStatus |
try:
# Update ad status
api_response = api_instance.p2p_merchant_books_ads_update_status(ads_update_status)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_books_ads_update_status: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| ads_update_status | AdsUpdateStatus |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pAdDetailResponse p2p_merchant_books_ads_detail(ads_detail_request)
Query ad details
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
ads_detail_request = gate_api.AdsDetailRequest() # AdsDetailRequest |
try:
# Query ad details
api_response = api_instance.p2p_merchant_books_ads_detail(ads_detail_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_books_ads_detail: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| ads_detail_request | AdsDetailRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pMyAdsListResponse p2p_merchant_books_my_ads_list(my_ads_list_request=my_ads_list_request)
Get my ad list
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
my_ads_list_request = gate_api.MyAdsListRequest() # MyAdsListRequest | (optional)
try:
# Get my ad list
api_response = api_instance.p2p_merchant_books_my_ads_list(my_ads_list_request=my_ads_list_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_books_my_ads_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| my_ads_list_request | MyAdsListRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pAdsListResponse p2p_merchant_books_ads_list(ads_list_request)
Get Advertisement List
Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME EMAIL@ADDRESS Language: en Language-Team: en L@li.org Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
ads_list_request = gate_api.AdsListRequest() # AdsListRequest |
try:
# Get Advertisement List
api_response = api_instance.p2p_merchant_books_ads_list(ads_list_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_books_ads_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| ads_list_request | AdsListRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pChatListResponse p2p_merchant_chat_get_chats_list(get_chats_list_request)
Get chat history
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
get_chats_list_request = gate_api.GetChatsListRequest() # GetChatsListRequest |
try:
# Get chat history
api_response = api_instance.p2p_merchant_chat_get_chats_list(get_chats_list_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_chat_get_chats_list: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| get_chats_list_request | GetChatsListRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pSendChatMessageResponse p2p_merchant_chat_send_chat_message(send_chat_message_request)
Send text message
Text messages go through off-platform traffic diversion risk control. When hit, the API still returns code 0, and data contains risk_type=1 and toast_msg.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
send_chat_message_request = gate_api.SendChatMessageRequest() # SendChatMessageRequest |
try:
# Send text message
api_response = api_instance.p2p_merchant_chat_send_chat_message(send_chat_message_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_chat_send_chat_message: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| send_chat_message_request | SendChatMessageRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pUploadChatFileResponse p2p_merchant_chat_upload_chat_file(upload_chat_file)
Upload chat file
This endpoint is deprecated. Use Pre-upload chat file to obtain credentials for direct S3 uploads.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
upload_chat_file = gate_api.UploadChatFile() # UploadChatFile |
try:
# Upload chat file
api_response = api_instance.p2p_merchant_chat_upload_chat_file(upload_chat_file)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_chat_upload_chat_file: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| upload_chat_file | UploadChatFile |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
P2pPreUploadChatFileResponse p2p_merchant_chat_pre_upload_chat_file(pre_upload_chat_file_request)
Pre-upload chat file
Get credentials for a direct S3 upload of a chat file. Credentials expire after 45 minutes. The maximum file size is 100 MiB. Upload the file using the returned url and fields, placing the file field last in the form. After S3 returns HTTP 204, call send_chat_message with type=1 and the returned file_key as message.
- Api Key Authentication (apiv4):
from __future__ import print_function
import gate_api
from gate_api.exceptions import ApiException, GateApiException
# Defining the host is optional and defaults to https://api.gateio.ws/api/v4
# See configuration.py for a list of all supported configuration parameters.
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure APIv4 key authorization
configuration = gate_api.Configuration(
host = "https://api.gateio.ws/api/v4",
key = "YOU_API_KEY",
secret = "YOUR_API_SECRET"
)
api_client = gate_api.ApiClient(configuration)
# Create an instance of the API class
api_instance = gate_api.P2pApi(api_client)
pre_upload_chat_file_request = gate_api.PreUploadChatFileRequest() # PreUploadChatFileRequest |
try:
# Pre-upload chat file
api_response = api_instance.p2p_merchant_chat_pre_upload_chat_file(pre_upload_chat_file_request)
print(api_response)
except GateApiException as ex:
print("Gate api exception, label: %s, message: %s\n" % (ex.label, ex.message))
except ApiException as e:
print("Exception when calling P2pApi->p2p_merchant_chat_pre_upload_chat_file: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| pre_upload_chat_file_request | PreUploadChatFileRequest |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Project-Id-Version: GateApiTools 1.0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2025-11-12 18:14+0800 PO-Revision-Date: 2019-01-02 17:30+0800 Last-Translator: FULL NAME <EMAIL@ADDRESS> Language: en Language-Team: en <L@li.org> Plural-Forms: nplurals=2; plural=(n !=1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 2.8.0 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]