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

devarztv

v1.1.0

Published

CLI to fetch TradingView candlestick data for multiple pairs and multiple timeframes at once (multi-TF), JSON output, modern boxed terminal display.

Readme

devarztv

CLI to fetch TradingView candlestick data for multiple pairs and multiple timeframes at once (multi-TF), with JSON output and a modern, boxed terminal display.

Built for SMC/ICT trading workflows that need multi-timeframe data (e.g. HTF for structural bias + LTF for entries) without manually opening charts one by one.

© devarz — all rights reserved.


Installation

Global (recommended, so the dtv command can be called from anywhere)

npm install -g devarztv

Or run directly without installing (npx)

npx devarztv

Note: dtv is the short bin name for the devarztv package. If your environment (e.g. Termux) already has another global dtv command installed, there will be a name conflict — uninstall the old one first or run via npx devarztv.


Usage

After a global install, simply run:

dtv

The CLI will interactively ask for:

  1. Exchange mode — choose between typing the full EXCHANGE:SYMBOL yourself for every pair, or setting a default exchange prefix to use for short symbols.
  2. Default exchange prefix (only if you chose the prefix mode) — type any exchange you want, e.g. OANDA, FX, FOREXCOM, BINANCE, NASDAQ. Not limited to OANDA.
  3. Pairs — comma-separated.
    # Manual mode (full symbol typed yourself):
    FX:XAUUSD,BINANCE:BTCUSDT,NASDAQ:AAPL
    
    # Default-prefix mode (e.g. prefix set to FOREXCOM):
    XAUUSD,EURUSD,GBPJPY
    In default-prefix mode, you can still override the prefix for any individual pair by typing its own EXCHANGE: — your explicit prefix is always respected over the default.
  4. Timeframes — pick one or more from the list (1, 3, 5, 15, 30, 60, 120, 240, D, W, M) using the spacebar to multi-select.
  5. Custom timeframes — optional, if you need a timeframe outside the listed options.
  6. Number of candles (bars) — how much history to fetch per pair/timeframe combination (manual entry, max 5000).
  7. Output file name — the resulting .json file name.

Example session

$ dtv

devarztv — Multi-Pair Multi-Timeframe TradingView Fetcher
© devarz

? Enter pairs: XAUUSD,EURUSD
? Select timeframe(s): 15, 60, 240
? Custom timeframe(s): (empty)
? Number of candles: 500
? Output file name: gold_eur_mtf.json

✔ OANDA:XAUUSD @ 15 -> 500 candles
✔ OANDA:XAUUSD @ 60 -> 500 candles
✔ OANDA:XAUUSD @ 240 -> 500 candles
✔ OANDA:EURUSD @ 15 -> 500 candles
✔ OANDA:EURUSD @ 60 -> 500 candles
✔ OANDA:EURUSD @ 240 -> 500 candles

[summary table]
[result box: saved file, duration, success/fail count]

JSON output format

{
  "generatedAt": "2026-06-21T07:00:00.000Z",
  "pairs": ["OANDA:XAUUSD"],
  "timeframes": ["15", "60"],
  "barsRequested": 500,
  "results": [
    {
      "symbol": "OANDA:XAUUSD",
      "timeframe": "15",
      "success": true,
      "name": "GOLD",
      "currency": "USD",
      "count": 500,
      "candles": [
        {
          "time": 1718870400,
          "timeISO": "2026-06-20T08:00:00.000Z",
          "open": 2345.5,
          "high": 2348.1,
          "low": 2344.0,
          "close": 2346.7,
          "volume": null
        }
      ]
    }
  ]
}

Candles are sorted ascending (oldest → newest) within each pair/timeframe combination.


Using it as a library (optional)

Besides the CLI, the core fetcher module can also be used directly in Node.js code:

const { fetchMulti } = require('devarztv/src/fetcher');

(async () => {
  const data = await fetchMulti({
    pairs: ['OANDA:XAUUSD', 'OANDA:EURUSD'],
    timeframes: ['15', '60'],
    bars: 300,
  });

  console.log(data.results);
})();

Troubleshooting

Permission denied when running dtv (especially on Termux/Android)

This package already includes a postinstall script that automatically sets executable permission on bin/dtv.js. But if you still hit this error (e.g. npm was run with --ignore-scripts, or permission got reset after a manual update), run:

chmod +x $(which dtv)

or if you know the global install location:

chmod +x /data/data/com.termux/files/usr/bin/dtv

inquirer.prompt is not a function or another error when the prompt starts

Run in debug mode to see the full error details:

DEBUG=1 dtv

Notes

  • TradingView's public data (no login required) is sufficient for most common forex/crypto pairs.
  • For private/premium data access, set the SESSION and SIGNATURE environment variables (the sessionid & signature cookies from a TradingView account) — this can be extended further as needed.
  • Candle data library: @mathieuc/tradingview.

License

MIT © devarz