pub enum TransactionCode {
Show 56 variants
Assignment,
Adjustment,
Allocation,
AutoExercise,
AutoFx,
AwayTrade,
BuyIn,
BorrowFee,
Cancelled,
Closing,
CashDelivery,
ComplexPosition,
Correction,
Crossing,
DualAgent,
Etf,
Expired,
Exercise,
Guaranteed,
HighestCost,
HfInvestment,
HfRedemption,
InternalTransfer,
Affiliate,
Investor,
MarginLiquidation,
Lifo,
Loan,
LongTermGain,
ManualEntry,
MaxLoss,
MinLongTermGain,
MaxShortTermGain,
MinShortTermGain,
ManualExercise,
Opening,
Partial,
FracRiskless,
FracPrincipal,
PriceImprovement,
PostAccrual,
Principal,
Reinvestment,
Redemption,
Reopen,
Reverse,
Reimbursement,
SolicitedIb,
SpecificLot,
SolicitedOther,
ShortSettlement,
ShortTermGain,
StockYield,
Transfer,
WashSale,
Unknown,
}Expand description
Transaction code
Comprehensive list of IB transaction classification codes.
These codes appear in notes fields and can be combined (e.g., “C;W” for closing + wash sale).
They provide critical context for tax reporting and trade classification.
Variants§
Assignment
Assignment - Option assignment triggering stock delivery
Adjustment
Adjustment - Manual adjustment affecting cost basis
Allocation
Allocation - Trade allocation to sub-account (master/sub allocation)
AutoExercise
Auto Exercise - Automatic exercise (dividend-related, exercise before ex-div)
AutoFx
Auto FX - AutoFX currency conversion for settlement
AwayTrade
Away Trade - Trade executed away from IB (third-party execution)
BuyIn
Buy-In - Forced purchase to cover failed delivery (forced short cover)
BorrowFee
Borrow - Securities borrowing fee (lending charge)
Cancelled
Cancellation - Trade cancelled/busted (trade reversed)
Closing
Closing - Closing trade (reduces position)
CashDelivery
Cash Delivery - Cash delivery for exercise (cash vs physical)
ComplexPosition
Complex Position - Complex/combo position (multi-leg strategy)
Correction
Correction - Trade correction (amended execution)
Crossing
Crossing - Internal IB cross (matched internally)
DualAgent
Dual Agent - IB dual agent capacity (disclosed dual role)
Etf
ETF - ETF creation/redemption (in-kind basket)
Expired
Expired - From expired position (option/warrant expiry)
Exercise
Exercise - Option exercise (long option exercised)
Guaranteed
Guaranteed - Guaranteed account segment (special margin)
HighestCost
Highest Cost - Highest cost tax lot (tax lot selection)
HfInvestment
HF Investment - Hedge fund investment (fund subscription)
HfRedemption
HF Redemption - Hedge fund redemption (fund redemption)
InternalTransfer
Internal - Internal transfer (between IB accounts)
Affiliate
Affiliate - Affiliate execution (related party trade)
Investor
Investor - Investment from investor (capital contribution)
MarginLiquidation
Margin Violation - Liquidation due to margin (forced liquidation)
Lifo
LIFO - LIFO tax lot (tax lot selection)
Loan
Loan - Securities lending income (lending income)
LongTermGain
Long-Term - Long-term gain/loss (holding > 1 year)
ManualEntry
Manual - Manual IB entry (manual adjustment)
MaxLoss
Max Loss - Maximize losses (tax optimization)
MinLongTermGain
Min LT Gain - Minimize long-term gain (tax optimization)
MaxShortTermGain
Max ST Gain - Maximize short-term gain (tax optimization)
MinShortTermGain
Min ST Gain - Minimize short-term gain (tax optimization)
ManualExercise
Manual Exercise - Manual exercise (discretionary exercise)
Opening
Opening - Opening trade (new position)
Partial
Partial - Partial execution (partial fill)
FracRiskless
Frac Riskless - Fractional riskless principal (fractional share method)
FracPrincipal
Frac Principal - Fractional principal (fractional share method)
PriceImprovement
Price Improvement - Better than quoted (price improvement)
PostAccrual
Post Accrual - Accrual posting (accrual entry)
Principal
Principal - IB principal execution (principal trade)
Reinvestment
Reinvestment - Dividend reinvestment (DRIP)
Redemption
Redemption - Capital distribution (fund redemption)
Reopen
Reopen - Position reopened (wash sale reopen)
Reverse
Reverse - Accrual reversal (accounting reversal)
Reimbursement
Reimbursement - Fee refund (expense refund)
SolicitedIb
Solicited IB - IB solicited order (IB-initiated)
SpecificLot
Specific Lot - Specific tax lot (tax lot selection)
SolicitedOther
Solicited Other - Third-party solicited (broker-solicited)
ShortSettlement
Short Settlement - T+0 or T+1 settlement (accelerated settle)
ShortTermGain
Short-Term - Short-term gain/loss (holding <= 1 year)
StockYield
Stock Yield - Stock yield eligible (lending eligible)
Transfer
Transfer - Position transfer
WashSale
Wash Sale - Wash sale (loss disallowed)
Unknown
Unknown code
Trait Implementations§
Source§impl Clone for TransactionCode
impl Clone for TransactionCode
Source§fn clone(&self) -> TransactionCode
fn clone(&self) -> TransactionCode
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more