npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@devanshhq/indica

v0.2.0

Published

Fast technical analysis indicators for Indian stock markets. 16 indicators, signal engine, batch screening.

Readme

indica

Fast technical analysis indicators for stock markets. Built in Rust. Built for Indian markets.

npm License: MIT CI

Why

JavaScript/Python TA libraries are slow when screening thousands of stocks. indica computes all indicators for 2,000 stocks in 6ms using Rust + Rayon parallelism.

No other TA library has India-specific indicators (delivery volume analysis, circuit limit detection).

Indicators (16)

| Category | Indicators | |----------|-----------| | Trend | SMA, EMA, Supertrend, ADX | | Momentum | RSI, MACD (with crossover), Stochastic (%K/%D) | | Volatility | Bollinger Bands (%B), ATR | | Volume | OBV, VWAP, Volume Trend | | Support/Resistance | Classic Pivot Points (R3-S3) | | India-Specific | Delivery % Analysis, Circuit Limit Proximity |

Installation

# Rust
[dependencies]
indica = "0.1"

Quick Start

use indica::{sma, rsi, macd, supertrend, bollinger_bands, stochastic, vwap, obv};

let closes = vec![44.34, 44.09, 44.15, 43.61, 44.33, 44.83, 45.10,
                  45.42, 45.84, 46.08, 45.89, 46.03, 45.61, 46.28,
                  46.28, 46.00, 46.03, 46.41, 46.22, 46.21];

sma(&closes, 20);                           // Some(45.52)
rsi(&closes, 14);                           // Some(55.37)
macd(&closes, 12, 26, 9);                   // Some(MacdResult { crossover: Bullish, ... })
bollinger_bands(&closes, 20, 2.0);          // Some(BollingerBandsResult { upper, lower, %B })
stochastic(&highs, &lows, &closes, 14, 3); // Some(StochasticResult { k, d })
supertrend(&highs, &lows, &closes, 10, 3.0); // Some(SupertrendResult { direction: Up })
vwap(&highs, &lows, &closes, &volumes);    // Some(245.67)
obv(&closes, &volumes);                     // Some(1234567.0)

Streaming API (real-time)

Feed candles one at a time — O(1) updates, no recomputation:

use indica::{Rsi, Sma, Candle, Indicator};

let mut rsi = Rsi::new(14);
let mut sma = Sma::new(20);

for candle in live_feed {
    if let Some(value) = rsi.update(&candle) {
        println!("RSI: {:.1}", value);
    }
    if let Some(value) = sma.update(&candle) {
        println!("SMA: {:.2}", value);
    }
}

Available streaming indicators: Sma, Ema, Rsi, Supertrend, Adx

India-Specific Indicators

Indicators that only work with Indian market data (NSE/BSE):

use indica::{delivery_pct, delivery_trend, circuit_proximity, CircuitLimit};

// Delivery Volume Analysis (unique to NSE/BSE)
let pct = delivery_pct(500_000.0, 1_000_000.0); // 50.0%

// Delivery trend: high delivery + price up = genuine buying
let trend = delivery_trend(&delivery_pcts, &closes, 3, 10);
// Some(DeliveryTrend::Accumulation)

// Circuit Limit Proximity
let status = circuit_proximity(108.0, 100.0, CircuitLimit::Percent10);
// CircuitStatus { upper_limit: 110.0, near_upper: false, ... }

Architecture

src/
├── core/               ← Candle, Indicator trait, utils
├── indicators/
│   ├── trend/          ← SMA, EMA, Supertrend, ADX
│   ├── momentum/       ← RSI, MACD, Stochastic
│   ├── volatility/     ← Bollinger Bands, ATR
│   ├── volume/         ← OBV, VWAP, Volume Trend
│   ├── support_resistance/ ← Pivot Points
│   └── india/          ← Delivery Analysis, Circuit Limits
├── signals/            ← Signal engine (Buy/Sell with confidence)
└── batch/              ← Parallel batch processing + screening

API Reference

Convenience Functions

| Function | Returns | |----------|---------| | sma(closes, period) | Option<f64> | | ema(closes, period) | Option<f64> | | rsi(closes, period) | Option<f64> | | macd(closes, fast, slow, signal) | Option<MacdResult> | | stochastic(highs, lows, closes, k, d) | Option<StochasticResult> | | bollinger_bands(closes, period, mult) | Option<BollingerBandsResult> | | atr(highs, lows, closes, period) | Option<f64> | | supertrend(highs, lows, closes, period, mult) | Option<SupertrendResult> | | adx(highs, lows, closes, period) | Option<f64> | | obv(closes, volumes) | Option<f64> | | vwap(highs, lows, closes, volumes) | Option<f64> | | volume_trend(volumes) | &str | | pivot_points(high, low, close) | PivotPointsResult | | delivery_pct(delivery_vol, total_vol) | f64 | | delivery_trend(pcts, closes, short, long) | Option<DeliveryTrend> | | circuit_proximity(price, prev_close, limit) | CircuitStatus |

All functions return Option when there isn't enough data. No panics, no NaN.

Building

cargo build --release
cargo test
cargo clippy -- -D warnings

Contributing

PRs welcome. Run cargo test && cargo clippy -- -D warnings && cargo fmt --check before submitting.

License

MIT