vsadeghizade / tradingview-udf-binance-websocket

This is a sample project that is implemented to provide TradingView Charting Library UDF data from Binance exchange.

Home Page:https://www.tradingview.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TradingView Charting Library UDF Data Source

License: MIT

This is a sample code to implement UDF-compatible data source from Binance exchange for TradingView Charting Library by using node-binance-api library and Redis data store to increase response speed.

Built With

  • Node.js
  • Express.js
  • Redis

Packages Used

  • node-binance-api-modified-futures - The project to interact with the Binance API
  • Express-validator - Validator and sanitizer functions
  • Promise - Handle the result of an asynchronous task
  • ioredis - A fast, open source, in-memory, key-value data store.
  • Apidoc - API documantation

Prerequisite

  • Node & npm
  • Redis

Installation

npm install

Setup Redis

You should set your Redis configration in (/config/config.json)

Run

npm start

Docker

docker build . -t <your username>/tradingview-udf-binance
docker run -p 3000:3000 -d <your username>/tradingview-udf-binance

Default port is 3000.

Test

In browser open: http://localhost:3000/symbols?symbol=BTCUSDT

Test with Chart Library

Take library from TradingView repo. Open index.html and find new TradingView.widget({}) and setup config:

Set symbol to BTCUSDT Set datafeed to new Datafeeds.UDFCompatibleDatafeed('http://localhost:3000')

Contributing

All contributions welcome.

Credits

License

The MIT License (MIT)

Links

About

This is a sample project that is implemented to provide TradingView Charting Library UDF data from Binance exchange.

https://www.tradingview.com

License:MIT License


Languages

Language:JavaScript 98.9%Language:Dockerfile 1.1%