@roylines/tradingview

module to access tradingview.com data

Usage no npm install needed!

<script type="module">
  import roylinesTradingview from 'https://cdn.skypack.dev/@roylines/tradingview';
</script>

README

@roylines/tradingview

ci npm version

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 to COINBASE:BTCGBP.
  • resolution: Integer, the resolution of the technical signal in seconds. Defaults to 1.
  • scanner: String, the scanner to use. Defaults to crypto
  • indicator: String, the indicator to retrieve. Defaults to Recommend.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