Skip to content
React Component for TradingView Embeds (https://www.tradingview.com/widget/)
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
src
.gitignore
README.md
babel.config.js
package-lock.json
package.json

README.md

react-tradingview-embed

React component for TradingView Embeds

Installation

npm install --save react-tradingview-embed
or
yarn add react-tradingview-embed

Example

App.js

import React from 'react';

import { TradingViewEmbed, widgetType } from "react-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: screen

Supported widgets:

You can’t perform that action at this time.