import { FC } from 'react'; declare enum Exchange { BINANCE = "binance", KUCOIN = "kucoin" } interface ExchangeConfig { name: string; value: string; restApiUrl: string; wsUrl: string; getWsUrl?: (symbol?: string) => Promise; } declare const SUPPORTED_EXCHANGES: Record; interface IOrderLine { text: string; tooltip?: Array; quantity?: string; price: number; color?: string; } /** * This is the generic type useful for declaring a nominal type, * which does not structurally matches with the base type and * the other types declared over the same base type * * Usage: * @example * type Index = Nominal; * // let i: Index = 42; // this fails to compile * let i: Index = 42 as Index; // OK * @example * type TagName = Nominal; */ declare type Nominal = T & { /* eslint-disable-next-line jsdoc/require-jsdoc */ [Symbol.species]: Name; }; /** * Resolution or time interval is a time period of one bar. Advanced Charts supports tick, intraday (seconds, minutes, hours), and DWM (daily, weekly, monthly) resolutions. The table below describes how to specify different types of resolutions: * * Resolution | Format | Example * ---------|----------|--------- * Ticks | `xT` | `1T` — one tick, `5T` — five ticks, `100T` — one hundred ticks * Seconds | `xS` | `1S` — one second * Minutes | `x` | `1` — one minute * Hours | `x` minutes | `60` — one hour * Days | `xD` | `1D` — one day * Weeks | `xW` | `1W` — one week * Months | `xM` | `1M` — one month * Years | `xM` months | `12M` — one year * * Refer to [Resolution](https://www.tradingview.com/charting-library-docs/latest/ui_elements/Resolution) for more information. */ type ResolutionString = Nominal; interface TimeMarker { id: string; /** Unix timestamp in seconds. */ time: number; text: string; color?: string; } interface OrderLine extends IOrderLine { id: string; lineStyle?: number; editable?: boolean; } interface TVChartContainerProps { symbol?: string; interval?: ResolutionString; libraryPath?: string; timescaleMarks?: any[]; orderLines?: OrderLine[]; onTick?: (event: any) => void; getLatestBar?: (data: any) => void; onOrderLineMove?: (id: string, price: number) => void; onOrderLineEditCancel?: () => void; timeMarker?: TimeMarker; onTimeMarkerMove?: (id: string, time: number) => void; exchange?: string; style?: React.CSSProperties; } declare const TVChartContainer: FC; export { Exchange, type ExchangeConfig, type OrderLine, SUPPORTED_EXCHANGES, type TimeMarker, TVChartContainer as default };