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

@sheerl/htx-cli

v0.1.0

Published

HTX exchange CLI for AI agents — wraps HTX REST API into a clean command interface

Downloads

34

Readme

@sheerl/htx-cli

HTX exchange CLI for AI agents — wraps HTX REST API into a clean command interface for use with Claude Code, Cursor, etc.

License Node

Install

No npm publish yet. Install directly from GitHub:

# One-shot run
npx -y github:sheerl/htx-skills-hub#main htx-cli spot-market timestamp

# Or clone and use
git clone https://github.com/sheerl/htx-skills-hub.git
cd htx-skills-hub/htx-cli
node bin/htx-cli.js spot-market market-detail-merged -p symbol=btcusdt

Phase 3a — implemented (45 public endpoints, 8 skills)

| Skill | Endpoints | Status | |---|---|---| | spot-market | 13 | ✅ live | | futures-market | 15 | ✅ live | | funding-rate | 4 | ✅ live | | oi-tracker | 2 | ✅ live | | elite-positioning | 2 | ✅ live | | liquidation-stream | 1 | ✅ live | | mark-price | 3 | ✅ live | | settlement | 4 | ✅ live |

All tested against real HTX API on 2026-05-19.

Phase 3b — TODO (signed/private endpoints)

| Skill | Endpoints | Status | |---|---|---| | spot-account | 10 | ⏳ HMAC client ready, handlers TBD | | spot-trading | 11 | ⏳ | | futures-account | 30 | ⏳ | | futures-trading | ~50 | ⏳ |

Quick start

# Real-time BTC spot price
htx-cli spot-market market-detail-merged -p symbol=btcusdt

# All-market funding rates
htx-cli funding-rate batch

# BTC perpetual 4H kline (200 bars)
htx-cli futures-market kline -p contract_code=BTC-USDT -p period=4hour -p size=200

# Top trader L/S ratio
htx-cli elite-positioning account-ratio -p contract_code=BTC-USDT -p period=60min

# Recent BTC liquidation orders
htx-cli liquidation-stream recent -p contract=BTC-USDT

Skill installer

Install one of the 17 skill bundles to ~/.claude/skills/htx/<name>/:

htx-cli skill list                      # all 17 names
htx-cli skill install spot-market       # single
htx-cli skill install all               # all 17

After install, your AI agent (Claude Code etc.) will pick up the SKILL.md automatically.

Configuration

For private endpoints (account/trading — Phase 3b):

export HTX_ACCESS_KEY="your-access-key"
export HTX_SECRET_KEY="your-secret-key"

Network host overrides (default: api.huobi.pro / api.hbdm.vn):

export HTX_HOST_SPOT="api.huobi.pro"
export HTX_HOST_FUTURES="api.hbdm.vn"   # or api.hbdm.com depending on region

Architecture

htx-cli/
├── bin/htx-cli.js      # entry, arg parsing, dispatch
├── src/
│   ├── client/
│   │   └── http.js     # fetch wrapper + HMAC-SHA256 signer
│   ├── commands/
│   │   ├── spot-market.js
│   │   ├── futures-market.js
│   │   ├── funding-rate.js
│   │   └── derivatives.js  # oi/elite/liq/mark/settlement
│   └── installer.js    # skill installer
└── skills/htx/         # 17 skill bundles (SKILL.md + scripts)

Zero external dependencies. Uses Node 18+ built-in fetch and crypto.

License

MIT