Closed lukaspetrasek closed 4 months ago
Essentially we are asking for an "ordebook projection" of the CL AMM (Ekubo).
Part of that is that on some specified price levels we want to know how much liquidity is between this price level and 5% below (or above).
Get token prices
and Get pool liquidity
[https://docs.ekubo.org/integration-guides/reference/ekubo-api/api-endpoints]@djeck1432
Compute available liquidity at Ekubo for any given token at any given price level.
Let's choose, for example, the STRK-USDC pair and assume the current price is 2 USDC per 1 STRK. We're interested in the amounts of USDC that we'll be able to swap for STRK at Ekubo while not pushing the price by more than 5% in a scenario where the STRK price falls to, e.g., 1.9 USDC, 1.8 USDC, ... 1 USDC, etc.