import type { OrderbookEvent, OrderbookQuotationMode, TradingMode } from "@0xmonaco/types"; /** * State structure for current subscription ref */ export interface OrderbookSubscriptionRef { /** The pair subscribed to */ pair: string; /** The mode subscribed to */ mode: TradingMode; /** The magnitude for orderbook grouping */ magnitude?: number; /** The quotation mode for orderbook subscription */ quotationMode?: OrderbookQuotationMode; } /** * Return type for the useOrderbook hook */ export interface UseOrderbookReturn { /** Current orderbook snapshot */ orderbook: OrderbookEvent | null; /** Whether currently subscribed to a market */ subscribed: boolean; /** Any error that occurred during connection or subscription */ error: Error | null; /** Clear the current error state */ clearError: () => void; }