UNPKG

@devasher/kuru-sdk

Version:

Ethers v6 SDK to interact with Kuru (forked from @kuru-labs/kuru-sdk)

70 lines 4.82 kB
export interface BatchLPDetails { bids: Position[]; asks: Position[]; quoteLiquidity: bigint; baseLiquidity: bigint; } export interface Position { price: bigint; flipPrice: bigint; liquidity: bigint; } export declare abstract class PositionViewer { /** * @dev Retrieves details for concentrated liquidity positions within a price range. * @param minFeesBps - The minimum fees to filter positions by. * @param startPrice - The lower bound of the price range to query. * @param endPrice - The upper bound of the price range to query. * @param bestAskPrice - The current market price. * @param pricePrecision - The precision of the price. * @param tickSize - The size of a tick. * @param quoteLiquidity - The total quote liquidity in the market. * @param baseLiquidity - The total base liquidity in the market. * @returns A promise that resolves to the batch order details. */ static getSpotBatchLPDetails(minFeesBps: bigint, startPrice: bigint, endPrice: bigint, bestAskPrice: bigint, pricePrecision: bigint, sizePrecision: bigint, quoteAssetDecimals: bigint, baseAssetDecimals: bigint, tickSize: bigint, minSize: bigint, quoteLiquidity?: bigint, // In quote asset decimals baseLiquidity?: bigint): Promise<BatchLPDetails>; /** * Calculates the liquidity distribution for a batch of limit orders on a "Curve" or "U-shape". * The core principle is that quote currency value is lowest at the outer edges of the * price range and increases in an arithmetic progression towards the center (bestAskPrice). * * @param minFeesBps - Minimum fees in basis points. * @param startPrice - The starting price for placing liquidity (farthest bid). * @param endPrice - The ending price for placing liquidity (farthest ask). * @param bestAskPrice - The current best ask price on the market, which is the center of the curve. * @param pricePrecision - The precision factor for prices (e.g., 10^18). * @param sizePrecision - The precision factor for position sizes (e.g., 10^6). * @param quoteAssetDecimals - The number of decimals for the quote asset. * @param baseAssetDecimals - The number of decimals for the base asset. * @param tickSize - The minimum price increment. * @param minSize - The minimum position size allowed. * @param quoteLiquidity - The total liquidity for one side of the curve, denominated in the quote asset. * @param baseLiquidity - The total liquidity for the asks side of the curve, denominated in the base asset. * @returns A promise resolving to an object with bid and ask positions and total liquidity. */ static getCurveBatchLPDetails(minFeesBps: bigint, startPrice: bigint, endPrice: bigint, bestAskPrice: bigint, pricePrecision: bigint, sizePrecision: bigint, quoteAssetDecimals: bigint, baseAssetDecimals: bigint, tickSize: bigint, minSize: bigint, quoteLiquidity?: bigint, // In quote asset decimals baseLiquidity?: bigint): Promise<BatchLPDetails>; /** * Calculates the liquidity distribution for a batch of limit orders in a "bid-ask" or "triangular" shape. * The core principle is that quote liquidity is lowest at the center (best bid/ask) and increases * linearly as prices move away from the spread. * * @param minFeesBps - Minimum fees in basis points. * @param startPrice - The starting price for placing liquidity (farthest bid). * @param endPrice - The ending price for placing liquidity (farthest ask). * @param bestAskPrice - The current best ask price, which defines the center of the spread. * @param pricePrecision - The precision factor for prices (e.g., 10^18). * @param sizePrecision - The precision factor for position sizes (e.g., 10^6). * @param quoteAssetDecimals - The number of decimals for the quote asset. * @param baseAssetDecimals - The number of decimals for the base asset. * @param tickSize - The minimum price increment. * @param minSize - The minimum position size allowed. * @param quoteLiquidity - The total liquidity for one side (e.g., asks), denominated in the quote asset. * @param baseLiquidity - The total liquidity for one side (e.g., asks), denominated in the base asset. * @returns A promise resolving to an object with bid and ask positions and total liquidity. */ static getBidAskBatchLPDetails(minFeesBps: bigint, startPrice: bigint, endPrice: bigint, bestAskPrice: bigint, pricePrecision: bigint, sizePrecision: bigint, quoteAssetDecimals: bigint, baseAssetDecimals: bigint, tickSize: bigint, minSize: bigint, quoteLiquidity?: bigint, // In quote asset decimals baseLiquidity?: bigint): Promise<BatchLPDetails>; } //# sourceMappingURL=positionViewer.d.ts.map