All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| get_account_detail | GET /account/detail | Retrieve user account information |
| get_account_main_keys | GET /account/main_keys | Query All Main Account Key Information |
| get_account_rate_limit | GET /account/rate_limit | Get user transaction rate limit information |
| list_stp_groups | GET /account/stp_groups | Query STP user groups created by the user |
| create_stp_group | POST /account/stp_groups | Create STP user group |
| list_stp_groups_users | GET /account/stp_groups/{stp_id}/users | Query users in the STP user group |
| add_stp_group_users | POST /account/stp_groups/{stp_id}/users | Add users to the STP user group |
| delete_stp_group_users | DELETE /account/stp_groups/{stp_id}/users | Delete users from the STP user group |
| get_debit_fee | GET /account/debit_fee | Query GT fee deduction configuration |
| set_debit_fee | POST /account/debit_fee | Configure GT fee deduction |
AccountDetail get_account_detail()
Retrieve user account information
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
try:
# Retrieve user account informationapi_response=api_instance.get_account_detail()
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->get_account_detail: %s\n"%e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved | - |
[Back to top][Back to API list][Back to Model list][Back to README]
AccountKeyInfo get_account_main_keys()
Query All Main Account Key Information
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
try:
# Query All Main Account Key Informationapi_response=api_instance.get_account_main_keys()
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->get_account_main_keys: %s\n"%e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved | - |
[Back to top][Back to API list][Back to Model list][Back to README]
list[AccountRateLimit] get_account_rate_limit()
Get user transaction rate limit information
This interface is not yet open for use
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
try:
# Get user transaction rate limit informationapi_response=api_instance.get_account_rate_limit()
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->get_account_rate_limit: %s\n"%e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Successfully retrieved | - |
[Back to top][Back to API list][Back to Model list][Back to README]
list[StpGroup] list_stp_groups(name=name)
Query STP user groups created by the user
Only query STP user groups created by the current main account
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
name='group'# str | Fuzzy search by name (optional)try:
# Query STP user groups created by the userapi_response=api_instance.list_stp_groups(name=name)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->list_stp_groups: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| name | str | Fuzzy search by name | [optional] |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top][Back to API list][Back to Model list][Back to README]
StpGroup create_stp_group(stp_group)
Create STP user group
Only the main account is allowed to create a new STP user group
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
stp_group=gate_api.StpGroup() # StpGroup | try:
# Create STP user groupapi_response=api_instance.create_stp_group(stp_group)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->create_stp_group: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| stp_group | StpGroup |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | User added successfully, returning current users in the STP group | - |
[Back to top][Back to API list][Back to Model list][Back to README]
list[StpGroupUser] list_stp_groups_users(stp_id)
Query users in the STP user group
Only the main account that created this STP group can query the account ID list of the current STP group
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
stp_id=1# int | STP Group IDtry:
# Query users in the STP user groupapi_response=api_instance.list_stp_groups_users(stp_id)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->list_stp_groups_users: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| stp_id | int | STP Group ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | List retrieved successfully | - |
[Back to top][Back to API list][Back to Model list][Back to README]
list[StpGroupUser] add_stp_group_users(stp_id, request_body)
Add users to the STP user group
- Only the main account that created this STP group can add users to the STP user group - Only accounts under the current main account are allowed, cross-main account is not permitted
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
stp_id=1# int | STP Group IDrequest_body= [[1,2,3]] # list[int] | User IDtry:
# Add users to the STP user groupapi_response=api_instance.add_stp_group_users(stp_id, request_body)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->add_stp_group_users: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| stp_id | int | STP Group ID | |
| request_body | list[int] | User ID |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | User added successfully, returning current users in the STP group | - |
[Back to top][Back to API list][Back to Model list][Back to README]
list[StpGroupUser] delete_stp_group_users(stp_id, user_id)
Delete users from the STP user group
- Only the main account that created this STP group is allowed to delete users from the STP user group - Deletion is limited to accounts under the current main account; cross-account deletion is not permitted
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
stp_id=1# int | STP Group IDuser_id=1# int | STP user IDs, multiple IDs can be separated by commastry:
# Delete users from the STP user groupapi_response=api_instance.delete_stp_group_users(stp_id, user_id)
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->delete_stp_group_users: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| stp_id | int | STP Group ID | |
| user_id | int | STP user IDs, multiple IDs can be separated by commas |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Users deleted successfully, returns current users in the STP group | - |
[Back to top][Back to API list][Back to Model list][Back to README]
DebitFee get_debit_fee()
Query GT fee deduction configuration
Query the GT fee deduction configuration for the current account
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
try:
# Query GT fee deduction configurationapi_response=api_instance.get_debit_fee()
print(api_response)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->get_debit_fee: %s\n"%e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
[Back to top][Back to API list][Back to Model list][Back to README]
set_debit_fee(debit_fee)
Configure GT fee deduction
Enable or disable GT fee deduction for the current account
- Api Key Authentication (apiv4):
from __future__ importprint_functionimportgate_apifromgate_api.exceptionsimportApiException, 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 authorizationconfiguration=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 classapi_instance=gate_api.AccountApi(api_client)
debit_fee=gate_api.DebitFee() # DebitFee | try:
# Configure GT fee deductionapi_instance.set_debit_fee(debit_fee)
exceptGateApiExceptionasex:
print("Gate api exception, label: %s, message: %s\n"% (ex.label, ex.message))
exceptApiExceptionase:
print("Exception when calling AccountApi->set_debit_fee: %s\n"%e)| Name | Type | Description | Notes |
|---|---|---|---|
| debit_fee | DebitFee |
void (empty response body)
- Content-Type: application/json
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | Success | - |
[Back to top][Back to API list][Back to Model list][Back to README]