Skip to main content

NetStockPosition

Struct NetStockPosition 

Source
pub struct NetStockPosition {
Show 37 fields pub asset_category: Option<AssetCategory>, pub account_id: Option<String>, pub acct_alias: Option<String>, pub model: Option<String>, pub currency: Option<String>, pub symbol: Option<String>, pub description: Option<String>, pub conid: Option<String>, pub security_id: Option<String>, pub security_id_type: Option<String>, pub cusip: Option<String>, pub isin: Option<String>, pub sedol: Option<String>, pub listing_exchange: 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 issuer: 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 report_date: Option<NaiveDate>, pub shares_at_ib: Option<Decimal>, pub shares_borrowed: Option<Decimal>, pub shares_lent: Option<Decimal>, pub net_shares: Option<Decimal>, pub serial_number: Option<String>, pub delivery_type: Option<String>, pub commodity_type: Option<String>, pub fineness: Option<Decimal>, pub weight: Option<String>, pub sub_category: Option<String>, pub figi: Option<String>, pub issuer_country_code: Option<String>,
}
Expand description

Net stock position combining long stock and option-equivalent exposure.

Mirrors the ibflex NetStockPosition element; all attributes are optional as IB may omit any of them.

Fields§

§asset_category: Option<AssetCategory>

assetCategory

§account_id: Option<String>

accountId

§acct_alias: Option<String>

acctAlias

§model: Option<String>

model

§currency: Option<String>

currency

§symbol: Option<String>

symbol

§description: Option<String>

description

§conid: Option<String>

conid

§security_id: Option<String>

securityID

§security_id_type: Option<String>

securityIDType

§cusip: Option<String>

cusip

§isin: Option<String>

isin

§sedol: Option<String>

sedol

§listing_exchange: Option<String>

listingExchange

§underlying_conid: Option<String>

underlyingConid

§underlying_symbol: Option<String>

underlyingSymbol

§underlying_security_id: Option<String>

underlyingSecurityID

§underlying_listing_exchange: Option<String>

underlyingListingExchange

§issuer: Option<String>

issuer

§multiplier: Option<Decimal>

multiplier

§strike: Option<Decimal>

strike

§expiry: Option<NaiveDate>

expiry

§put_call: Option<PutCall>

putCall

§principal_adjust_factor: Option<Decimal>

principalAdjustFactor

§report_date: Option<NaiveDate>

reportDate

§shares_at_ib: Option<Decimal>

sharesAtIb

§shares_borrowed: Option<Decimal>

sharesBorrowed

§shares_lent: Option<Decimal>

sharesLent

§net_shares: Option<Decimal>

netShares

§serial_number: Option<String>

serialNumber

§delivery_type: Option<String>

deliveryType

§commodity_type: Option<String>

commodityType

§fineness: Option<Decimal>

fineness

§weight: Option<String>

weight

§sub_category: Option<String>

subCategory

§figi: Option<String>

figi

§issuer_country_code: Option<String>

issuerCountryCode

Trait Implementations§

Source§

impl Clone for NetStockPosition

Source§

fn clone(&self) -> NetStockPosition

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 NetStockPosition

Source§

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

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

impl<'de> Deserialize<'de> for NetStockPosition

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 NetStockPosition

Source§

fn eq(&self, other: &NetStockPosition) -> 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 NetStockPosition

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 NetStockPosition

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>,