3 releases
Uses new Rust 2024
new 0.3.2 | May 4, 2025 |
---|---|
0.3.1 | May 4, 2025 |
0.3.0 | May 4, 2025 |
0.2.1 |
|
0.2.0 |
|
#149 in Date and time
21 downloads per month
84KB
1.5K
SLoC
ibkr-flex-statement-rs
Rust-based InteractiveBrokers (IBKR) flex query result parser (broker statements).
Flex Query Configuration
The Flex query result parser has been developed and tested to parse Flex-based queries that contain the following sections:
Account Information
- ClientAccountID
- AccountType
- CustomerType
- AccountCapabilities
- TradingPermissions
Cash Report
- ClientAccountID
- CurrencyPrimary
- FromDate
- ToDate
- StartingCash
- Commissions
- Deposit/Withdrawals
- DebitCardActivity
- Dividends
- OtherFees
- OtherIncome
- EndingCash
- EndingSettledCash
- BrokerInterest
- BrokerFees
- Deposits
- Withdrawals
- NetTradesSales
- NetTradesPurchases
- TransactionTax
- WithholdingTax
- WithholdingTaxCollected
- NetSecuritiesLentActivitySLB
Interest Accruals
- ClientAccountID
- FromDate
- ToDate
- StartingAccrualBalance
- InterestAccrued
- AccrualReversal
- EndingAccrualBalance
- CurrencyPrimary
Net Asset Value (NAV) in Base
- ClientAccountID
- CurrencyPrimary
- Cash
- Commodities
- DividendAccruals
- InterestAccruals
- Stock
- Funds
- BrokerInterestAccrualsComponent
- BrokerFeesAccrualsComponent
- Total
- ReportDate
Net Stock Position Summary
- ClientAccountID
- CurrencyPrimary
- AssetClass
- Symbol
- Conid
- ListingExchange
- NetShares
Open Positions
Options: Summary
- ClientAccountID
- CurrencyPrimary
- AssetClass
- Symbol
- Conid
- ListingExchange
- ReportDate
- Quantity
- MarkPrice
- PositionValue
- OpenPrice
- CostBasisPrice
- PercentOfNAV
- FifoPnlUnrealized
- Side
- OpenDateTime
- HoldingPeriodDateTime
- AccruedInterest
- CommodityType
Realized and Unrealized Performance Summary in Base
- ClientAccountID
- AssetClass
- Symbol
- Conid
- ListingExchange
- ReportDate
- RealizedShortTermProfit
- RealizedShortTermLoss
- RealizedLongTermProfit
- RealizedLongTermLoss
- TotalRealizedPnl
- UnrealizedProfit
- UnrealizedLoss
- UnrealizedSTProfit
- UnrealizedSTLoss
- UnrealizedLTProfit
- UnrealizedLTLoss
- TotalFifoPnl
Trades
Options: Execution
- ClientAccountID
- CurrencyPrimary
- Symbol
- Conid
- ListingExchange
- TradeID
- ReportDate
- DateTime
- TradeDate
- TransactionType
- Exchange
- Quantity
- TradePrice
- TradeMoney
- Proceeds
- IBCommission
- IBCommissionCurrency
- NetCash
- ClosePrice
- Open/CloseIndicator
- CostBasis
- FifoPnlRealized
- MtmPnl
- OrigTradePrice
- OrigTradeDate
- OrigTradeID
- OrigOrderID
- OrigTransactionID
- Buy/Sell
- IBOrderID
- TransactionID
- IBExecID
- OrderTime
- OpenDateTime
- HoldingPeriodDateTime
- WhenRealized
- WhenReopened
- OrderType
- AccruedInterest
- AssetClass
- BrokerageOrderID
- OrderReference
- IsAPIOrder
- InitialInvestment
Transaction Fees
Options: Summary, Execution
- ClientAccountID
- CurrencyPrimary
- Symbol
- Description
- Conid
- ListingExchange
- Date
- ReportDate
- SettleDate
- Quantity
- OrderID
- TradePrice
Delivery Configuration
Accounts
Format: XML
Period: (Any period works -- I am generally doing "Business Day" but also use yearly and monthly periods).
General Configuration
Profit and Loss: Default
Include Canceled Trades? Yes
Include Currency Rates? No
Include Audit Trail Fields? No
Display Account Alias in Place of Account ID? No
Breakout by Day? No
Date Format: yyyy-MM-dd
Time Format: HH:mm:ss TimeZone
Date/Time Separator: ; (semi-colon)
Dependencies
~1.7–2.4MB
~35K SLoC