trade29.sc.SCBridge.get_account_info#

SCBridge.get_account_info(key: str) AccountStatusResponse#

Gets the status of the account position; including name, balance, currency, and alot more.

Given a key, this method gets information on the account selected in the chart on which the SC-dX study with the matching key is applied.

Parameters:
keystr

The key matching the key given to the SC-dX custom study in Sierra Chart.

Returns:
AccountStatusResponse

Examples

>>> from trade29.sc import SCBridge
>>> bridge = SCBridge()
running bridge v0.17.0--------2024/08/08 19:45:33
connecting to sc
starting receiver
starting sender
sc version: 2666, scdx version 208, connection: t29scdx2, keys: xx
>>> ret = bridge.get_account_info(key = "xx") 
>>> ret.trade_account
'T29Test'
>>> ret.is_simulated 
False
>>> ret.currency_code
'USD'
>>> ret.current_cash_balance
100020.0
>>> ret.daily_profit_loss
0.0