pprint('') # Grab a Summary of the Portfolio. portfolio_summary = ib_client.portfolio_account_summary( account_id="PAPER_ACCOUNT_ACCOUNT_NUMBER") pprint(portfolio_summary) pprint('') # Grab the Portfolio Ledger. portfolio_ledger = ib_client.portfolio_account_ledger( account_id="PAPER_ACCOUNT_ACCOUNT_NUMBER") pprint(portfolio_ledger) pprint('') # Grab the portfolio Allocation. portfolio_allocation = ib_client.portfolio_account_allocation( account_id="PAPER_ACCOUNT_ACCOUNT_NUMBER") pprint(portfolio_allocation) pprint('') # Grab Portfolio Allocations. portfolio_allocations = ib_client.portfolio_accounts_allocation( account_ids="PAPER_ACCOUNT_ACCOUNT_NUMBER") pprint(portfolio_allocations) pprint('') # Grab Customer Info. customer_info = ib_client.customer_info() pprint(customer_info) pprint('') # Get the number of Unread messages.
portfolio_position = ib_client.portfolio_account_position( account_id=PAPER_ACCOUNT, conid=272093) print(portfolio_position) print('') portfolio_summary = ib_client.portfolio_account_summary( account_id=PAPER_ACCOUNT) print(portfolio_summary) print('') portfolio_ledger = ib_client.portfolio_account_ledger(account_id=PAPER_ACCOUNT) print(portfolio_ledger) print('') portfolio_allocation = ib_client.portfolio_account_allocation( account_id=PAPER_ACCOUNT) print(portfolio_allocation) print('') # Grab Portfolio Allocations. portfolio_allocations = ib_client.portfolio_accounts_allocation( account_ids=PAPER_ACCOUNT) print(portfolio_allocations) print('') ''' CUSTOMER ''' # Grab Customer Info. customer_info = ib_client.customer_info() print(customer_info)