The OpenAPI service is currently suspended for new applications. We will inform you once the service is restored. Existing users who have already been granted access to the OpenAPI can continue to use it as usual.
跳到主要内容

账户详情

接口说明

  • 功能说明:根据账户id查询账户详情, 只包含静态信息。

  • 适用对象:通过OpenAPI开发平台对接webull的客户。

  • 请求URL:/account/profile

  • 请求方式:GET

  • 频次限制:每个App ID调用频次限制为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.US.value)
api = API(api_client)
response = api.account.get_account_profile(account_id)
if response.status_code == 200:
account_profile = response.json()

响应示例

{
"account_number":
"5MV06064"
"account_type":
"MARGIN"
"account_status":
"NORMAL"
}

异常示例

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