tradingview-adapter is a node.js application for handling data from Trading View webhooks and route it to associated strategies servers.
Use npm.
npm install
- Determine
.env
file for the local server as in.env.example
- Edit
strategy.config.js
for your own strategies servers configuration. - Recommended payload for Trading View alert webhook:
{
"Ticker" : "{{ticker}}",
"Price" : "{{strategy.order.price}}",
"Time" : "{{time}}",
"Strategy": "strategy name",
"Action" : "long || short || close_long || close_short"
"Mode" : "development" || "master"
}
NOTE: Ticker - Use ticker name as on exchange! Not always Tradingview has the same ticker name, for example, Tradingview ticker - BTCUSDTPERP | Binance futures ticker - BTCUSDT *use this one.
Action - You can use {{strategy.order.alert_message}} + set alert_message in pine script (v4+)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.