import * as api from '../../../../api'; import './chart.global.css'; import { PriceLinesDatum, ChartPaddingPercents, DraftPrices, AlertItem } from './types'; import { TradingOrder, TradingPosition, OrderToBeCreated } from '../../../../store/types'; import { OrderSide } from '../../../../api'; import { RootStore } from '../../../../store'; interface Params { onUpdateAlerts: (d: AlertItem[]) => void; onUpdateDrafts: (d: DraftPrices) => void; onDoubleClick: () => void; onClickDraftCheck: (d: DraftPrices & { newClientOrderId: string; }, side: OrderSide) => Promise; onDragLimitOrder: (clientOrderId: string, price: number) => void | Promise; onCancelOrder: (clientOrderId: string) => void | Promise; 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, paddingPercents, calculateLiquidationPrice, calculateQuantity, getPseudoPosition, onDoubleClick, 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?: number; totalWalletBalance?: number; currentSymbolInfo?: api.FuturesExchangeInfoSymbol | null; currentSymbolLeverage?: number; filledOrders?: api.FuturesOrder[]; leverageBrackets?: Record; isCurrentSymbolMarginTypeIsolated?: boolean; candles?: api.FuturesChartCandle[]; position?: TradingPosition | null; orders?: TradingOrder[]; alerts?: AlertItem[]; customPriceLines?: PriceLinesDatum[]; ordersToBeCreated?: OrderToBeCreated[]; 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; shouldShowBidAskLines?: boolean; shouldShowVolume?: boolean; bids?: [number, number][]; asks?: [number, number][]; shouldShowEma?: [boolean, boolean, boolean, boolean]; emaNumbers?: [number, number, number, number]; emaColors?: [string, string, string, string]; shouldShowSupertrend?: boolean; supertrendPeroid?: number; supertrendMultiplier?: number; supertrendDownTrendColor?: string; supertrendUpTrendColor?: string; paddingPercents?: ChartPaddingPercents; }): void; /** * Removes SVG */ unmount(): void; resetAlerts: () => void; } export {}; //# sourceMappingURL=index.d.ts.map