import type { BaseExchange } from "../exchanges/base.exchange"; import { type FastTradingApiOptions, type FetchOHLCVParams, type Store, ExchangeName, type Account, type Position, type Candle, type PlaceOrderOpts, type Timeframe, type Order, type OrderBook, type TWAPOpts, type ChaseOpts, type ExchangeConfig, type PlacePositionStopOpts } from "../types/lib.types"; export declare class FastTradingApi { store: Store; accounts: Account[]; config: Record; exchanges: Partial>; listeners: { [key: string]: ((...args: any[]) => void)[]; }; constructor({ accounts, config, store }: FastTradingApiOptions); start(): Promise; stop(): Promise; addAccounts(accounts: Account[]): Promise; removeAccount(accountId: string): Promise; fetchOHLCV({ exchangeName, params, }: { exchangeName: ExchangeName; params: FetchOHLCVParams; }): Promise; listenOHLCV({ exchangeName, symbol, timeframe, callback, }: { exchangeName: ExchangeName; symbol: string; timeframe: Timeframe; callback: (candle: Candle) => void; }): void; unlistenOHLCV({ exchangeName, symbol, timeframe, }: { exchangeName: ExchangeName; symbol: string; timeframe: Timeframe; }): void; listenOrderBook({ exchangeName, symbol, callback, }: { exchangeName: ExchangeName; symbol: string; callback: (orderBook: OrderBook) => void; }): void; unlistenOrderBook({ exchangeName, symbol, }: { exchangeName: ExchangeName; symbol: string; }): void; placePositionStop({ position, stop, priority, }: { position: Position; stop: PlacePositionStopOpts; priority?: boolean; }): Promise; placeOrder({ order, accountId, priority, }: { order: PlaceOrderOpts; accountId: string; priority?: boolean; }): Promise; placeOrders({ orders, accountId, priority, }: { orders: PlaceOrderOpts[]; accountId: string; priority?: boolean; }): Promise; updateOrder({ order, update, priority, }: { order: Order; update: { amount: number; } | { price: number; }; priority?: boolean; }): Promise; updateOrders({ updates, priority, }: { updates: { order: Order; update: { amount: number; } | { price: number; }; }[]; priority?: boolean; }): Promise; cancelOrder({ orderId, accountId, priority, }: { orderId: string | number; accountId: string; priority?: boolean; }): Promise; cancelOrders({ orderIds, accountId, priority, }: { orderIds: Array; accountId: string; priority?: boolean; }): Promise; cancelSymbolOrders({ symbol, accountId, priority, }: { symbol: string; accountId: string; priority?: boolean; }): Promise; cancelAllOrders({ accountId, priority, }: { accountId: string; priority?: boolean; }): Promise; fetchPositionMetadata({ accountId, symbol, }: { accountId: string; symbol: string; }): Promise<{ leverage: number; isHedged: boolean; }>; setLeverage({ accountId, symbol, leverage, }: { accountId: string; symbol: string; leverage: number; }): Promise; startTwap({ accountId, twap }: { accountId: string; twap: TWAPOpts; }): Promise; pauseTwap({ accountId, twapId }: { accountId: string; twapId: string; }): Promise; resumeTwap({ accountId, twapId }: { accountId: string; twapId: string; }): Promise; stopTwap({ accountId, twapId }: { accountId: string; twapId: string; }): Promise; startChase({ accountId, chase }: { accountId: string; chase: ChaseOpts; }): Promise; stopChase({ accountId, chaseId }: { accountId: string; chaseId: string; }): Promise; getExchange(exchangeName: ExchangeName): BaseExchange; getAccountExchange(accountId: string): BaseExchange; on(event: "log" | "error", listener: (message: string) => void): void; emit(event: "log" | "error", ...args: any[]): void; }