/tradingview-jsapi-forex

Ready-made solution TradingView Charting Library jsapi with Forex provider Fcsapi.com

Primary LanguageJavaScriptMIT LicenseMIT

TradingView JS API Forex

Ready-made solution TradingView Charting Library with Forex provider Fcsapi.com.

Repository features:

  • TradingView Charting Library
  • Updating data every minute (can be changed)
  • Low-level save/load API with backend

Articles

Before begin

The Charting Library is free, but its code is in the private repository on GitHub. Make sure that you have access to this repository: https://github.com/tradingview/charting_library/.

If you see 404 error page, then you need to request access to this repository at https://tradingview.com/HTML5-stock-forex-bitcoin-charting-library/?feature=technical-analysis-charts and click on the Get Library button.

Features

Client-side

  • Vuejs 2.x
  • @vue/cli-service (Webpack 4, SASS/SCSS)

Server-side

  • Fastifyjs
  • NeDB

Installation

Install dependences for client and server side.

$ cd client && npm install
$ cd server && npm install

Copy charting_library folder from https://github.com/tradingview/charting_library/ to /public folder. The earliest supported version of the Charting Library is 1.15. If you get 404 then you need to request an access to this repository.

/config.js

Data provider need <API_KEY>

{
    key: 'YOUR_KEY'
}

Commands

// client\package.json
$ cd client && npm run serve // run
$ cd client && npm run build

// server\package.json
$ cd server && npm run start // run
$ cd server && npm run build

PHP only

Can be CORS error, to solve add in .htaccess this lines:

Header add Access-Control-Allow-Origin "*"
Header add Access-Control-Allow-Headers "origin, x-requested-with, content-type"
Header add Access-Control-Allow-Methods "PUT, GET, POST, DELETE, OPTIONS"

Contributors