export interface OrderbookLevel { price: string; size: string; } export interface BookSnapshot { type: 'book_snapshot'; asset_id: string; market: string; event_title?: string; question?: string; outcome?: string; slug?: string; bids: OrderbookLevel[]; asks: OrderbookLevel[]; } export interface BookUpdate { type: 'book_update'; asset_id: string; market: string; event_title?: string; question?: string; outcome?: string; slug?: string; bids: OrderbookLevel[]; asks: OrderbookLevel[]; } export interface PriceChangeAsset { asset_id: string; price: string; outcome: string; } export interface PriceChange { type: 'price_change'; market: string; event_title?: string; question?: string; slug?: string; assets: PriceChangeAsset[]; } /** Discriminated union of all individual orderbook update types. */ export type OrderbookUpdate = BookSnapshot | BookUpdate | PriceChange; export interface SubscribedMessage { type: 'subscribed'; markets: number; } export interface SnapshotBatchMessage { type: 'snapshot_batch'; count: number; total_sent: number; snapshots: BookSnapshot[]; } export interface SnapshotsDoneMessage { type: 'snapshots_done'; total: number; } export interface BatchMessage { type: 'batch'; ts: number; count: number; updates: OrderbookUpdate[]; } export interface ObErrorMessage { error: string; message: string; max?: number; requested?: number; } export interface OrderbookOptions { compress?: boolean; autoReconnect?: boolean; maxReconnectAttempts?: number; reconnectBaseDelay?: number; reconnectMaxDelay?: number; } export interface OrderbookEventMap { snapshot: BookSnapshot; update: BookUpdate; price: PriceChange; snapshots_done: SnapshotsDoneMessage; subscribed: SubscribedMessage; error: ObErrorMessage; '*': OrderbookUpdate; } //# sourceMappingURL=orderbook.d.ts.map