pub struct DeribitBookSummary {Show 29 fields
pub instrument_id: InstrumentId,
pub instrument_name: String,
pub underlying_price: Option<Decimal>,
pub underlying_index: Option<String>,
pub mark_price: Option<Decimal>,
pub mid_price: Option<Decimal>,
pub bid_price: Option<Decimal>,
pub ask_price: Option<Decimal>,
pub last_price: Option<Decimal>,
pub mark_iv: Option<Decimal>,
pub bid_iv: Option<Decimal>,
pub ask_iv: Option<Decimal>,
pub interest_rate: Option<Decimal>,
pub open_interest: Option<Decimal>,
pub open_interest_value: Option<Decimal>,
pub volume: Option<Decimal>,
pub volume_usd: Option<Decimal>,
pub volume_notional: Option<Decimal>,
pub volume_btc: Option<Decimal>,
pub high: Option<Decimal>,
pub low: Option<Decimal>,
pub price_change: Option<Decimal>,
pub estimated_delivery_price: Option<Decimal>,
pub delivery_price: Option<Decimal>,
pub base_currency: Option<String>,
pub quote_currency: Option<String>,
pub creation_timestamp: i64,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
Book summary snapshot for one instrument from
public/get_book_summary_by_currency.
Numeric venue fields are retained as [Decimal] (no f64 round-trip).
Convert from the wire DTO via DeribitBookSummary::from_raw.
Fields§
§instrument_id: InstrumentIdNautilus instrument identifier (venue-qualified).
instrument_name: StringVenue instrument name (e.g. "BTC-28MAR25-90000-C").
underlying_price: Option<Decimal>Forward/underlying price used for IV calculations.
underlying_index: Option<String>Underlying future or index name.
mark_price: Option<Decimal>Mark price.
mid_price: Option<Decimal>Mid price.
bid_price: Option<Decimal>Best bid price.
ask_price: Option<Decimal>Best ask price.
last_price: Option<Decimal>Last traded price.
mark_iv: Option<Decimal>Mark implied volatility.
bid_iv: Option<Decimal>Bid implied volatility.
ask_iv: Option<Decimal>Ask implied volatility.
interest_rate: Option<Decimal>Interest rate used in IV calculations.
open_interest: Option<Decimal>Open interest.
open_interest_value: Option<Decimal>Open interest value when provided.
volume: Option<Decimal>24h volume.
volume_usd: Option<Decimal>24h volume in USD.
volume_notional: Option<Decimal>24h notional volume.
volume_btc: Option<Decimal>24h volume in BTC when provided.
high: Option<Decimal>24h high.
low: Option<Decimal>24h low.
price_change: Option<Decimal>24h price change.
estimated_delivery_price: Option<Decimal>Estimated delivery price.
delivery_price: Option<Decimal>Settlement/delivery price when present.
base_currency: Option<String>Base currency.
quote_currency: Option<String>Quote currency.
creation_timestamp: i64Instrument creation time (milliseconds since UNIX epoch).
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the snapshot was observed.
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was initialized.
Implementations§
Source§impl DeribitBookSummary
impl DeribitBookSummary
Sourcepub fn new(
instrument_id: InstrumentId,
instrument_name: String,
underlying_price: Option<Decimal>,
underlying_index: Option<String>,
mark_price: Option<Decimal>,
mid_price: Option<Decimal>,
bid_price: Option<Decimal>,
ask_price: Option<Decimal>,
last_price: Option<Decimal>,
mark_iv: Option<Decimal>,
bid_iv: Option<Decimal>,
ask_iv: Option<Decimal>,
interest_rate: Option<Decimal>,
open_interest: Option<Decimal>,
open_interest_value: Option<Decimal>,
volume: Option<Decimal>,
volume_usd: Option<Decimal>,
volume_notional: Option<Decimal>,
volume_btc: Option<Decimal>,
high: Option<Decimal>,
low: Option<Decimal>,
price_change: Option<Decimal>,
estimated_delivery_price: Option<Decimal>,
delivery_price: Option<Decimal>,
base_currency: Option<String>,
quote_currency: Option<String>,
creation_timestamp: i64,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( instrument_id: InstrumentId, instrument_name: String, underlying_price: Option<Decimal>, underlying_index: Option<String>, mark_price: Option<Decimal>, mid_price: Option<Decimal>, bid_price: Option<Decimal>, ask_price: Option<Decimal>, last_price: Option<Decimal>, mark_iv: Option<Decimal>, bid_iv: Option<Decimal>, ask_iv: Option<Decimal>, interest_rate: Option<Decimal>, open_interest: Option<Decimal>, open_interest_value: Option<Decimal>, volume: Option<Decimal>, volume_usd: Option<Decimal>, volume_notional: Option<Decimal>, volume_btc: Option<Decimal>, high: Option<Decimal>, low: Option<Decimal>, price_change: Option<Decimal>, estimated_delivery_price: Option<Decimal>, delivery_price: Option<Decimal>, base_currency: Option<String>, quote_currency: Option<String>, creation_timestamp: i64, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Constructor from all fields. Use from Rust; Python init forwards to this.
Source§impl DeribitBookSummary
impl DeribitBookSummary
Sourcepub fn from_raw(raw: DeribitBookSummaryRaw, ts: UnixNanos) -> Self
pub fn from_raw(raw: DeribitBookSummaryRaw, ts: UnixNanos) -> Self
Builds a domain book summary from a venue wire DTO.
Trait Implementations§
Source§impl ArrowSchemaProvider for DeribitBookSummary
impl ArrowSchemaProvider for DeribitBookSummary
Source§impl CatalogPathPrefix for DeribitBookSummary
impl CatalogPathPrefix for DeribitBookSummary
Source§fn path_prefix() -> &'static str
fn path_prefix() -> &'static str
Source§impl Clone for DeribitBookSummary
impl Clone for DeribitBookSummary
Source§fn clone(&self) -> DeribitBookSummary
fn clone(&self) -> DeribitBookSummary
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl CustomDataSerialize for DeribitBookSummary
impl CustomDataSerialize for DeribitBookSummary
Source§impl CustomDataTrait for DeribitBookSummary
impl CustomDataTrait for DeribitBookSummary
Source§fn type_name_static() -> &'static str
fn type_name_static() -> &'static str
"type" field).Source§fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
fn eq_arc(&self, other: &dyn CustomDataTrait) -> bool
Source§fn from_json(value: Value) -> Result<Arc<dyn CustomDataTrait>>
fn from_json(value: Value) -> Result<Arc<dyn CustomDataTrait>>
Source§fn to_pyobject(&self, py: Python<'_>) -> PyResult<Py<PyAny>>
fn to_pyobject(&self, py: Python<'_>) -> PyResult<Py<PyAny>>
Source§impl Debug for DeribitBookSummary
impl Debug for DeribitBookSummary
Source§impl DecodeDataFromRecordBatch for DeribitBookSummary
impl DecodeDataFromRecordBatch for DeribitBookSummary
impl DerefToPyAny for DeribitBookSummary
Source§impl<'de> Deserialize<'de> for DeribitBookSummary
impl<'de> Deserialize<'de> for DeribitBookSummary
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>,
Source§impl Display for DeribitBookSummary
impl Display for DeribitBookSummary
Source§impl EncodeToRecordBatch for DeribitBookSummary
impl EncodeToRecordBatch for DeribitBookSummary
Source§impl From<DeribitBookSummary> for Data
impl From<DeribitBookSummary> for Data
Source§fn from(value: DeribitBookSummary) -> Self
fn from(value: DeribitBookSummary) -> Self
Source§impl<'a, 'py> FromPyObject<'a, 'py> for DeribitBookSummarywhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for DeribitBookSummarywhere
Self: Clone,
Source§impl HasTsInit for DeribitBookSummary
impl HasTsInit for DeribitBookSummary
Source§impl<'py> IntoPyObject<'py> for DeribitBookSummary
impl<'py> IntoPyObject<'py> for DeribitBookSummary
Source§type Target = DeribitBookSummary
type Target = DeribitBookSummary
Source§type Output = Bound<'py, <DeribitBookSummary as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <DeribitBookSummary as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PartialEq for DeribitBookSummary
impl PartialEq for DeribitBookSummary
Source§impl PyClass for DeribitBookSummary
impl PyClass for DeribitBookSummary
Source§impl PyClassImpl for DeribitBookSummary
impl PyClassImpl for DeribitBookSummary
Source§const MODULE: Option<&str> = ::core::option::Option::None
const MODULE: Option<&str> = ::core::option::Option::None
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Book summary snapshot for one instrument from
/// `public/get_book_summary_by_currency`.
///
/// Numeric venue fields are retained as [`Decimal`] (no `f64` round-trip).
/// Convert from the wire DTO via [`DeribitBookSummary::from_raw`].
const RAW_DOC: &'static CStr = /// Book summary snapshot for one instrument from /// `public/get_book_summary_by_currency`. /// /// Numeric venue fields are retained as [`Decimal`] (no `f64` round-trip). /// Convert from the wire DTO via [`DeribitBookSummary::from_raw`].
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<DeribitBookSummary as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DeribitBookSummary>
type Layout = <<DeribitBookSummary as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<DeribitBookSummary>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForDeribitBookSummary
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for DeribitBookSummary
impl PyClassNewTextSignature for DeribitBookSummary
const TEXT_SIGNATURE: &'static str = "(instrument_id, instrument_name, underlying_price, underlying_index, mark_price, mid_price, bid_price, ask_price, last_price, mark_iv, bid_iv, ask_iv, interest_rate, open_interest, open_interest_value, volume, volume_usd, volume_notional, volume_btc, high, low, price_change, estimated_delivery_price, delivery_price, base_currency, quote_currency, creation_timestamp, ts_event, ts_init)"
Source§impl PyStubType for DeribitBookSummary
impl PyStubType for DeribitBookSummary
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for DeribitBookSummary
impl PyTypeInfo for DeribitBookSummary
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
prefer using ::type_object(py).name() to get the correct runtime value
Source§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
prefer using ::type_object(py).module() to get the correct runtime value
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.Source§impl Serialize for DeribitBookSummary
impl Serialize for DeribitBookSummary
impl StructuralPartialEq for DeribitBookSummary
Auto Trait Implementations§
impl Freeze for DeribitBookSummary
impl RefUnwindSafe for DeribitBookSummary
impl Send for DeribitBookSummary
impl Sync for DeribitBookSummary
impl Unpin for DeribitBookSummary
impl UnsafeUnpin for DeribitBookSummary
impl UnwindSafe for DeribitBookSummary
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<'py, T> FromPyObjectOwned<'py> for Twhere
T: for<'a> FromPyObject<'a, 'py>,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
self into an owned Python object, dropping type information and unbinding it
from the 'py lifetime.§fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more§impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
impl<'py, T> IntoPyObjectNautilusExt<'py> for Twhere
T: IntoPyObjectExt<'py>,
§fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>where
Self: IntoPyObject<'py, Error = !>,
self into a [Py<PyAny>] when the underlying conversion is infallible.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> PyErrArguments for T
impl<T> PyErrArguments for T
§impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
impl<T> PyTypeCheck for Twhere
T: PyTypeInfo,
§fn type_check(object: &Bound<'_, PyAny>) -> bool
fn type_check(object: &Bound<'_, PyAny>) -> bool
§fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
fn classinfo_object(py: Python<'_>) -> Bound<'_, PyAny>
isinstance and issubclass function. Read more