Typescript component for TradingView Embeds
npm install --save typescript-tradingview-embed
or
yarn add typescript-tradingview-embed
App.js / App.ts
TODO: update usage
import { TradingViewEmbed, widgetType } from "typescript-tradingview-embed";
export default function App() {
return (
<div
className="App"
style={{background: "rgba(0, 0, 0, 0.85)"}}
>
<TradingViewEmbed
widgetType={widgetType.ADVANCED_CHART}
widgetConfig={{
colorTheme: "dark",
symbol: "BITMEX:XBTUSD",
width: "100%"
}}
/>
<TradingViewEmbed
widgetType={widgetType.SCREENER_CRYPTOCURRENCY}
widgetConfig={{
colorTheme: "dark",
width: "100%",
height: "230",
}}
/>
<TradingViewEmbed
widgetType={widgetType.TICKER_TAPE}
widgetConfig={{
colorTheme: "light",
autosize: true
}}
/>
</div>
);
}
Use widgetConfig to declare widget parameters.
See each individual widgets for available parameters.
The above code running:
Supported widgets in plan:
- ADVANCED_CHART
- COMPANY_PROFILE
- ECONOMIC_CALENDAR
- FOREX_CROSS_RATES
- FOREX_HEATMAP
- FUNDAMENTAL_DATA
- MARKET_DATA
- MARKET_OVERVIEW
- MINI_CHART
- SCREENER
- SCREENER_CRYPTOCURRENCY
- SYMBOL_INFO
- SYMBOL_OVERVIEW
- STOCK_MARKET
- TECHNICAL_ANALYSIS
- TICKER
- TICKER_SINGLE
- TICKER_TAPE
Open a new PR here on GitHub.
- Run
git clone https://github.com/nordible/typescript-tradingview-embed.git
this project - Run
cd typescript-tradingview-embed/
to this project - Run
npm run dev
to start the project on local machine
Have a bug or an issue? Open a new issue here on GitHub.
Code licensed under MIT. Everything else is CC
Thanks to @xnr-k
© nordible