Account Ledger
Subscribe to Account Ledger
Request account ledger details for a given account, providing balance and market value data sorted by currency.
Request
sld+{{accountId}}+{"keys":["Key1", "Key2"], "fields":["Field1", "Field2"]}
Properties
The leading topic message indicating a request to subscribe to account ledger details.
The accountId variable indicates the Interactive Brokers account identifier to retrieve ledger details for. Only one accountId may be included per request.
An array of currency keys to filter in. If no value is passed, all currencies are requested. Pass currency identifiers in the format "LedgerListXXX", where XXX is the three-character currency code, or "LedgerListBASE" for the account’s base currency.
Example Values
"LedgerListBASE", "LedgerListUSD", "LedgerListEUR", "LedgerListCAD", "LedgerListCHF"
An array of field names to filter responses. If no values are passed, all fields are returned for all currencies.
Supported Values
"cashbalance", "cashBalanceFXSegment", "commodityMarketValue", "corporateBondsMarketValue", "dividends", "exchangeRate", "funds", "interest", "issueOptionsMarketValue", "marketValue", "moneyFunds", "netLiquidationValue", "optionMarketValue", "realizedPnl", "secondKey", "settledCash", "stockMarketValue", "tBillsMarketValue", "tBondsMarketValue", "unrealizedPnl", "warrantsMarketValue"
Response
A new message is published every 10 seconds until the sld topic is unsubscribed. A given message will only deliver a currency’s field data when a change occurred for that currency in the preceding interval. If no change occurred, the currency’s entry will contain only the currency key and a timestamp.
Note that all currency values of JSON number type will be presented with a fractional component following a decimal point, and may also include an exponential component following an E if sufficiently large.
Properties
Key containing an array of account ledger objects, each representing one currency in the account.
Currency identifier string in the form "LedgerListXXX", where XXX is the three-character currency code, or "LedgerListBASE" for the account’s base currency.
The timestamp reflecting when the currency’s values were retrieved.
The account containing the currency position described by the accompanying data.
Cash balance for the given currency.
Cash balance attributed to the FX segment.
Market value of commodity positions in this currency.
Market value of corporate bond positions in this currency.
Dividends received in this currency.
Exchange rate of this currency relative to the account’s base currency.
Market value of fund positions in this currency.
Accrued interest in this currency.
Market value of issued options in this currency.
Total market value of all positions in this currency.
Market value of money market fund positions in this currency.
Net liquidation value for this currency.
Market value of option positions in this currency.
Realized profit and loss in this currency.
The three-character currency code associated with the key.
Settled cash balance in this currency.
Market value of stock positions in this currency.
Market value of T-bill positions in this currency.
Market value of T-bond positions in this currency.
Unrealized profit and loss in this currency.
Market value of warrant positions in this currency.
Internal use. Returns 0.
Returns the sld topic and accountId.
Unsubscribe from Account Ledger
uld+{{accountId}}+{}
Request to cancel an Account Ledger stream for the given account.
Request
Properties
Unsubscribes the user from account ledger information for the specified account.
The accountId variable indicates the Interactive Brokers account identifier to unsubscribe ledger details for. Only one accountId may be included per request.
Response Example
Unsubscribing from account ledger updates does not deliver any acknowledgement. It would be expected for sld responses to immediately halt.

