import { BaseWorker } from "../base.worker"; import { BybitWsPublic } from "./bybit.ws-public"; import { BybitWsPrivate } from "./bybit.ws-private"; import type { BybitOrder } from "./bybit.types"; import { BybitWsTrading } from "./bybit.ws-trading"; import { type Account, type PlaceOrderOpts, type Timeframe, type FetchOHLCVParams, type ExchangeConfig, type UpdateOrderOpts, type PlacePositionStopOpts, type Position } from "../../types/lib.types"; export declare class BybitWorker extends BaseWorker { publicWs: BybitWsPublic | null; privateWs: Record; tradingWs: Record; pollBalanceTimeouts: Record; isBufferingFills: Record; bufferedFillEvents: Record; start({ accounts, config, requestId, }: { accounts: Account[]; config: ExchangeConfig; requestId: string; }): Promise; stop(): void; fetchPublic(): Promise; addAccounts({ accounts, requestId, }: { accounts: Account[]; requestId?: string; }): Promise; removeAccount({ accountId, requestId, }: { accountId: string; requestId: string; }): Promise; fetchAndPollBalance(account: Account): Promise; updateAccountOrders({ accountId, bybitOrders, }: { accountId: Account["id"]; bybitOrders: BybitOrder[]; }): void; startFillsBuffering(accountId: Account["id"]): void; flushFillsBuffer(accountId: Account["id"]): void; listenOrderBook(symbol: string): void; unlistenOrderBook(symbol: string): void; fetchOHLCV({ requestId, params, }: { requestId: string; params: FetchOHLCVParams; }): Promise; listenOHLCV({ symbol, timeframe }: { symbol: string; timeframe: Timeframe; }): void; unlistenOHLCV({ symbol, timeframe, }: { symbol: string; timeframe: Timeframe; }): void; placePositionStop({ position, stop, requestId, }: { position: Position; stop: PlacePositionStopOpts; requestId: string; priority?: boolean; }): Promise; placeOrders({ orders, accountId, requestId, priority, }: { orders: PlaceOrderOpts[]; accountId: string; requestId: string; priority?: boolean; }): Promise; updateOrders({ updates, accountId, requestId, priority, }: { updates: UpdateOrderOpts[]; accountId: string; requestId: string; priority?: boolean; }): Promise; cancelOrders({ orderIds, accountId, requestId, priority, }: { orderIds: string[]; accountId: string; requestId: string; priority?: boolean; }): Promise; cancelSymbolOrders({ symbol, accountId, requestId, }: { symbol: string; accountId: string; requestId: string; }): Promise; cancelAllOrders({ accountId, requestId, }: { accountId: string; requestId: string; }): Promise; fetchPositionMetadata({ requestId, accountId, symbol, }: { requestId: string; accountId: string; symbol: string; }): Promise; setLeverage({ requestId, accountId, symbol, leverage, }: { requestId: string; accountId: string; symbol: string; leverage: number; }): Promise; }