pub struct PoolLiquidityUpdate {Show 17 fields
pub chain: SharedChain,
pub dex: SharedDex,
pub pool: SharedPool,
pub kind: PoolLiquidityUpdateType,
pub block: u64,
pub transaction_hash: String,
pub transaction_index: u32,
pub log_index: u32,
pub sender: Option<Address>,
pub owner: Address,
pub position_liquidity: Quantity,
pub amount0: Quantity,
pub amount1: Quantity,
pub tick_lower: i32,
pub tick_upper: i32,
pub timestamp: UnixNanos,
pub ts_init: UnixNanos,
}
Expand description
Represents a liquidity update event in a decentralized exchange (DEX) pool.
Fields§
§chain: SharedChain
The blockchain network where the liquidity update occurred.
dex: SharedDex
The decentralized exchange where the liquidity update was executed.
pool: SharedPool
The DEX liquidity pool
kind: PoolLiquidityUpdateType
The type of the pool liquidity update.
block: u64
The blockchain block number where the liquidity update occurred.
transaction_hash: String
The unique hash identifier of the blockchain transaction containing the liquidity update.
transaction_index: u32
The index position of the transaction within the block.
log_index: u32
The index position of the liquidity update event log within the transaction.
sender: Option<Address>
The blockchain address that initiated the liquidity update transaction.
owner: Address
The blockchain address that owns the liquidity position.
position_liquidity: Quantity
The amount of liquidity tokens affected in the position.
amount0: Quantity
The amount of the first token in the pool pair.
amount1: Quantity
The amount of the second token in the pool pair.
tick_lower: i32
The lower price tick boundary of the liquidity position.
tick_upper: i32
The upper price tick boundary of the liquidity position.
timestamp: UnixNanos
The timestamp of the liquidity update in Unix nanoseconds.
ts_init: UnixNanos
UNIX timestamp (nanoseconds) when the instance was created.
Implementations§
Source§impl PoolLiquidityUpdate
impl PoolLiquidityUpdate
Sourcepub const fn new(
chain: SharedChain,
dex: SharedDex,
pool: SharedPool,
kind: PoolLiquidityUpdateType,
block: u64,
transaction_hash: String,
transaction_index: u32,
log_index: u32,
sender: Option<Address>,
owner: Address,
position_liquidity: Quantity,
amount0: Quantity,
amount1: Quantity,
tick_lower: i32,
tick_upper: i32,
timestamp: UnixNanos,
) -> Self
pub const fn new( chain: SharedChain, dex: SharedDex, pool: SharedPool, kind: PoolLiquidityUpdateType, block: u64, transaction_hash: String, transaction_index: u32, log_index: u32, sender: Option<Address>, owner: Address, position_liquidity: Quantity, amount0: Quantity, amount1: Quantity, tick_lower: i32, tick_upper: i32, timestamp: UnixNanos, ) -> Self
Creates a new PoolLiquidityUpdate
instance with the specified properties.
Sourcepub fn instrument_id(&self) -> InstrumentId
pub fn instrument_id(&self) -> InstrumentId
Returns the instrument ID for this liquidity update.
Trait Implementations§
Source§impl Clone for PoolLiquidityUpdate
impl Clone for PoolLiquidityUpdate
Source§fn clone(&self) -> PoolLiquidityUpdate
fn clone(&self) -> PoolLiquidityUpdate
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for PoolLiquidityUpdate
impl Debug for PoolLiquidityUpdate
Source§impl<'de> Deserialize<'de> for PoolLiquidityUpdate
impl<'de> Deserialize<'de> for PoolLiquidityUpdate
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 PoolLiquidityUpdate
impl Display for PoolLiquidityUpdate
Source§impl From<PoolLiquidityUpdate> for DefiData
impl From<PoolLiquidityUpdate> for DefiData
Source§fn from(value: PoolLiquidityUpdate) -> Self
fn from(value: PoolLiquidityUpdate) -> Self
Source§impl HasTsInit for PoolLiquidityUpdate
impl HasTsInit for PoolLiquidityUpdate
Source§impl PartialEq for PoolLiquidityUpdate
impl PartialEq for PoolLiquidityUpdate
Source§impl Serialize for PoolLiquidityUpdate
impl Serialize for PoolLiquidityUpdate
impl StructuralPartialEq for PoolLiquidityUpdate
Auto Trait Implementations§
impl Freeze for PoolLiquidityUpdate
impl RefUnwindSafe for PoolLiquidityUpdate
impl Send for PoolLiquidityUpdate
impl Sync for PoolLiquidityUpdate
impl Unpin for PoolLiquidityUpdate
impl UnwindSafe for PoolLiquidityUpdate
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Separable for Twhere
T: Display,
impl<T> Separable for Twhere
T: Display,
Source§fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
fn separate_by_policy(&self, policy: SeparatorPolicy<'_>) -> String
SeparatorPolicy
. Read more