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. Use from Rust; Python init forwards to this.
Trait Implementations§
Source§impl CatalogPathPrefix for HyperliquidTwapHistory
impl CatalogPathPrefix for HyperliquidTwapHistory
Source§fn path_prefix() -> &'static str
fn path_prefix() -> &'static str
Source§impl Clone for HyperliquidTwapHistory
impl Clone for HyperliquidTwapHistory
Source§fn clone(&self) -> HyperliquidTwapHistory
fn clone(&self) -> HyperliquidTwapHistory
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 HyperliquidTwapHistory
impl CustomDataSerialize for HyperliquidTwapHistory
Source§fn schema(&self) -> Result<Schema>
fn schema(&self) -> Result<Schema>
Source§fn encode_record_batch(
&self,
items: &[Arc<dyn CustomDataTrait>],
) -> Result<RecordBatch>
fn encode_record_batch( &self, items: &[Arc<dyn CustomDataTrait>], ) -> Result<RecordBatch>
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§impl Debug for HyperliquidTwapHistory
impl Debug for HyperliquidTwapHistory
Source§impl DecodeDataFromRecordBatch for HyperliquidTwapHistory
impl DecodeDataFromRecordBatch for HyperliquidTwapHistory
Source§fn decode_data_batch(
_metadata: &HashMap<String, String>,
record_batch: RecordBatch,
) -> Result<Vec<Data>, EncodingError>
fn decode_data_batch( _metadata: &HashMap<String, String>, record_batch: RecordBatch, ) -> Result<Vec<Data>, EncodingError>
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(
metadata: &HashMap<String, String>,
data: &[Self],
) -> Result<RecordBatch, ArrowError>
fn encode_batch( metadata: &HashMap<String, String>, data: &[Self], ) -> Result<RecordBatch, ArrowError>
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 HasTsInit for HyperliquidTwapHistory
impl HasTsInit for HyperliquidTwapHistory
Source§impl PartialEq for HyperliquidTwapHistory
impl PartialEq for HyperliquidTwapHistory
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 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>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> 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