1.0.15 • Published 6 years ago

react-tradingview-wrapper v1.0.15

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

Install

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

Usage

Basic example

import TradingView from 'react-tradingview';

const App = () => (
  <TradingView symbol="NASDAQ:AAPL" />
);

All given props are passed on to the widget config. See this page for the TradingView Advanced Real-Time Chart API.

Advanced example

import TradingView, { Themes } from 'react-tradingview-wrapper';

const App = () => (
  <TradingView
    symbol="NASDAQ:AAPL"
    theme={Themes.DARK}
    locale="fr"
    autosize
  />
);

Constants and API differences

react-tradingview-wrapper exports constants for the following things:

  • Interval types: IntervalTypes.D and IntervalTypes.W
  • Themes: Themes.LIGHT and Themes.DARK
  • BarStyles:
    • BarStyles.BARS
    • BarStyles.CANDLES
    • BarStyles.HOLLOW_CANDLES
    • BarStyles.HEIKIN_ASHI
    • BarStyles.LINE
    • BarStyles.AREA
    • BarStyles.RENKO
    • BarStyles.LINE_BREAK
    • BarStyles.KAGI
    • BarStyles.POINT_AND_FIGURE

You don't have to use these constants.

react-tradingview-wrapper also makes it possible to use numbers for interval, popup_width and popup_height instead of strings, but this is not required.

1.0.15

6 years ago

1.0.14

6 years ago

1.0.13

6 years ago

1.0.12

6 years ago

1.0.11

6 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago