#[non_exhaustive]pub struct AccountsInstrument {Show 14 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 put_call: Option<PutCall>,
pub underlying_symbol: Option<String>,
pub option_multiplier: Option<i64>,
pub maturity_date: Option<String>,
pub factor: Option<f64>,
pub variable_rate: Option<f64>,
pub extra: HashMap<String, Value>,
}Expand description
The instrument on a position or an order leg (AccountsInstrument in
the Trader API spec).
The fields Schwab documents for every asset type are typed, plus the
option and fixed-income extensions; anything else 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 (SWEEP_VEHICLE
for cash equivalents, VANILLA for options, …).
put_call: Option<PutCall>Options only. None when Schwab reports UNKNOWN.
underlying_symbol: Option<String>Options only.
option_multiplier: Option<i64>Options only.
maturity_date: Option<String>Fixed income only.
factor: Option<f64>Fixed income only.
variable_rate: Option<f64>Fixed income only.
extra: HashMap<String, Value>Trait Implementations§
Source§impl Clone for AccountsInstrument
impl Clone for AccountsInstrument
Source§impl Debug for AccountsInstrument
impl Debug for AccountsInstrument
Source§impl Default for AccountsInstrument
impl Default for AccountsInstrument
Source§impl<'de> Deserialize<'de> for AccountsInstrumentwhere
AccountsInstrument: Default,
impl<'de> Deserialize<'de> for AccountsInstrumentwhere
AccountsInstrument: 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 AccountsInstrument
impl JsonSchema for AccountsInstrument
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 AccountsInstrument
impl PartialEq for AccountsInstrument
Source§impl Serialize for AccountsInstrument
impl Serialize for AccountsInstrument
impl StructuralPartialEq for AccountsInstrument
Auto Trait Implementations§
impl Freeze for AccountsInstrument
impl RefUnwindSafe for AccountsInstrument
impl Send for AccountsInstrument
impl Sync for AccountsInstrument
impl Unpin for AccountsInstrument
impl UnsafeUnpin for AccountsInstrument
impl UnwindSafe for AccountsInstrument
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