/** * @packageDocumentation * @module DexVM-Interfaces */ export interface OrderbookEntry { price: string; size: string; total: string; numOrders: number; } export interface GetOrderbookParams { market: string; depth?: number; } export interface GetOrderbookResponse { market: string; bids: OrderbookEntry[]; asks: OrderbookEntry[]; sequence: number; timestamp: string; } export type OrderSide = "buy" | "sell"; export type OrderType = "limit" | "market" | "stop" | "stopLimit"; export type OrderStatus = "open" | "partial" | "filled" | "cancelled" | "expired"; export type TimeInForce = "GTC" | "IOC" | "FOK" | "GTT"; export interface PlaceOrderParams { market: string; side: OrderSide; type: OrderType; price?: string; size: string; timeInForce?: TimeInForce; postOnly?: boolean; reduceOnly?: boolean; clientId?: string; commitment?: string; } export interface PlaceOrderResponse { orderId: string; market: string; side: OrderSide; type: OrderType; price: string; size: string; status: OrderStatus; createdAt: string; } export interface CancelOrderParams { orderId: string; market: string; } export interface Order { orderId: string; market: string; side: OrderSide; type: OrderType; price: string; size: string; filled: string; remaining: string; status: OrderStatus; timeInForce: TimeInForce; postOnly: boolean; reduceOnly: boolean; clientId: string; createdAt: string; updatedAt: string; } export interface Trade { tradeId: string; market: string; side: OrderSide; price: string; size: string; fee: string; feeAsset: string; makerOrderId: string; takerOrderId: string; timestamp: string; } export interface Pool { poolId: string; tokenA: string; tokenB: string; reserveA: string; reserveB: string; totalLiquidity: string; fee: string; tickSpacing: number; sqrtPrice: string; tick: number; createdAt: string; } export interface GetPoolParams { poolId?: string; tokenA?: string; tokenB?: string; } export interface GetQuoteParams { poolId: string; tokenIn: string; amountIn: string; slippageBps?: number; } export interface GetQuoteResponse { poolId: string; tokenIn: string; tokenOut: string; amountIn: string; amountOut: string; priceImpact: string; fee: string; route: string[]; } export interface SwapParams { poolId: string; tokenIn: string; amountIn: string; minAmountOut: string; deadline?: string; commitment?: string; } export interface SwapResponse { txId: string; poolId: string; tokenIn: string; tokenOut: string; amountIn: string; amountOut: string; fee: string; timestamp: string; } export interface AddLiquidityParams { poolId: string; amountA: string; amountB: string; minAmountA?: string; minAmountB?: string; tickLower?: number; tickUpper?: number; deadline?: string; } export interface AddLiquidityResponse { txId: string; poolId: string; amountA: string; amountB: string; liquidity: string; positionId: string; timestamp: string; } export interface RemoveLiquidityParams { poolId: string; positionId: string; liquidity: string; minAmountA?: string; minAmountB?: string; deadline?: string; } export interface RemoveLiquidityResponse { txId: string; poolId: string; amountA: string; amountB: string; liquidity: string; timestamp: string; } export interface Market { marketId: string; baseAsset: string; quoteAsset: string; status: "active" | "paused" | "settlement"; maxLeverage: number; maintenanceMargin: string; initialMargin: string; tickSize: string; stepSize: string; indexPrice: string; markPrice: string; openInterest: string; fundingRate: string; nextFundingTime: string; createdAt: string; } export interface Position { positionId: string; marketId: string; side: OrderSide; size: string; entryPrice: string; markPrice: string; liquidationPrice: string; margin: string; leverage: string; unrealizedPnl: string; realizedPnl: string; fundingPayment: string; createdAt: string; updatedAt: string; } export interface MarginAccount { address: string; totalBalance: string; availableBalance: string; lockedMargin: string; unrealizedPnl: string; positions: Position[]; } export interface FundingRate { marketId: string; rate: string; fundingTime: string; indexPrice: string; markPrice: string; } export interface InsuranceFund { balance: string; totalDeposits: string; totalWithdrawals: string; totalSocialized: string; lastUpdated: string; } export interface Commitment { commitmentId: string; sender: string; commitHash: string; blockHeight: number; revealed: boolean; expiry: string; createdAt: string; } export interface MEVStats { totalCommitments: number; totalRevealed: number; totalExpired: number; protectedVolume: string; avgCommitRevealDelay: string; } export interface ADLStatus { enabled: boolean; marketId: string; adlThreshold: string; insuranceFundBalance: string; currentRatio: string; triggerLevel: number; } export interface ADLStats { totalEvents: number; totalDeleveraged: string; totalAffectedPositions: number; lastEventTime: string; } export interface ADLEvent { eventId: string; marketId: string; positionId: string; side: OrderSide; size: string; price: string; reason: string; timestamp: string; } export interface DexStatus { version: string; networkId: number; chainId: string; blockHeight: number; uptime: string; totalMarkets: number; totalPools: number; healthy: boolean; } export interface TradingStats { volume24h: string; trades24h: number; fees24h: string; openInterest: string; totalValueLocked: string; uniqueTraders24h: number; topMarkets: MarketVolume[]; } export interface MarketVolume { market: string; volume: string; trades: number; } //# sourceMappingURL=interfaces.d.ts.map