Socket
Socket
Sign inDemoInstall

cryptocurrency-trading-indicators

Package Overview
Dependencies
2
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cryptocurrency-trading-indicators

A typescript starter for building javascript libraries and projects


Version published
Weekly downloads
1
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 05 Apr 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc