pub struct HyperliquidTwapHistory {Show 17 fields
pub user: String,
pub twap_id: Option<u64>,
pub coin: String,
pub instrument_id: Option<InstrumentId>,
pub side: OrderSide,
pub size: Decimal,
pub executed_size: Decimal,
pub executed_notional: Decimal,
pub minutes: u32,
pub reduce_only: bool,
pub randomize: bool,
pub status: HyperliquidTwapStatus,
pub status_description: String,
pub state_timestamp: UnixNanos,
pub is_snapshot: bool,
pub ts_event: UnixNanos,
pub ts_init: UnixNanos,
}Expand description
One history row from the Hyperliquid userTwapHistory WebSocket channel.
Opt-in custom data (not part of default user execution subscriptions).
Fields§
§user: StringUser address from the subscription envelope.
twap_id: Option<u64>Venue TWAP id (twapId) when present on the row.
coin: StringRaw Hyperliquid coin symbol from state.coin.
instrument_id: Option<InstrumentId>Resolved Nautilus instrument ID when the coin is known in cache.
side: OrderSideTWAP order side.
size: DecimalTotal TWAP size.
executed_size: DecimalExecuted size so far.
executed_notional: DecimalExecuted notional so far.
minutes: u32TWAP duration in minutes.
reduce_only: boolWhether the TWAP is reduce-only.
randomize: boolWhether slice timing is randomized.
status: HyperliquidTwapStatusVenue TWAP status.
status_description: StringVenue status description.
state_timestamp: UnixNanosstate.timestamp converted to UNIX nanoseconds.
is_snapshot: boolWhether this event belongs to a venue snapshot batch.
ts_event: UnixNanosUNIX timestamp (nanoseconds) when the history row was produced (history.time).
ts_init: UnixNanosUNIX timestamp (nanoseconds) when the instance was initialized.
Implementations§
Source§impl HyperliquidTwapHistory
impl HyperliquidTwapHistory
Sourcepub fn new(
user: String,
twap_id: Option<u64>,
coin: String,
instrument_id: Option<InstrumentId>,
side: OrderSide,
size: Decimal,
executed_size: Decimal,
executed_notional: Decimal,
minutes: u32,
reduce_only: bool,
randomize: bool,
status: HyperliquidTwapStatus,
status_description: String,
state_timestamp: UnixNanos,
is_snapshot: bool,
ts_event: UnixNanos,
ts_init: UnixNanos,
) -> Self
pub fn new( user: String, twap_id: Option<u64>, coin: String, instrument_id: Option<InstrumentId>, side: OrderSide, size: Decimal, executed_size: Decimal, executed_notional: Decimal, minutes: u32, reduce_only: bool, randomize: bool, status: HyperliquidTwapStatus, status_description: String, state_timestamp: UnixNanos, is_snapshot: bool, ts_event: UnixNanos, ts_init: UnixNanos, ) -> Self
Constructor from all fields.
Trait Implementations§
Source§impl ArrowSchemaProvider for HyperliquidTwapHistory
impl ArrowSchemaProvider for HyperliquidTwapHistory
Source§impl Clone for HyperliquidTwapHistory
impl Clone for HyperliquidTwapHistory
Source§impl CustomDataSerialize for HyperliquidTwapHistory
impl CustomDataSerialize for HyperliquidTwapHistory
Source§impl CustomDataTrait for HyperliquidTwapHistory
impl CustomDataTrait for HyperliquidTwapHistory
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 HyperliquidTwapHistory
impl Debug for HyperliquidTwapHistory
Source§impl DecodeDataFromRecordBatch for HyperliquidTwapHistory
impl DecodeDataFromRecordBatch for HyperliquidTwapHistory
impl DerefToPyAny for HyperliquidTwapHistory
Source§impl<'de> Deserialize<'de> for HyperliquidTwapHistory
impl<'de> Deserialize<'de> for HyperliquidTwapHistory
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 HyperliquidTwapHistory
impl Display for HyperliquidTwapHistory
Source§impl EncodeToRecordBatch for HyperliquidTwapHistory
impl EncodeToRecordBatch for HyperliquidTwapHistory
Source§fn encode_batch<T>(
metadata: &HashMap<String, String>,
data: &[T],
) -> Result<RecordBatch, ArrowError>where
T: Borrow<Self>,
fn encode_batch<T>(
metadata: &HashMap<String, String>,
data: &[T],
) -> Result<RecordBatch, ArrowError>where
T: Borrow<Self>,
RecordBatch using the provided metadata. Read moreSource§impl From<HyperliquidTwapHistory> for Data
impl From<HyperliquidTwapHistory> for Data
Source§fn from(value: HyperliquidTwapHistory) -> Self
fn from(value: HyperliquidTwapHistory) -> Self
Source§impl<'a, 'py> FromPyObject<'a, 'py> for HyperliquidTwapHistorywhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for HyperliquidTwapHistorywhere
Self: Clone,
Source§impl HasTsInit for HyperliquidTwapHistory
impl HasTsInit for HyperliquidTwapHistory
Source§impl<'py> IntoPyObject<'py> for HyperliquidTwapHistory
impl<'py> IntoPyObject<'py> for HyperliquidTwapHistory
Source§type Target = HyperliquidTwapHistory
type Target = HyperliquidTwapHistory
Source§type Output = Bound<'py, HyperliquidTwapHistory>
type Output = Bound<'py, HyperliquidTwapHistory>
Source§fn into_pyobject(self, py: Python<'py>) -> PyResult<Bound<'py, Self>>
fn into_pyobject(self, py: Python<'py>) -> PyResult<Bound<'py, Self>>
Source§impl PartialEq for HyperliquidTwapHistory
impl PartialEq for HyperliquidTwapHistory
Source§impl PyClass for HyperliquidTwapHistory
impl PyClass for HyperliquidTwapHistory
Source§impl PyClassImpl for HyperliquidTwapHistory
impl PyClassImpl for HyperliquidTwapHistory
Source§const RAW_DOC: &'static CStr = /// One history row from the Hyperliquid `userTwapHistory` WebSocket channel.
///
/// Opt-in custom data (not part of default user execution subscriptions).
const RAW_DOC: &'static CStr = /// One history row from the Hyperliquid `userTwapHistory` WebSocket channel. /// /// Opt-in custom data (not part of default user execution subscriptions).
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<HyperliquidTwapHistory as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<HyperliquidTwapHistory>
type Layout = <<HyperliquidTwapHistory as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<HyperliquidTwapHistory>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
type Inventory = Pyo3MethodsInventoryForHyperliquidTwapHistory
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 __traverse__(&self, visit: PyVisit<'_>) -> Result<(), PyTraverseError>
§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for HyperliquidTwapHistory
impl PyClassNewTextSignature for HyperliquidTwapHistory
const TEXT_SIGNATURE: &'static str = "(user, twap_id, coin, instrument_id, side, size, executed_size, executed_notional, minutes, reduce_only, randomize, status, status_description, state_timestamp, is_snapshot, ts_event, ts_init)"
Source§impl PyStubType for HyperliquidTwapHistory
impl PyStubType for HyperliquidTwapHistory
Source§fn type_output() -> TypeInfo
fn type_output() -> TypeInfo
§fn type_input() -> TypeInfo
fn type_input() -> TypeInfo
Source§impl PyTypeInfo for HyperliquidTwapHistory
impl PyTypeInfo for HyperliquidTwapHistory
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 HyperliquidTwapHistory
impl Serialize for HyperliquidTwapHistory
impl StructuralPartialEq for HyperliquidTwapHistory
Auto Trait Implementations§
impl Freeze for HyperliquidTwapHistory
impl RefUnwindSafe for HyperliquidTwapHistory
impl Send for HyperliquidTwapHistory
impl Sync for HyperliquidTwapHistory
impl Unpin for HyperliquidTwapHistory
impl UnsafeUnpin for HyperliquidTwapHistory
impl UnwindSafe for HyperliquidTwapHistory
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<'de, T> BorrowedRpcObject<'de> for Twhere
T: RpcBorrow<'de> + RpcSend,
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> 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