use nautilus_core::UnixNanos;
use rust_decimal::Decimal;
use crate::identifiers::InstrumentId;
#[derive(Clone, Debug, PartialEq)]
#[cfg_attr(
feature = "python",
pyo3::pyclass(module = "nautilus_trader.core.nautilus_pyo3.model", from_py_object)
)]
#[cfg_attr(
feature = "python",
pyo3_stub_gen::derive::gen_stub_pyclass(module = "nautilus_trader.model")
)]
pub struct ForwardPrice {
pub instrument_id: InstrumentId,
pub forward_price: Decimal,
pub underlying_index: Option<String>,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}
impl ForwardPrice {
#[must_use]
pub fn new(
instrument_id: InstrumentId,
forward_price: Decimal,
underlying_index: Option<String>,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self {
Self {
instrument_id,
forward_price,
underlying_index,
ts_event,
ts_init,
}
}
}