cryptocurrency-trading-indicators
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

Cryptocurrency Trading Indicators

Provide trading technical indicator values based on market data of almost crypto currency exchanges

Installation

$ npm install cryptocurrency-trading-indicators

Available Indicators

Boilinger Bands, EMA, MACD, RSI, SMA, WMA

Supported exchanges

Supported interval

  • 1m : 1 minute
  • 5m: 5 minutes
  • 15m: 15 minutes
  • 30m: 30 minutes
  • 45m: 45 minutes
  • 1h : 1 hour
  • 2h : 2 hours
  • 4h : 4 hours
  • 1d : 1 day
  • 1w : 1 week
  • 1M : 1 month

Sample Code

Create indicators

  • Constructor:
    • exchange
    • symbol
    • interval
    • isFuture : true if future exchange (default is false, means that spot exchange)
  import { Indicators } from 'cryptocurrency-trading-indicators'
  const indicators = new Indicators("binance", "BTC/USDT", "15m", true)

EMA (Exponential Moving Average)

  • Parameters:
    • period: integer
    • ohlcvType: OHLCV_TYPE
  const emaData = await indicators.EMA(8, OHLCV_TYPE.O)
  console.log(emaData)

SMA (Simple Moving Average)

  • Parameters:
    • period: integer
    • ohlcvType: OHLCV_TYPE
  const smaData = await indicators.SMA(8, OHLCV_TYPE.O)
  console.log(smaData)

RSI

  • Parameters:
    • period: integer
    • ohlcvType: OHLCV_TYPE
  const rsiData = await indicators.RSI(14, OHLCV_TYPE.O)
  console.log(rsiData)

Package Sidebar

Install

npm i cryptocurrency-trading-indicators

Weekly Downloads

3

Version

1.0.3

License

MIT

Unpacked Size

32.9 kB

Total Files

23

Last publish

Collaborators

  • stellantilet