Account Detail
Interface Description
Function description: Query account details according to account ID, which only contains static information.
URL: /account/profile
Method: GET
Rate limit: The calling frequency of each App ID is limited to 10 times in 30 seconds.
Request Parameters
Parameter | Type | Required fields | Description | Example value |
---|---|---|---|---|
account_id | String | Yes | Account ID | co393b0ab01 |
Response Parameter
Parameter | Type | Description | Example value |
---|---|---|---|
account_number | String | User's crypto account | 5MV06064 |
account_type | String | Account type item: refer to the dictionary value AccountType for the value. | CRYPTO |
account_status | String | AccountStatus |
Request Example
- Python
- Java
from webullpaysdktrade.api import API
from webullpaysdkcore.client import ApiClient
from webullpaysdkcore.common.region import Region
your_app_key = "<your_app_key>"
your_app_secret = "<your_app_secret>"
account_id = "account_id"
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()
print(account_profile)
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey("<your_app_key>")
.appSecret("<your_app_secret>")
.regionId(Region.us.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
AccountDetail accountDetail = apiService.getAccountDetail("your_account_id");
//print
System.out.println(JsonSerializer.toJson(accountDetail, SerializeConfig.builder().underscoresToCamel(true).build()));
Response Example
{
"account_number": "CF53W03JO",
"account_type": "CRYPTO",
"account_status": "NORMAL"
}
Exception Example
{
"error_code": "INVALID_TOKEN",
"message": "401 UNAUTHORIZED \"app_id and account_id not related\""
}