@roylines/tradingview
A node module for accessing trading view technical analysis signals. This allows you to access the numbers underpinning, for example, the BTC to GBP technicals.
Install
npm install @roylines/tradingview
Quick Start
const tradingview = require('@roylines/tradingview');
const signal = await tradingview.get()
console.log('signal', signal)
API
get(opts): Promise
Retrieves a signal from tradingview
Options:
-
ticker: String
, the ticker to obtain a signal for. Defaults toCOINBASE:BTCGBP
. -
resolution: Integer
, the resolution of the technical signal in seconds. Defaults to1
. -
scanner: String
, the scanner to use. Defaults tocrypto
-
indicator: String
, the indicator to retrieve. Defaults toRecommend.All
.
Returns:
-
ticker: String
, the ticker used. -
resolution: Integer
, the resolution used. -
scanner: String
, the scanner used. -
indicator: String
, the indicator retrieved. -
signal: Float
, the signal from trading view. This a float between -1 and 1 where -1 represents a strong sell signal, 1 represents a strong buy signal, and 0 represents a neutral view.
Example:
const tradingview = require('@roylines/tradingview')
const {signal} = await tradingview.get({ticker: "COINBASE:BTCGBP", resolution: 5});
console.log('signal received', signal)
License
MIT