/** * Spot trading interface for exchanges that support both spot and perp. * Separate from ExchangeAdapter because spot uses balance-based tracking * (not position-based) and has no leverage, liquidation, or funding concepts. * * Supported: Hyperliquid, Lighter (Pacifica is perp-only) */ export interface SpotMarketInfo { symbol: string; baseToken: string; quoteToken: string; markPrice: string; volume24h: string; sizeDecimals: number; priceDecimals: number; } export interface SpotBalance { token: string; total: string; available: string; held: string; entryNtl?: string; } export interface SpotOrderParams { symbol: string; side: "buy" | "sell"; /** Price as number or string — adapter rounds to exchange precision automatically */ price: number | string; /** Size as number or string — adapter rounds to exchange precision automatically */ size: number | string; tif?: string; } export interface SpotAdapter { readonly name: string; getSpotMarkets(): Promise; getSpotOrderbook(symbol: string): Promise<{ bids: [string, string][]; asks: [string, string][]; }>; getSpotBalances(): Promise; spotMarketOrder(symbol: string, side: "buy" | "sell", size: string): Promise; spotLimitOrder(symbol: string, side: "buy" | "sell", price: string, size: string, opts?: { tif?: string; }): Promise; spotCancelOrder(symbol: string, orderId: string): Promise; } /** * U-token (Unit protocol) → underlying perp symbol mapping. * These are bridged tokens on HyperEVM with the same price as the underlying (~0.1% deviation). */ export declare const SPOT_PERP_TOKEN_MAP: Record; /** Reverse: perp symbol → U-token spot name on HL */ export declare const PERP_TO_SPOT_MAP: Record; /** Maximum price deviation (%) between spot and perp to be considered same underlying */ export declare const MAX_PRICE_DEVIATION_PCT = 5;