Skip to main content

Accounts

The Account API lets you retrieve your account list, query balances, and check current positions. These are typically the first calls you make before placing any orders.

Available Endpoints

EndpointDescription
Account ListRetrieve all accounts under your credentials
Account BalanceQuery balance, buying power, and cash details for a specific account
Account PositionsRetrieve current holdings and positions for a specific account

Typical Workflow

  1. Call Account List to get your account_id
  2. Use the account_id to query Balance or Positions
  3. Based on balance and positions, decide on your trading strategy
tip

The Account List response includes all accounts associated with your credentials — stock, options, futures, and crypto accounts may have separate Account IDs.

Code Examples

Get Account List

from webull.core.client import ApiClient
from webull.trade.trade_client import TradeClient

api_client = ApiClient("<your_app_key>", "<your_app_secret>", "us")
api_client.add_endpoint("us", "<api_endpoint>")

trade_client = TradeClient(api_client)
res = trade_client.account_v2.get_account_list()
if res.status_code == 200:
accounts = res.json()
for account in accounts:
print(f"Account ID: {account['account_id']}, Type: {account['account_type']}")

Query Account Balance

from webull.core.client import ApiClient
from webull.trade.trade_client import TradeClient

api_client = ApiClient("<your_app_key>", "<your_app_secret>", "us")
api_client.add_endpoint("us", "<api_endpoint>")

trade_client = TradeClient(api_client)
account_id = "<your_account_id>"

res = trade_client.account_v2.get_account_balance(account_id)
if res.status_code == 200:
print("Balance:", res.json())

Query Account Positions

res = trade_client.account_v2.get_account_position(account_id)
if res.status_code == 200:
print("Positions:", res.json())

What's Next

  • Orders — Place and manage orders using your Account ID