Module accounts

Module accounts 

Source
Expand description

Describes items present in an account.

§Account Management

This module provides functionality for managing positions and profit and loss (PnL) information in a trading system. It includes structures and implementations for:

  • Position tracking
  • Daily, unrealized, and realized PnL calculations
  • Family code management
  • Real-time PnL updates for individual positions

Modules§

blocking
Blocking account management API implemented on top of the synchronous client.
types
Domain types for the accounts module

Structs§

AccountMultiValue
Key/value pair returned for a specific account/model code pair.
AccountPortfolioValue
Aggregated valuation details for a single contract within the account.
AccountSummary
Account information as it appears in the TWS’ Account Summary Window
AccountSummaryTags
Constants for account summary tags used in account summary requests. These tags define which account information fields to retrieve.
AccountUpdateTime
Timestamp wrapper for account update streams.
AccountValue
Single account value update emitted by the API.
FamilyCode
Family code assigned to a group of accounts.
PnL
Aggregated profit and loss metrics for the entire account.
PnLSingle
Real-time profit and loss metrics for a single position.
Position
Open position held within the account.
PositionMulti
Position scoped to a specific account and model code.

Enums§

AccountSummaryResult
Result of an account summary request emitted by the Client.
AccountUpdate
Account update events delivered while streaming high-level account data.
AccountUpdateMulti
Account update events scoped to an account/model code pair.
PositionUpdate
Messages emitted while streaming position updates.
PositionUpdateMulti
Messages emitted while streaming model-code scoped position updates.

Functions§

account_summary
Subscribe to account summary updates for a group of accounts.
account_updates
Subscribe to detailed account updates for a specific account.
account_updates_multi
Subscribe to account updates scoped by account and model code.
family_codes
Fetch the account family codes registered with the broker.
managed_accounts
Fetch the list of accounts accessible to the current user.
pnl
Subscribe to real-time daily and unrealized PnL updates for an account.
pnl_single
Subscribe to real-time daily PnL updates for a single contract.
positions
Subscribe to streaming position updates for all accessible accounts.
positions_multi
Subscribe to streaming position updates scoped by account and model code.
server_time
Query the current server time reported by TWS or IB Gateway.