#[non_exhaustive]pub struct TransactionInstrument {Show 20 fields
pub asset_type: AssetType,
pub symbol: String,
pub cusip: Option<String>,
pub description: Option<String>,
pub instrument_id: Option<i64>,
pub net_change: Option<f64>,
pub type_: Option<String>,
pub status: Option<String>,
pub closing_price: Option<f64>,
pub expiration_date: Option<String>,
pub put_call: Option<PutCall>,
pub strike_price: Option<f64>,
pub option_premium_multiplier: Option<i64>,
pub underlying_symbol: Option<String>,
pub underlying_cusip: Option<String>,
pub maturity_date: Option<String>,
pub factor: Option<f64>,
pub variable_rate: Option<f64>,
pub multiplier: Option<f64>,
pub extra: HashMap<String, Value>,
}Expand description
The instrument on a TransferItem (TransactionInstrument in the
Trader API spec). The base fields plus the option, fixed-income and
future extensions are typed; the rest lands in extra.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.asset_type: AssetType§symbol: String§cusip: Option<String>§description: Option<String>§instrument_id: Option<i64>§net_change: Option<f64>§type_: Option<String>Subtype whose value set depends on asset_type (COMMON_STOCK,
SWEEP_VEHICLE, VANILLA, …).
status: Option<String>Observed on live payloads (ACTIVE), undocumented in the spec.
closing_price: Option<f64>Observed on live payloads, undocumented in the spec.
expiration_date: Option<String>Options and futures.
put_call: Option<PutCall>Options only. None when Schwab reports UNKNOWN.
strike_price: Option<f64>Options only.
Options only.
underlying_symbol: Option<String>Options only.
underlying_cusip: Option<String>Options only.
maturity_date: Option<String>Fixed income only.
factor: Option<f64>Fixed income only.
variable_rate: Option<f64>Fixed income only.
multiplier: Option<f64>Fixed income and futures.
extra: HashMap<String, Value>Trait Implementations§
Source§impl Clone for TransactionInstrument
impl Clone for TransactionInstrument
Source§impl Debug for TransactionInstrument
impl Debug for TransactionInstrument
Source§impl Default for TransactionInstrument
impl Default for TransactionInstrument
Source§impl<'de> Deserialize<'de> for TransactionInstrumentwhere
TransactionInstrument: Default,
impl<'de> Deserialize<'de> for TransactionInstrumentwhere
TransactionInstrument: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 JsonSchema for TransactionInstrument
impl JsonSchema for TransactionInstrument
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for TransactionInstrument
impl PartialEq for TransactionInstrument
Source§impl Serialize for TransactionInstrument
impl Serialize for TransactionInstrument
impl StructuralPartialEq for TransactionInstrument
Auto Trait Implementations§
impl Freeze for TransactionInstrument
impl RefUnwindSafe for TransactionInstrument
impl Send for TransactionInstrument
impl Sync for TransactionInstrument
impl Unpin for TransactionInstrument
impl UnsafeUnpin for TransactionInstrument
impl UnwindSafe for TransactionInstrument
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more