pub struct MarketDataSnapshotFullRefresh {
pub symbol: String,
pub md_req_id: Option<String>,
pub underlying_symbol: Option<String>,
pub underlying_px: Option<f64>,
pub contract_multiplier: Option<f64>,
pub put_or_call: Option<i32>,
pub trade_volume_24h: Option<f64>,
pub mark_price: Option<f64>,
pub open_interest: Option<f64>,
pub current_funding: Option<f64>,
pub funding_8h: Option<f64>,
pub entries: Vec<MdEntry>,
}Expand description
Market Data Snapshot/Full Refresh message structure
Fields§
§symbol: StringInstrument symbol
md_req_id: Option<String>ID of the original request (optional)
underlying_symbol: Option<String>Underlying symbol (for options)
underlying_px: Option<f64>Price of the underlying instrument (for options)
contract_multiplier: Option<f64>Contract multiplier
put_or_call: Option<i32>Put or Call indicator (0 = put, 1 = call)
trade_volume_24h: Option<f64>24h trade volume
mark_price: Option<f64>Mark price
open_interest: Option<f64>Open interest
current_funding: Option<f64>Current funding (perpetual only)
funding_8h: Option<f64>Funding in last 8h (perpetual only)
entries: Vec<MdEntry>Market data entries
Implementations§
Source§impl MarketDataSnapshotFullRefresh
impl MarketDataSnapshotFullRefresh
Sourcepub fn with_request_id(self, md_req_id: String) -> Self
pub fn with_request_id(self, md_req_id: String) -> Self
Set request ID
Sourcepub fn with_entries(self, entries: Vec<MdEntry>) -> Self
pub fn with_entries(self, entries: Vec<MdEntry>) -> Self
Add entries
Sourcepub fn with_underlying_symbol(self, underlying_symbol: String) -> Self
pub fn with_underlying_symbol(self, underlying_symbol: String) -> Self
Set underlying symbol (for options)
Sourcepub fn with_underlying_px(self, underlying_px: f64) -> Self
pub fn with_underlying_px(self, underlying_px: f64) -> Self
Set underlying price (for options)
Sourcepub fn with_contract_multiplier(self, contract_multiplier: f64) -> Self
pub fn with_contract_multiplier(self, contract_multiplier: f64) -> Self
Set contract multiplier
Sourcepub fn with_put_or_call(self, put_or_call: i32) -> Self
pub fn with_put_or_call(self, put_or_call: i32) -> Self
Set put or call indicator (0 = put, 1 = call)
Sourcepub fn with_trade_volume_24h(self, trade_volume_24h: f64) -> Self
pub fn with_trade_volume_24h(self, trade_volume_24h: f64) -> Self
Set 24h trade volume
Sourcepub fn with_mark_price(self, mark_price: f64) -> Self
pub fn with_mark_price(self, mark_price: f64) -> Self
Set mark price
Sourcepub fn with_open_interest(self, open_interest: f64) -> Self
pub fn with_open_interest(self, open_interest: f64) -> Self
Set open interest
Sourcepub fn with_current_funding(self, current_funding: f64) -> Self
pub fn with_current_funding(self, current_funding: f64) -> Self
Set current funding (perpetual only)
Sourcepub fn with_funding_8h(self, funding_8h: f64) -> Self
pub fn with_funding_8h(self, funding_8h: f64) -> Self
Set funding in last 8h (perpetual only)
Sourcepub fn to_fix_message(
&self,
sender_comp_id: String,
target_comp_id: String,
msg_seq_num: u32,
) -> DeribitFixResult<String>
pub fn to_fix_message( &self, sender_comp_id: String, target_comp_id: String, msg_seq_num: u32, ) -> DeribitFixResult<String>
Convert to FIX message
Trait Implementations§
Source§impl Clone for MarketDataSnapshotFullRefresh
impl Clone for MarketDataSnapshotFullRefresh
Source§fn clone(&self) -> MarketDataSnapshotFullRefresh
fn clone(&self) -> MarketDataSnapshotFullRefresh
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<'de> Deserialize<'de> for MarketDataSnapshotFullRefresh
impl<'de> Deserialize<'de> for MarketDataSnapshotFullRefresh
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
Auto Trait Implementations§
impl Freeze for MarketDataSnapshotFullRefresh
impl RefUnwindSafe for MarketDataSnapshotFullRefresh
impl Send for MarketDataSnapshotFullRefresh
impl Sync for MarketDataSnapshotFullRefresh
impl Unpin for MarketDataSnapshotFullRefresh
impl UnwindSafe for MarketDataSnapshotFullRefresh
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