跳至主要内容

賬戶詳情

接口說明

  • 功能說明:根據賬戶id查詢賬戶詳情,只包含靜態信息。

  • 適用對象:通過OpenApi開發平台對接webull的客戶。

  • 請求URL:/account/profile

  • 請求方式:GET

  • 頻次限制:每個AppId調用頻次限制為30秒10次。

請求參數

參數類型是否必填描述示例值
account_idString賬戶id20150320010101001

響應參數

參數類型描述示例值
account_numberString用戶的券商賬號19071234
account_typeString賬戶類項,取值參考字典值AccountTypeCASH
account_statusString賬戶狀態NORMAL-正常;CANCELING-銷戶中;CONVERTING-賬戶類型變更中;CANCELED-已銷戶

請求示例

from webullsdktrade.api import API
from webullsdkcore.client import ApiClient
from webullsdkcore.common.region import Region

api_client = ApiClient(your_app_key, your_app_secret, Region.HK.value)
api = API(api_client)
response = api.account.get_account_profile(account_id)
if response.status_code == 200:
account_profile = response.json()

響應示例

{
"account_number": "10000029",
"account_type": "MARGIN",
"account_status": "NORMAL"
}

異常示例

{
"error_code": "INVALID_TOKEN",
"message": "401 UNAUTHORIZED \"app_id and account_id not related\""
}