pub struct OptionContractParams {
pub underlying_symbol: Option<String>,
pub expiration_date: Option<String>,
pub expiration_date_gte: Option<String>,
pub expiration_date_lte: Option<String>,
pub strike_price_gte: Option<String>,
pub strike_price_lte: Option<String>,
pub option_type: Option<OptionType>,
pub root_symbol: Option<String>,
pub style: Option<OptionStyle>,
pub limit: Option<u32>,
pub page_token: Option<String>,
}Expand description
Parameters for querying option contracts.
Fields§
§underlying_symbol: Option<String>Filter by underlying symbol.
expiration_date: Option<String>Filter by expiration date (YYYY-MM-DD).
expiration_date_gte: Option<String>Filter by expiration date greater than or equal to.
expiration_date_lte: Option<String>Filter by expiration date less than or equal to.
strike_price_gte: Option<String>Filter by strike price greater than or equal to.
strike_price_lte: Option<String>Filter by strike price less than or equal to.
option_type: Option<OptionType>Filter by option type (call or put).
root_symbol: Option<String>Filter by root symbol.
style: Option<OptionStyle>Filter by style (american or european).
limit: Option<u32>Maximum number of results.
page_token: Option<String>Pagination token.
Implementations§
Source§impl OptionContractParams
impl OptionContractParams
Sourcepub fn new() -> OptionContractParams
pub fn new() -> OptionContractParams
Create new empty parameters.
Sourcepub fn underlying_symbol(self, symbol: &str) -> OptionContractParams
pub fn underlying_symbol(self, symbol: &str) -> OptionContractParams
Filter by underlying symbol.
Sourcepub fn expiration_date(self, date: &str) -> OptionContractParams
pub fn expiration_date(self, date: &str) -> OptionContractParams
Filter by expiration date.
Sourcepub fn option_type(self, option_type: OptionType) -> OptionContractParams
pub fn option_type(self, option_type: OptionType) -> OptionContractParams
Filter by option type.
Sourcepub fn strike_price_range(self, min: &str, max: &str) -> OptionContractParams
pub fn strike_price_range(self, min: &str, max: &str) -> OptionContractParams
Filter by strike price range.
Sourcepub fn limit(self, limit: u32) -> OptionContractParams
pub fn limit(self, limit: u32) -> OptionContractParams
Set maximum number of results.
Trait Implementations§
Source§impl Clone for OptionContractParams
impl Clone for OptionContractParams
Source§fn clone(&self) -> OptionContractParams
fn clone(&self) -> OptionContractParams
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionContractParams
impl Debug for OptionContractParams
Source§impl Default for OptionContractParams
impl Default for OptionContractParams
Source§fn default() -> OptionContractParams
fn default() -> OptionContractParams
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for OptionContractParams
impl<'de> Deserialize<'de> for OptionContractParams
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<OptionContractParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<OptionContractParams, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for OptionContractParams
impl Serialize for OptionContractParams
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for OptionContractParams
impl RefUnwindSafe for OptionContractParams
impl Send for OptionContractParams
impl Sync for OptionContractParams
impl Unpin for OptionContractParams
impl UnwindSafe for OptionContractParams
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