Skip to content

Account Balance

Query stock account balance

First, you need login.

In

api.account_balance?

Out

Signature:
    api.account_balance(
        timeout: int = 5000,
        cb: Callable[[shioaji.position.AccountBalance], NoneType] = None,
    )
Docstring: query stock account balance 

In

api.account_balance()

Out

[AccountBalance(acc_balance=123456.0, date='2020-07-16 09:29:13', errmsg='')]

In

acc_balance = api.account_balance()   
df = pd.DataFrame(acc_balance)     
df     

Out

acc_balance date errmsg
123456.0 2020-07-16 09:29:13

Attributes:

acc_balance (float): account balance
date (str): query date
errmsg (str): error message