pub fn position_status(
current_sqrt_price: u128,
tick_index_1: i32,
tick_index_2: i32,
) -> PositionStatus
Expand description
Calculate the status of a position The status can be one of three values:
- InRange: The position is in range
- BelowRange: The position is below the range
- AboveRange: The position is above the range
§Parameters
sqrt_price
- A u128 integer representing the sqrt price of the pooltick_index_1
- A i32 integer representing the first tick index of the positiontick_index_2
- A i32 integer representing the second tick index of the position
§Returns
- A PositionStatus enum value indicating the status of the position