New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cryptocurrency-trading-indicators

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cryptocurrency-trading-indicators

A typescript starter for building javascript libraries and projects

1.0.3
latest
Source
npm
Version published
Weekly downloads
29
1350%
Maintainers
1
Weekly downloads
 
Created
Source

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

  • https://github.com/ccxt/ccxt#certified-cryptocurrency-exchanges
  • https://github.com/ccxt/ccxt#supported-cryptocurrency-exchange-markets

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)

Keywords

trading

FAQs

Package last updated on 05 Apr 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts