import * as api from '../../api'; import './chart.global.css'; import { PriceLinesDatum, ChartPaddingPercents, DraftPrices } from './types'; import { TradingOrder, TradingPosition } from '../../store/types'; import { OrderSide } from '../../api'; import { RootStore } from '../../store'; interface Params { onUpdateAlerts: (d: number[]) => void; onUpdateDrafts: (d: DraftPrices) => void; onClickDraftCheck: (d: DraftPrices & { newClientOrderId: string; }, side: OrderSide) => Promise; onDragLimitOrder: (clientOrderId: string, price: number) => void; onCancelOrder: (clientOrderId: string) => void; alerts: number[]; draftPriceItems: PriceLinesDatum[]; pricePrecision: number; paddingPercents: ChartPaddingPercents; calculateLiquidationPrice: RootStore['trading']['calculateLiquidationPrice']; calculateQuantity: RootStore['trading']['calculateQuantity']; getPseudoPosition: RootStore['trading']['getPseudoPosition']; } export default class CandlestickChart { #private; constructor(container: string | Node | HTMLElement | HTMLElement[] | Node[], { pricePrecision, alerts, paddingPercents, calculateLiquidationPrice, calculateQuantity, getPseudoPosition, onUpdateDrafts, onUpdateAlerts, onClickDraftCheck, onDragLimitOrder, onCancelOrder, }: Params); /** * The method updates chart properties but not chart data * @param properties - New chart properties */ update(data: { currentSymbolPseudoPosition?: TradingPosition | null; markPrice?: string; totalWalletBalance?: number; currentSymbolInfo?: api.FuturesExchangeInfoSymbol | null; currentSymbolLeverage?: number; filledOrders?: api.FuturesOrder[]; leverageBrackets?: Record; isCurrentSymbolMarginTypeIsolated?: boolean; candles?: api.FuturesChartCandle[]; position?: TradingPosition | null; orders?: TradingOrder[]; alerts?: number[]; customPriceLines?: PriceLinesDatum[]; buyDraftPrice?: number | null; sellDraftPrice?: number | null; buyDraftSize?: number | null; sellDraftSize?: number | null; shouldShowBuyDraftPrice?: boolean; shouldShowSellDraftPrice?: boolean; stopBuyDraftPrice?: number | null; stopSellDraftPrice?: number | null; shouldShowStopBuyDraftPrice?: boolean; shouldShowStopSellDraftPrice?: boolean; canCreateDraftLines?: boolean; paddingPercents?: ChartPaddingPercents; }): void; /** * Removes SVG */ unmount(): void; resetAlerts: () => void; } export {}; //# sourceMappingURL=index.d.ts.map