Skip to content

Latest commit

 

History

History
625 lines (464 loc) · 20.2 KB

File metadata and controls

625 lines (464 loc) · 20.2 KB

gate_api.AccountApi

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_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

get_account_detail

AccountDetail get_account_detail()

Retrieve user account information

Example

  • 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.AccountApi(api_client)

try:
    # Retrieve user account information
    api_response = api_instance.get_account_detail()
    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 AccountApi->get_account_detail: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

AccountDetail

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_account_rate_limit

list[AccountRateLimit] get_account_rate_limit()

Get user transaction rate limit information

Example

  • 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.AccountApi(api_client)

try:
    # Get user transaction rate limit information
    api_response = api_instance.get_account_rate_limit()
    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 AccountApi->get_account_rate_limit: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[AccountRateLimit]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successfully retrieved -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

list_stp_groups

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

Example

  • 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.AccountApi(api_client)
name = 'group' # str | Fuzzy search by name (optional)

try:
    # Query STP user groups created by the user
    api_response = api_instance.list_stp_groups(name=name)
    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 AccountApi->list_stp_groups: %s\n" % e)

Parameters

Name Type Description Notes
name str Fuzzy search by name [optional]

Return type

list[StpGroup]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List retrieved successfully -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

create_stp_group

StpGroup create_stp_group(stp_group)

Create STP user group

Only the main account is allowed to create a new STP user group

Example

  • 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.AccountApi(api_client)
stp_group = gate_api.StpGroup() # StpGroup | 

try:
    # Create STP user group
    api_response = api_instance.create_stp_group(stp_group)
    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 AccountApi->create_stp_group: %s\n" % e)

Parameters

Name Type Description Notes
stp_group StpGroup

Return type

StpGroup

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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_stp_groups_users

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 in the current STP group

Example

  • 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.AccountApi(api_client)
stp_id = 1 # int | STP Group ID

try:
    # Query users in the STP user group
    api_response = api_instance.list_stp_groups_users(stp_id)
    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 AccountApi->list_stp_groups_users: %s\n" % e)

Parameters

Name Type Description Notes
stp_id int STP Group ID

Return type

list[StpGroupUser]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 List retrieved successfully -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

add_stp_group_users

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

Example

  • 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.AccountApi(api_client)
stp_id = 1 # int | STP Group ID
request_body = [[1,2,3]] # list[int] | User ID

try:
    # Add users to the STP user group
    api_response = api_instance.add_stp_group_users(stp_id, request_body)
    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 AccountApi->add_stp_group_users: %s\n" % e)

Parameters

Name Type Description Notes
stp_id int STP Group ID
request_body list[int] User ID

Return type

list[StpGroupUser]

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

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]

delete_stp_group_users

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

Example

  • 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.AccountApi(api_client)
stp_id = 1 # int | STP Group ID
user_id = 1 # int | STP user IDs, multiple IDs can be separated by commas

try:
    # Delete users from the STP user group
    api_response = api_instance.delete_stp_group_users(stp_id, user_id)
    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 AccountApi->delete_stp_group_users: %s\n" % e)

Parameters

Name Type Description Notes
stp_id int STP Group ID
user_id int STP user IDs, multiple IDs can be separated by commas

Return type

list[StpGroupUser]

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

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]

get_debit_fee

DebitFee get_debit_fee()

Query GT fee deduction configuration

Query the GT fee deduction configuration for the current account

Example

  • 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.AccountApi(api_client)

try:
    # Query GT fee deduction configuration
    api_response = api_instance.get_debit_fee()
    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 AccountApi->get_debit_fee: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

DebitFee

Authorization

apiv4

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

set_debit_fee

set_debit_fee(debit_fee)

Configure GT fee deduction

Enable or disable GT fee deduction for the current account

Example

  • 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.AccountApi(api_client)
debit_fee = gate_api.DebitFee() # DebitFee | 

try:
    # Configure GT fee deduction
    api_instance.set_debit_fee(debit_fee)
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 AccountApi->set_debit_fee: %s\n" % e)

Parameters

Name Type Description Notes
debit_fee DebitFee

Return type

void (empty response body)

Authorization

apiv4

HTTP request headers

  • Content-Type: application/json
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 Success -

[Back to top] [Back to API list] [Back to Model list] [Back to README]