jonchurch / tradingview-js-api-tutorial

308 stars 181 forks source link

Can't display chart from exchange #9

Open c-paris opened 5 years ago

c-paris commented 5 years ago

Hello !

I'm on Angular 6 and I'm trying to display the BTC/USD chart from coinbase but it says "invalid symbol". I know it's not React but its pretty similar maybe you can help. I download the chart lib from the private github etc ... This is a part of my component :

private _symbol: ChartingLibraryWidgetOptions['symbol'] = 'Coinbase:BTC/USD'; private _interval: ChartingLibraryWidgetOptions['interval'] = '15'; // BEWARE: no trailing slash is expected in feed URL private _datafeedUrl = 'https://demo_feed.tradingview.com'; private _libraryPath: ChartingLibraryWidgetOptions['library_path'] = '/assets/charting_library/'; private _chartsStorageUrl: ChartingLibraryWidgetOptions['charts_storage_url'] = 'https://saveload.tradingview.com'; private _chartsStorageApiVersion: ChartingLibraryWidgetOptions['charts_storage_api_version'] = '1.1'; private _clientId: ChartingLibraryWidgetOptions['client_id'] = 'tradingview.com'; private _userId: ChartingLibraryWidgetOptions['user_id'] = 'public_user_id'; private _fullscreen: ChartingLibraryWidgetOptions['fullscreen'] = false; private _autosize: ChartingLibraryWidgetOptions['autosize'] = true; private _containerId: ChartingLibraryWidgetOptions['container_id'] = 'tv_chart_container'; private _tvWidget: IChartingLibraryWidget | null = null;

Thanks !