import type { ExchangeAdapter } from "./exchanges/index.js"; export interface CheckResult { check: "symbol_valid" | "balance_sufficient" | "price_fresh" | "liquidity_ok" | "risk_limits" | "position_exists"; passed: boolean; message: string; details?: Record; } export interface TradeValidation { valid: boolean; checks: CheckResult[]; warnings: string[]; estimatedCost?: { margin: number; fee: number; slippage: number; total: number; }; marketInfo?: { symbol: string; markPrice: number; fundingRate: number; maxLeverage: number; }; timestamp: string; } export interface TradeCheckParams { symbol: string; side: "buy" | "sell"; size: number; price?: number; type?: "market" | "limit" | "stop"; leverage?: number; reduceOnly?: boolean; } /** * Validate a trade before execution. * Runs multiple checks in parallel where possible. */ export declare function validateTrade(adapter: ExchangeAdapter, params: TradeCheckParams): Promise;