Account Balance
Interface Description
Function description: Query account assets according to account id.
Applicable objects: Customers who connect to Webull through the OpenApi development platform.
Request URL: /account/balance
Request method: GET
Frequency limit: The calling frequency of each AppId is limited to 2 times in 2 seconds.
Request Parameters
Parameter | Type | Required fields | Description | Example value |
---|---|---|---|---|
account_id | String | Yes | Account ID | 20150320010101001 |
total_asset_currency | String | No | The currency in which the total assets are denominated: the value refers to Currency in the dictionary value. If it is empty, it defaults to HKD | HKD |
Response Parameter
Parameter | Type | Description | Example value |
---|---|---|---|
account_id | String | Account ID | 13467788 |
total_asset_currency | String | The currency of the total asset denomination, the value refers to Currency in the dictionary value | HKD |
total_asset | String | The total assets of the account: the currency refers to the value of the total_asset_currency field. total_market_value=sum(positions_market_value*exchange rate) | 1247724759.5266750000 |
total_market_value | String | The total market value: the currency refers to the value of the total_asset_currency field. total_asset=sum(net_liquidation_value*exchange rate) | 89038914.5212380000 |
total_cash_balance | String | The total amount of cash: the currency refers to the value of the total_asset_currency field.total_cash_balance=sum(cash_balance*exchange rate) | 1158685845.0054370000 |
margin_utilization_rate | String | Financing utilization: percentage.Parameters reserved. | 1.00 |
account_currency_assets | []Account_Currency_Asset | Account Asset List |
The above exchange rate = the exchange rate at which the currency in Account_Currency_Asset is converted to total_asset_currency.
Account_Currency_Asset
Parameter | Type | Description | Example value |
---|---|---|---|
currency | String | Currency: refer to Currency in the dictionary for the value. net_liquidation_value=positions_market_value+cash_balance+pending_incoming | HKD |
net_liquidation_value | String | Net assets. | 458809435.440000 |
positions_market_value | String | The market value of the position. | 153208546.140000 |
cash_balance | String | Cash balance. | 305600889.300000 |
margin_power | String | Financing buying power. | 305587431.940000 |
cash_power | String | The buying power of the cash account. | 305587431.940000 |
pending_incoming | String | In-transit funds. | 0.000000 |
cash_frozen | String | Frozen funds. | 13457.360000 |
available_withdrawal | String | The withdrawable amount. | 305587431.940000 |
interests_unpaid | String | Interest to be paid. | 0.000000 |
Request Example
- Python
- Java
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_balance(account_id,currency)
if response.status_code == 200:
account_balance = response.json()
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.hk.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
AccountBalance accountBalance = apiService.getAccountBalance(accountId, currency);