Struct levana_perpswap_cosmos::contracts::market::position::events::PositionUpdateEvent
source · pub struct PositionUpdateEvent {Show 18 fields
pub position_attributes: PositionAttributes,
pub deposit_collateral_delta: Signed<Collateral>,
pub deposit_collateral_delta_usd: Signed<Usd>,
pub active_collateral_delta: Signed<Collateral>,
pub active_collateral_delta_usd: Signed<Usd>,
pub counter_collateral_delta: Signed<Collateral>,
pub counter_collateral_delta_usd: Signed<Usd>,
pub leverage_delta: Signed<Decimal256>,
pub counter_leverage_delta: Signed<Decimal256>,
pub notional_size_delta: Signed<Notional>,
pub notional_size_delta_usd: Signed<Usd>,
pub notional_size_abs_delta: Signed<Notional>,
pub notional_size_abs_delta_usd: Signed<Usd>,
pub trading_fee_delta: Collateral,
pub trading_fee_delta_usd: Usd,
pub delta_neutrality_fee_delta: Signed<Collateral>,
pub delta_neutrality_fee_delta_usd: Signed<Usd>,
pub updated_at: Timestamp,
}
Expand description
Event when a position has been updated
Fields§
§position_attributes: PositionAttributes
Attributes about the position
deposit_collateral_delta: Signed<Collateral>
Amount of collateral added or removed to the position
deposit_collateral_delta_usd: Signed<Usd>
Self::deposit_collateral_delta converted to USD at the current price.
active_collateral_delta: Signed<Collateral>
Change to active collateral
active_collateral_delta_usd: Signed<Usd>
Self::active_collateral_delta converted to USD at the current price.
counter_collateral_delta: Signed<Collateral>
Change to counter collateral
counter_collateral_delta_usd: Signed<Usd>
Self::counter_collateral_delta converted to USD at the current price.
leverage_delta: Signed<Decimal256>
Change in trader leverage
counter_leverage_delta: Signed<Decimal256>
Change in counter collateral leverage
notional_size_delta: Signed<Notional>
Change in the notional size
notional_size_delta_usd: Signed<Usd>
Self::notional_size_delta converted to USD at the current price.
notional_size_abs_delta: Signed<Notional>
The change in notional size from the absolute value
not the absolute value of delta itself e.g. from -10 to -15 will be 5, because it’s the delta of 15-10 but -15 to -10 will be -5, because it’s the delta of 10-15
notional_size_abs_delta_usd: Signed<Usd>
Self::notional_size_abs_delta converted to USD at the current price.
trading_fee_delta: Collateral
Additional trading fee paid
trading_fee_delta_usd: Usd
Self::trading_fee_delta converted to USD at the current price.
delta_neutrality_fee_delta: Signed<Collateral>
Additional delta neutrality fee paid (or received)
delta_neutrality_fee_delta_usd: Signed<Usd>
Self::delta_neutrality_fee_delta converted to USD at the current price.
updated_at: Timestamp
When the update occurred
Trait Implementations§
source§impl Clone for PositionUpdateEvent
impl Clone for PositionUpdateEvent
source§fn clone(&self) -> PositionUpdateEvent
fn clone(&self) -> PositionUpdateEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PositionUpdateEvent
impl Debug for PositionUpdateEvent
source§impl<'de> Deserialize<'de> for PositionUpdateEvent
impl<'de> Deserialize<'de> for PositionUpdateEvent
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 From<PositionUpdateEvent> for Event
impl From<PositionUpdateEvent> for Event
source§fn from(_: PositionUpdateEvent) -> Self
fn from(_: PositionUpdateEvent) -> Self
source§impl JsonSchema for PositionUpdateEvent
impl JsonSchema for PositionUpdateEvent
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref
keyword. Read moresource§impl PartialEq for PositionUpdateEvent
impl PartialEq for PositionUpdateEvent
source§fn eq(&self, other: &PositionUpdateEvent) -> bool
fn eq(&self, other: &PositionUpdateEvent) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for PositionUpdateEvent
impl Serialize for PositionUpdateEvent
source§impl TryFrom<Event> for PositionUpdateEvent
impl TryFrom<Event> for PositionUpdateEvent
impl StructuralPartialEq for PositionUpdateEvent
Auto Trait Implementations§
impl Freeze for PositionUpdateEvent
impl RefUnwindSafe for PositionUpdateEvent
impl Send for PositionUpdateEvent
impl Sync for PositionUpdateEvent
impl Unpin for PositionUpdateEvent
impl UnwindSafe for PositionUpdateEvent
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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