/chart

TradingView chart implementation for React using Cryptocompare websocket API

Primary LanguageHTML

CryptoCompare API may be blocked by CORS policy so try out the solution. (https://stackoverflow.com/a/42024918/6382158)

Interval

Timeframe

Default Options

Disable Features

Enable Features

Configure Buttons

widget.createButton()

Add New Pairings

  • To add new pairings, add symbol like "BTC/UTH" as key, exhange that supports the key(symbol) as value
  • and add symbol, full_name, description, exchange, type to data array for searchable and selectable pairings
  • Let's say you want to add "LTC/BTC" pairing.You should know which exchange supports the pairing.In this case "LTC/BTC" is supported by Binance.Then,

export default {
  "BTC/USD": "Coinbase",
  "ETH/USD": "Coinbase",
  "XLM/BTC": "Bitfinex",
  "XLM/ETH": "Bitfinex",
  "XLM/USD": "Bitfinex",
  "LTC/BTC": "Binance"
}


{
  symbol: 'LTC/BTC',
  full_name: 'LTC/BTC',
  description: 'description',
  exchange: 'Binance',
  type: 'type'
}

How to build

git clone https://github.com/yasincidem/chart.git

cd chart

npm install

Make your changes on code

To test your changes do npm start.It will be displayed on localhost:3000

To get production build do npm run build.It will create build folder.

Get charting_library folder, static folder and index.html from build folder add these to public folder in your react app