import { Contract } from 'ethers'; import { Trade } from '../types'; /** * PairInfo Queries RPC * Handles querying pair-related information like price impact, skew, fees, and loss protection */ export declare class PairInfoQueriesRPC { private pairInfosContract; private priceAggregatorContract; constructor(pairInfosContract: Contract, priceAggregatorContract: Contract); /** * Get loss protection tier for a trade * @param trade - Trade information * @param isPnl - Whether calculating for PnL * @returns Loss protection tier */ getLossProtectionTier(trade: Trade, isPnl?: boolean): Promise; /** * Get price impact spread for a position * @param pairIndex - Trading pair index * @param isLong - True for long position * @param positionSizeUsdc - Position size in USDC * @param isOpen - Whether opening or closing * @returns Price impact spread percentage */ getPriceImpactSpread(pairIndex: number, isLong: boolean, positionSizeUsdc: number, isOpen: boolean): Promise; /** * Get skew impact spread for a position * @param pairIndex - Trading pair index * @param isLong - True for long position * @param positionSizeUsdc - Position size in USDC * @param isOpen - Whether opening or closing * @returns Skew impact spread percentage */ getSkewImpactSpread(pairIndex: number, isLong: boolean, positionSizeUsdc: number, isOpen: boolean): Promise; /** * Get price impact percentage for a position * @param pairIndex - Trading pair index * @param isLong - True for long position * @param positionSizeUsdc - Position size in USDC * @returns Price impact percentage */ getPriceImpactP(pairIndex: number, isLong: boolean, positionSizeUsdc: number): Promise; /** * Get opening fee in USDC for a position * @param pairIndex - Trading pair index * @param positionSizeUsdc - Position size in USDC * @param isLong - True for long position * @returns Opening fee in USDC */ getOpenFeeUsdc(pairIndex: number, positionSizeUsdc: number, isLong: boolean): Promise; /** * Get opening fee percentage for a position (from PriceAggregator) * @param pairIndex - Trading pair index * @param positionSizeUsdc - Position size in USDC * @param isLong - True for long position * @returns Opening fee percentage (12 decimals) */ getOpenFeeP(pairIndex: number, positionSizeUsdc: number, isLong: boolean): Promise; /** * Get pair margin fee percentage * @param pairIndex - Trading pair index * @returns Margin fee percentage */ getPairMarginFeeP(pairIndex: number): Promise; /** * Get loss protection tier for a pair and position size * @param pairIndex - Trading pair index * @param positionSizeUsdc - Position size in USDC * @returns Loss protection tier */ getLossProtectionTierForSize(pairIndex: number, positionSizeUsdc: number): Promise; /** * Get loss protection percentage for a pair and tier * @param pairIndex - Trading pair index * @param tier - Loss protection tier * @returns Loss protection percentage */ getLossProtectionP(pairIndex: number, tier: number): Promise; /** * Get 1% depth above (for longs) in USDC * @param pairIndex - Trading pair index * @returns Depth in USDC */ getOnePercentDepthAboveUsdc(pairIndex: number): Promise; /** * Get 1% depth below (for shorts) in USDC * @param pairIndex - Trading pair index * @returns Depth in USDC */ getOnePercentDepthBelowUsdc(pairIndex: number): Promise; /** * Get both depth values for a pair * @param pairIndex - Trading pair index * @returns Object with depth above and below */ getDepth(pairIndex: number): Promise<{ above: number; below: number; }>; }