Access TradingView.com ticker data

Ekliptor

Administrator
Staff member
Requirements:

Getting started:

WolfBot can easily access every TradingView ticker during live trading.
To do this you just create a TradingView object:
JavaScript:
let tradingView = new TradingViewTicker();
An example strategy that already has a TradingView object is AbstractCrawlerStrategy.

Example usage:
JavaScript:
// get the latest value of Bitfinex margin shorts
let shorts = await tradingView.getTradingviewTicker("BITFINEX:BTCUSDSHORTS");
console.log("last price %s", shorts.lp);

// add the coinbase BTCUSD rate to an array
// for example on every candle tick by calling it from checkIndicators()
let btcPrices = [];
let spotBtc = await tradingView.getTradingviewTicker("COINBASE:BTCUSD");
this.tradingView.addTickerValue(btcPrices, spotBtc, 14);
 
Last edited: