Account balance(v2)
Interface description
Function Description: Query account details by account ID.
Applicable objects: Customers who connect to Webull through the OpenApi development platform.
Request URL:
/openapi/account/balance
Request method: GET
Frequency limit: The calling frequency of each AppId is limited to 2 times in 2 seconds.
Parameters
Parameter | Type | Required | Description | Values/Example |
---|---|---|---|---|
account_id | String | Required | Account ID | 863417315629211648 |
Response
Parameter | Type | Required | Description | Values/Example |
---|---|---|---|---|
total_asset_currency | String | Required | Currency | JPY |
total_cash_balance | String | Required | Cash Balance | 485705 |
total_unrealized_profit_loss | String | Required | Open P&L | 227689 |
account_currency_assets | String | Required | []currency_assets | Details |
currency_assets
Parameter | Type | Required | Description | Values/Example |
---|---|---|---|---|
currency | String | Required | Currency | JPY |
cash_balance | String | Required | Cash Balance | 485705 |
buying_power | String | Required | Buying Power | 484551 |
unrealized_profit_loss | String | Required | Open P&L | 227689 |
Request example
- Python
- Java
from webullsdkcore.client import ApiClient
from webullsdktrade.api import API
api_client = ApiClient(your_app_key, your_app_secret, Region.JP.value)
api = API(api_client)
res = api.account_v2.get_account_balance(account_id)
if res.status_code == 200:
print("account_balance=" + json.dumps(res.json(), indent=4))
HttpApiConfig apiConfig = HttpApiConfig.builder()
.appKey(Env.APP_KEY)
.appSecret(Env.APP_SECRET)
.regionId(Region.jp.name())
.build();
TradeApiService apiService = new TradeHttpApiService(apiConfig);
BalanceBase accountBalance = apiService.balanceAccount(accountId, currency);
Response
Cash Account