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.
- Node.js
- Express.js
- Redis
- 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
- Node & npm
- Redis
npm install
You should set your Redis configration in (/config/config.json)
npm start
docker build . -t <your username>/tradingview-udf-binance
docker run -p 3000:3000 -d <your username>/tradingview-udf-binance
Default port is 3000.
In browser open: http://localhost:3000/symbols?symbol=BTCUSDT
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')
All contributions welcome.
- Vahid Sadeghizadeh
- All Contributors
The MIT License (MIT)