Skip to main content

SLBFee

Struct SLBFee 

Source
pub struct SLBFee {
Show 51 fields pub account_id: Option<String>, pub acct_alias: Option<String>, pub model: Option<String>, pub symbol: Option<String>, pub description: Option<String>, pub conid: Option<String>, pub asset_category: Option<AssetCategory>, pub value_date: Option<NaiveDate>, pub start_date: Option<NaiveDate>, pub quantity: Option<Decimal>, pub collateral_amount: Option<Decimal>, pub fee_rate: Option<Decimal>, pub fee: Option<Decimal>, pub carry_charge: Option<Decimal>, pub currency: Option<String>, pub fx_rate_to_base: Option<Decimal>, pub slb_type: Option<String>, pub code: Option<String>, pub unique_id: Option<String>, pub gross_lend_fee: Option<Decimal>, pub net_lend_fee: Option<Decimal>, pub market_fee_rate: Option<Decimal>, pub net_lend_fee_rate: Option<Decimal>, pub total_charges: Option<Decimal>, pub ticket_charge: Option<Decimal>, pub security_id: Option<String>, pub security_id_type: Option<String>, pub cusip: Option<String>, pub isin: Option<String>, pub figi: Option<String>, pub issuer_country_code: Option<String>, pub sub_category: Option<String>, pub listing_exchange: Option<String>, pub issuer: Option<String>, pub exchange: Option<String>, pub multiplier: Option<Decimal>, pub strike: Option<Decimal>, pub expiry: Option<NaiveDate>, pub put_call: Option<PutCall>, pub principal_adjust_factor: Option<Decimal>, pub from_acct: Option<String>, pub to_acct: Option<String>, pub underlying_conid: Option<String>, pub underlying_symbol: Option<String>, pub underlying_security_id: Option<String>, pub underlying_listing_exchange: Option<String>, pub serial_number: Option<Decimal>, pub delivery_type: Option<Decimal>, pub commodity_type: Option<String>, pub fineness: Option<Decimal>, pub weight: Option<Decimal>,
}
Expand description

Securities lending fee

Fields§

§account_id: Option<String>

Account ID

§acct_alias: Option<String>

Account alias

§model: Option<String>

Model

§symbol: Option<String>

Symbol

§description: Option<String>

Description

§conid: Option<String>

Contract ID

§asset_category: Option<AssetCategory>

Asset category

§value_date: Option<NaiveDate>

Value date

§start_date: Option<NaiveDate>

Start date

§quantity: Option<Decimal>

Quantity

§collateral_amount: Option<Decimal>

Collateral amount

§fee_rate: Option<Decimal>

Fee rate

§fee: Option<Decimal>

Fee

§carry_charge: Option<Decimal>

Carry charge

§currency: Option<String>

Currency

§fx_rate_to_base: Option<Decimal>

FX rate to base

§slb_type: Option<String>

Lending type, e.g. ManagedLoan (fully-paid lending) or the Stock Yield Enhancement Program. Discriminates which income field applies — see SLBFee::lending_income.

§code: Option<String>

Transaction code (e.g. Po).

§unique_id: Option<String>

Unique per-fee identifier; the trailing digits match the numeric core of SLBActivity::slb_transaction_id.

§gross_lend_fee: Option<Decimal>

Gross (market) lending fee before IBKR’s revenue split.

§net_lend_fee: Option<Decimal>

Net lending fee credited to the account. This is the recognized lending income for ManagedLoan (the captured fee is 0 for it).

§market_fee_rate: Option<Decimal>

Annualized gross/market fee rate (percent).

§net_lend_fee_rate: Option<Decimal>

Annualized net fee rate (percent) credited to the account.

§total_charges: Option<Decimal>

Total charges deducted from the gross fee.

§ticket_charge: Option<Decimal>

Ticket charge component.

§security_id: Option<String>

securityID

§security_id_type: Option<String>

securityIDType

§cusip: Option<String>

cusip

§isin: Option<String>

isin

§figi: Option<String>

figi

§issuer_country_code: Option<String>

issuerCountryCode

§sub_category: Option<String>

subCategory

§listing_exchange: Option<String>

listingExchange

§issuer: Option<String>

issuer

§exchange: Option<String>

exchange

§multiplier: Option<Decimal>

multiplier

§strike: Option<Decimal>

strike

§expiry: Option<NaiveDate>

expiry

§put_call: Option<PutCall>

putCall

§principal_adjust_factor: Option<Decimal>

principalAdjustFactor

§from_acct: Option<String>

fromAcct

§to_acct: Option<String>

toAcct

§underlying_conid: Option<String>

underlyingConid

§underlying_symbol: Option<String>

underlyingSymbol

§underlying_security_id: Option<String>

underlyingSecurityID

§underlying_listing_exchange: Option<String>

underlyingListingExchange

§serial_number: Option<Decimal>

serialNumber

§delivery_type: Option<Decimal>

deliveryType

§commodity_type: Option<String>

commodityType

§fineness: Option<Decimal>

fineness

§weight: Option<Decimal>

weight

Implementations§

Source§

impl SLBFee

Source

pub fn lending_income(&self) -> Option<Decimal>

Recognized securities-lending income for this fee row, in SLBFee::currency.

For type = "ManagedLoan" (fully-paid lending) IB reports the post-split income in net_lend_fee and leaves fee at 0; for the retail Stock Yield Enhancement Program the income is in fee. This returns whichever applies (net_lend_fee when present and non-zero, otherwise fee).

Net stock-loan P&L for a security = Σ lending_income() (this struct) − Σ borrow cost (HardToBorrowDetail::borrow_fee), joined by conid/figi.

Trait Implementations§

Source§

impl Clone for SLBFee

Source§

fn clone(&self) -> SLBFee

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SLBFee

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for SLBFee

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for SLBFee

Source§

fn eq(&self, other: &SLBFee) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for SLBFee

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for SLBFee

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,