Skip to main content

Get API Key Information

Get the information of the api key. Use the api key pending to be checked to call the endpoint. Both master and sub user's api key are applicable.


Any permission can access this endpoint.

HTTP Request

GET /v5/user/query-api

Request Parameters


Response Parameters

idstringUnique ID. Internal use
notestringThe remark
apiKeystringApi key
readOnlyinteger0:Read and Write. 1:Read only
secretstringAlways ""
permissionsObjectThe types of permission
> ContractTradearrayPermission of contract trade Order, Position
> SpotarrayPermission of spot SpotTrade
> WalletarrayPermission of wallet AccountTransfer, SubMemberTransfer(master account), SubMemberTransferList(sub account), Withdraw(master account)
> OptionsarrayPermission of USDC Contract. It supports trade option and USDC perpetual. OptionsTrade
> Derivativesarray
  • Unified account has this permission by default DerivativesTrade
  • For classic account, it is always []
  • > CopyTradingarrayAlways [] as Master Trader account just use ContractTrade to start CopyTrading
    > BlockTradearrayPermission of blocktrade. Not applicable to subaccount, always []
    > ExchangearrayPermission of exchange ExchangeHistory
    > NFTarrayPermission of NFT NFTQueryProductList. Not applicable to sub account, always []
    > AffiliatearrayPermission of Affiliate. Only affiliate can have this permission, otherwise always []
    ipsarrayIP bound
    typeintegerThe type of api key. 1:personal, 2:connected to the third-party app
    deadlineDayintegerThe remaining valid days of api key. Only for those api key with no IP bound or the password has been changed
    expiredAtdatetimeThe expiry day of the api key. Only for those api key with no IP bound or the password has been changed
    createdAtdatetimeThe create day of the api key
    unifiedintegerDepreciated field
    utaintegerWhether the account to which the account upgrade to unified trade account. 0:regular account; 1:unified trade account
    userIDintegerUser ID
    inviterIDintegerInviter ID (the UID of the account which invited this account to the platform)
    vipLevelstringVIP Level
    mktMakerLevelstringMarket maker level
    affiliateIDintegerAffiliate Id. 0 represents that there is no binding relationship.
    rsaPublicKeystringRsa public key
    isMasterbooleanIf this api key belongs to master account or not
    parentUidstringThe main account uid. Returns "0" when the endpoint is called by main account
    kycLevelstringPersonal account kyc level. LEVEL_DEFAULT, LEVEL_1LEVEL_2
    kycRegionstringPersonal account kyc region

    Request Example

    GET /v5/user/query-api HTTP/1.1
    X-BAPI-TIMESTAMP: 1676430842094

    Response Example

    "retCode": 0,
    "retMsg": "",
    "result": {
    "id": "13770661",
    "note": "readwrite api key",
    "apiKey": "XXXXXX",
    "readOnly": 0,
    "secret": "",
    "permissions": {
    "ContractTrade": [
    "Spot": [
    "Wallet": [
    "Options": [
    "Derivatives": [],
    "CopyTrading": [],
    "BlockTrade": [],
    "Exchange": [],
    "NFT": [],
    "Affiliate": []
    "ips": [
    "type": 1,
    "deadlineDay": 66,
    "expiredAt": "2023-12-22T07:20:25Z",
    "createdAt": "2022-10-16T02:24:40Z",
    "unified": 0,
    "uta": 0,
    "userID": 24617703,
    "inviterID": 0,
    "vipLevel": "No VIP",
    "mktMakerLevel": "0",
    "affiliateID": 0,
    "rsaPublicKey": "",
    "isMaster": true,
    "parentUid": "0",
    "kycLevel": "LEVEL_DEFAULT",
    "kycRegion": ""
    "retExtInfo": {},
    "time": 1697525990798