Module uniswap_v3_sdk::extensions
source · Expand description
Extensions to the core library.
Structs§
- A data provider that fetches ticks using an ephemeral contract in a single
eth_call
. - A data provider that fetches ticks using an ephemeral contract in a single
eth_call
.
Statics§
Traits§
Functions§
- Convert a
FractionBase
object to aBigDecimal
. - Get the state and pool for all positions of the specified owner by deploying an ephemeral contract via
eth_call
. - Get the real-time collectable token amounts.
- Fetches the liquidity within a tick range for the specified pool, using an ephemeral contract in a single
eth_call
. - Get a
Pool
struct from pool key - Get a
Position
struct from the token id - Predict the position if the pool price becomes the specified price.
- Predict the position after rebalance assuming the pool price remains the same.
- Predict the position after rebalance assuming the pool price becomes the specified price.
- Get the token SVG URL of the specified position.
- Parses the specified price string for the price of
base_token
denominated inquote_token
. - Same as
price_to_closest_tick
but returnsMIN_TICK
orMAX_TICK
if the price is outside Uniswap’s range. - Finds the closest usable tick for the specified price and pool fee tier.
- Given a price ratio of token1/token0, calculate the sqrt ratio of token1/token0.
- Given a sqrt ratio, returns the price of the base token in terms of the quote token.
- Returns the tick range for a position ratio and range width.
- Given a tick, returns the price of token0 in terms of token1 as a
BigDecimal
. - Given a price ratio of token1/token0, calculate the proportion of the position value that is held in token0 for a given tick range. Inverse of
token0_ratio_to_price
. - For a given tick range from
tick_lower
totick_upper
, and a given proportion of the position value that is held in token0, calculate the price of token0 denominated in token1.