Skip to content

# Account

Retrieve user account information

# Retrieve user account information

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 = '/account/detail'
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="/account/detail"
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 /account/detail

Retrieve user account information

Example responses

200 Response

{
  "user_id": 1667201533,
  "ip_whitelist": [
    "127.0.0.1"
  ],
  "currency_pairs": [
    "USDT_BTC"
  ],
  "key": {
    "mode": 1
  },
  "tier": 2,
  "copy_trading_role": 1
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Successfully retrieved AccountDetail

Response Schema

Status Code 200

AccountDetail

Account details

Type Constraints
AccountDetail

Properties

Name Type Required Constraints Description
ip_whitelist array false IP Whitelist
currency_pairs array false Trading pair whitelist
user_id integer(int64) false User ID
tier integer(int64) false User VIP level
key object false API Key details
copy_trading_role integer(int32) false User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower

ip_whitelist

IP Whitelist

Type Constraints
array

ip_whitelist / items

Type Constraints
string

currency_pairs

Trading pair whitelist

Type Constraints
array

currency_pairs / items

Type Constraints
string

key

API Key details

Type Constraints
object

Properties

Name Type Required Constraints Description
mode integer(int32) false Mode: 1 - Classic mode, 2 - Legacy unified mode

WARNING

To perform this operation, you must be authenticated by API key and secret

# Query All Main Account Key Information

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 = '/account/main_keys'
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="/account/main_keys"
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 /account/main_keys

Query All Main Account Key Information

Example responses

200 Response

[
  {
    "state": 1,
    "mode": 1,
    "name": "test1",
    "user_id": 1,
    "perms": [
      {
        "name": "account",
        "read_only": false
      },
      {
        "name": "spot",
        "read_only": false
      }
    ],
    "ip_whitelist": [],
    "currency_pairs": [
      "BTC_USD",
      "ETH_USD"
    ],
    "key": "c5dcfbf1f3a7*****",
    "created_at": 1753030929,
    "update_at": 1756300567,
    "last_access": 1753030929
  },
  {
    "state": 1,
    "mode": 1,
    "name": "test2",
    "user_id": 1,
    "perms": [
      {
        "name": "spot",
        "read_only": false
      },
      {
        "name": "account",
        "read_only": false
      }
    ],
    "ip_whitelist": [],
    "currency_pairs": [
      "BTC_USD",
      "ETH_USD"
    ],
    "key": "52fd0035f665*****",
    "created_at": 1753897991,
    "update_at": 1756300567,
    "last_access": 1753897991
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) Successfully retrieved AccountKeyInfo

Response Schema

Status Code 200

AccountKeyInfo

Main Account API Key Information

Type Constraints
AccountKeyInfo

Properties

Name Type Required Constraints Description
state integer(int32) false API key status: 1 - Normal, 2 - Locked, 3 - Frozen (can only be modified, default is 1 when creating)API Key Status: 1 - Normal, 2 - Locked, 3 - Frozen (can only be modified; default is 1 upon creation)
mode integer(int32) false User mode: 1 - Classic mode, 2 - Legacy unified mode (can only be specified when creating, cannot be modified)
name string false API Key Remark
currency_pairs array false Trading Pair Whitelist, Maximum 30 Pairs
user_id integer(int64) false User ID
ip_whitelist array false IP Whitelist
perms array false
key object false API Key details
created_at string false readOnly: true Created time
updated_at string false readOnly: true Last Update Time
last_access string false readOnly: true Last Access Time

currency_pairs

Trading Pair Whitelist, Maximum 30 Pairs

Type Constraints
array

currency_pairs / items

Type Constraints
string

ip_whitelist

IP Whitelist

Type Constraints
array

ip_whitelist / items

Type Constraints
string

perms

Type Constraints
array

perms / items

Type Constraints
object

Properties

Name Type Required Constraints Description
name string false Permission function name (cleared if no value is provided)

- wallet: wallet
- spot: spot/margin
- futures: perpetual contract
- delivery: delivery contract
- earn: earn
- custody: custody
- options: options
- account: account information
- loan: lending
- margin: margin
- unified: unified account
- copy: copy trading
- pilot: pilot
- otc: otc
- alpha: alpha
- crossx: cross-exchange
- tradfi_spot: stocks
- cfd: CFD
- cfd_copy: CFD lead trading
- stock_copy: stock lead trading
- sub_accounts: sub-accounts
read_only boolean false Read Only

key

API Key details

Type Constraints
object

Properties

Name Type Required Constraints Description
mode integer(int32) false Mode: 1 - Classic mode, 2 - Legacy unified mode

WARNING

To perform this operation, you must be authenticated by API key and secret

# Get user transaction rate limit information

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 = '/account/rate_limit'
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="/account/rate_limit"
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 /account/rate_limit

Get user transaction rate limit information

This interface is not yet open for use

Example responses

200 Response

[
  {
    "type": "spot",
    "tier": "1",
    "ratio": "0",
    "main_ratio": "0",
    "updated_at": "1728230400"
  },
  {
    "type": "futures",
    "tier": "1",
    "ratio": "0",
    "main_ratio": "0",
    "updated_at": "1728230400"
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) Successfully retrieved [AccountRateLimit]

Response Schema

Status Code 200

AccountRateLimit

Account rate limit

Type Constraints
array

items

Type Constraints
AccountRateLimit

Properties

Name Type Required Constraints Description
tier string false readOnly: true Frequency limit level (For detailed frequency limit rules, see Transaction ratio frequency limit)
ratio string false Fill rate
main_ratio string false readOnly: true Total fill ratio of main account
updated_at string false readOnly: true Update time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Query STP user groups created by the user

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 = '/account/stp_groups'
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="/account/stp_groups"
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 /account/stp_groups

Query STP user groups created by the user

Only query STP user groups created by the current main account

Parameters

Name In Type Required Description
name query string false Fuzzy search by name

Example responses

200 Response

[
  {
    "id": 123435,
    "name": "group",
    "create_time": 1548000000,
    "creator_id": 10000
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) List retrieved successfully [StpGroup]

Response Schema

Status Code 200

Type Constraints
array

items

Type Constraints
StpGroup required: ["name"]

Properties

Name Type Required Constraints Description
id integer(int64) false readOnly: true STP Group ID
name string true STP Group name
creator_id integer(int64) false readOnly: true Creator ID
create_time integer(int64) false readOnly: true Created time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Create STP user group

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 = '/account/stp_groups'
query_param = ''
body='{"name":"stp_name"}'
# 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="/account/stp_groups"
query_param=""
body_param='{"name":"stp_name"}'
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 /account/stp_groups

Create STP user group

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

Body parameter

{
  "name": "stp_name"
}

Parameters

Name In Type Required Description
body body StpGroup true none
id body integer(int64) false STP Group ID
name body string true STP Group name
creator_id body integer(int64) false Creator ID
create_time body integer(int64) false Created time

# Request Body Schema

Type Constraints
StpGroup required: ["name"]

Properties

Name Type Required Constraints Description
id integer(int64) false readOnly: true STP Group ID
name string true STP Group name
creator_id integer(int64) false readOnly: true Creator ID
create_time integer(int64) false readOnly: true Created time

Example responses

200 Response

{
  "id": 123435,
  "name": "group",
  "create_time": 1548000000,
  "creator_id": 10000
}

Responses

Status Meaning Description Schema
200 OK (opens new window) User added successfully, returning current users in the STP group StpGroup

Response Schema

Status Code 200

Type Constraints
StpGroup required: ["name"]

Properties

Name Type Required Constraints Description
id integer(int64) false readOnly: true STP Group ID
name string true STP Group name
creator_id integer(int64) false readOnly: true Creator ID
create_time integer(int64) false readOnly: true Created time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Query users in the STP user group

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 = '/account/stp_groups/1/users'
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="/account/stp_groups/1/users"
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 /account/stp_groups/{stp_id}/users

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

Parameters

Name In Type Required Description
stp_id path integer(int64) true STP Group ID

Example responses

200 Response

[
  {
    "user_id": 10000,
    "stp_id": 1,
    "create_time": 1548000000
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) List retrieved successfully [StpGroupUser]

Response Schema

Status Code 200

Type Constraints
array

items

Type Constraints
StpGroupUser

Properties

Name Type Required Constraints Description
user_id integer(int64) false User ID
stp_id integer(int64) false readOnly: true STP Group ID
create_time integer(int64) false readOnly: true Created time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Add users to the STP user group

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 = '/account/stp_groups/1/users'
query_param = ''
body='[1,2,3]'
# 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="/account/stp_groups/1/users"
query_param=""
body_param='[1,2,3]'
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 /account/stp_groups/{stp_id}/users

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

Body parameter

[
  1,
  2,
  3
]

Parameters

Name In Type Required Description
stp_id path integer(int64) true STP Group ID
body body AddSTPGroupUsersRequest true User ID

# Request Body Schema

Type Constraints
AddSTPGroupUsersRequest

items

Type Constraints
integer(int64)

Example responses

200 Response

[
  {
    "user_id": 10000,
    "stp_id": 1,
    "create_time": 1548000000
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) User added successfully, returning current users in the STP group [StpGroupUser]

Response Schema

Status Code 200

Type Constraints
array

items

Type Constraints
StpGroupUser

Properties

Name Type Required Constraints Description
user_id integer(int64) false User ID
stp_id integer(int64) false readOnly: true STP Group ID
create_time integer(int64) false readOnly: true Created time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Delete users from the STP user group

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 = '/account/stp_groups/1/users'
query_param = 'user_id=1'
# for `gen_sign` implementation, refer to section `Authentication` above
sign_headers = gen_sign('DELETE', prefix + url, query_param)
headers.update(sign_headers)
r = requests.request('DELETE', 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="DELETE"
url="/account/stp_groups/1/users"
query_param="user_id=1"
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"

DELETE /account/stp_groups/{stp_id}/users

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

Parameters

Name In Type Required Description
stp_id path integer(int64) true STP Group ID
user_id query integer(int64) true STP user IDs, multiple IDs can be separated by commas

Example responses

200 Response

[
  {
    "user_id": 10000,
    "stp_id": 1,
    "create_time": 1548000000
  }
]

Responses

Status Meaning Description Schema
200 OK (opens new window) Users deleted successfully, returns current users in the STP group [StpGroupUser]

Response Schema

Status Code 200

Type Constraints
array

items

Type Constraints
StpGroupUser

Properties

Name Type Required Constraints Description
user_id integer(int64) false User ID
stp_id integer(int64) false readOnly: true STP Group ID
create_time integer(int64) false readOnly: true Created time

WARNING

To perform this operation, you must be authenticated by API key and secret

# Query GT fee deduction configuration

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 = '/account/debit_fee'
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="/account/debit_fee"
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 /account/debit_fee

Query GT fee deduction configuration

Query the GT fee deduction configuration for the current account

Example responses

200 Response

{
  "enabled": true
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Success DebitFee

Response Schema

Status Code 200

Type Constraints
DebitFee required: ["enabled"]

Properties

Name Type Required Constraints Description
enabled boolean true Whether GT fee deduction is enabled

WARNING

To perform this operation, you must be authenticated by API key and secret

# Configure GT fee deduction

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 = '/account/debit_fee'
query_param = ''
body='{"enabled":true}'
# 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="/account/debit_fee"
query_param=""
body_param='{"enabled":true}'
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 /account/debit_fee

Configure GT fee deduction

Enable or disable GT fee deduction for the current account

Body parameter

{
  "enabled": true
}

Parameters

Name In Type Required Description
body body DebitFee true none
enabled body boolean true Whether GT fee deduction is enabled

# Request Body Schema

Type Constraints
DebitFee required: ["enabled"]

Properties

Name Type Required Constraints Description
enabled boolean true Whether GT fee deduction is enabled

Responses

Status Meaning Description Schema
200 OK (opens new window) Success None

WARNING

To perform this operation, you must be authenticated by API key and secret

# Schemas

# AccountRateLimit

{
  "tier": "string",
  "ratio": "string",
  "main_ratio": "string",
  "updated_at": "string"
}

Type Constraints
object

Properties

Name Type Required Constraints Description
tier string false readOnly: true Frequency limit level (For detailed frequency limit rules, see Transaction ratio frequency limit)
ratio string false Fill rate
main_ratio string false readOnly: true Total fill ratio of main account
updated_at string false readOnly: true Update time

# DebitFee

{
  "enabled": true
}

Type Constraints
object required: ["enabled"]

Properties

Name Type Required Constraints Description
enabled boolean true Whether GT fee deduction is enabled

# AddSTPGroupUsersRequest

[
  0
]

Type Constraints
array

items

Type Constraints
integer(int64)

# StpGroup

{
  "id": 0,
  "name": "string",
  "creator_id": 0,
  "create_time": 0
}

Type Constraints
object required: ["name"]

Properties

Name Type Required Constraints Description
id integer(int64) false readOnly: true STP Group ID
name string true STP Group name
creator_id integer(int64) false readOnly: true Creator ID
create_time integer(int64) false readOnly: true Created time

# StpGroupUser

{
  "user_id": 0,
  "stp_id": 0,
  "create_time": 0
}

Type Constraints
object

Properties

Name Type Required Constraints Description
user_id integer(int64) false User ID
stp_id integer(int64) false readOnly: true STP Group ID
create_time integer(int64) false readOnly: true Created time

# AccountKeyInfo

{
  "state": 0,
  "mode": 0,
  "name": "string",
  "currency_pairs": [
    "string"
  ],
  "user_id": 0,
  "ip_whitelist": [
    "string"
  ],
  "perms": [
    {
      "name": "string",
      "read_only": true
    }
  ],
  "key": {
    "mode": 0
  },
  "created_at": "string",
  "updated_at": "string",
  "last_access": "string"
}

AccountKeyInfo

Main Account API Key Information

Type Constraints
object

Properties

Name Type Required Constraints Description
state integer(int32) false API key status: 1 - Normal, 2 - Locked, 3 - Frozen (can only be modified, default is 1 when creating)API Key Status: 1 - Normal, 2 - Locked, 3 - Frozen (can only be modified; default is 1 upon creation)
mode integer(int32) false User mode: 1 - Classic mode, 2 - Legacy unified mode (can only be specified when creating, cannot be modified)
name string false API Key Remark
currency_pairs array false Trading Pair Whitelist, Maximum 30 Pairs
user_id integer(int64) false User ID
ip_whitelist array false IP Whitelist
perms array false
key object false API Key details
created_at string false readOnly: true Created time
updated_at string false readOnly: true Last Update Time
last_access string false readOnly: true Last Access Time

currency_pairs

Trading Pair Whitelist, Maximum 30 Pairs

Type Constraints
array

currency_pairs / items

Type Constraints
string

ip_whitelist

IP Whitelist

Type Constraints
array

ip_whitelist / items

Type Constraints
string

perms

Type Constraints
array

perms / items

Type Constraints
object

Properties

Name Type Required Constraints Description
name string false Permission function name (cleared if no value is provided)

- wallet: wallet
- spot: spot/margin
- futures: perpetual contract
- delivery: delivery contract
- earn: earn
- custody: custody
- options: options
- account: account information
- loan: lending
- margin: margin
- unified: unified account
- copy: copy trading
- pilot: pilot
- otc: otc
- alpha: alpha
- crossx: cross-exchange
- tradfi_spot: stocks
- cfd: CFD
- cfd_copy: CFD lead trading
- stock_copy: stock lead trading
- sub_accounts: sub-accounts
read_only boolean false Read Only

key

API Key details

Type Constraints
object

Properties

Name Type Required Constraints Description
mode integer(int32) false Mode: 1 - Classic mode, 2 - Legacy unified mode

# AccountDetail

{
  "ip_whitelist": [
    "string"
  ],
  "currency_pairs": [
    "string"
  ],
  "user_id": 0,
  "tier": 0,
  "key": {
    "mode": 0
  },
  "copy_trading_role": 0
}

AccountDetail

Account details

Type Constraints
object

Properties

Name Type Required Constraints Description
ip_whitelist array false IP Whitelist
currency_pairs array false Trading pair whitelist
user_id integer(int64) false User ID
tier integer(int64) false User VIP level
key object false API Key details
copy_trading_role integer(int32) false User role: 0 - Normal user 1 - Copy trading leader 2 - Copy trading follower 3 - Both leader and follower

ip_whitelist

IP Whitelist

Type Constraints
array

ip_whitelist / items

Type Constraints
string

currency_pairs

Trading pair whitelist

Type Constraints
array

currency_pairs / items

Type Constraints
string

key

API Key details

Type Constraints
object

Properties

Name Type Required Constraints Description
mode integer(int32) false Mode: 1 - Classic mode, 2 - Legacy unified mode