Skip to main content

Binance-first trading CLI for balances, market data, opportunity scanning, and execution.

Project description

CoinHunter Banner

Typing SVG

A Binance-first crypto trading CLI for balances, market data, opportunity scanning, and execution.


Install

For end users, install from PyPI with pipx (recommended) to avoid polluting your system Python:

pipx install coinhunter
coinhunter --help

Check the installed version:

coinhunter --version

To update later:

pipx upgrade coinhunter

Initialize runtime

coinhunter init
coinhunter init --force

This creates:

  • ~/.coinhunter/config.toml
  • ~/.coinhunter/.env
  • ~/.coinhunter/logs/

If you are using zsh or bash, init will also generate and install shell completion scripts automatically, and update your rc file (~/.zshrc or ~/.bashrc) if needed.

config.toml stores runtime and strategy settings. .env stores:

BINANCE_API_KEY=
BINANCE_API_SECRET=

Override the default home directory with COINHUNTER_HOME.

Commands

By default, CoinHunter prints human-friendly TUI tables. Add --agent to any command to get JSON output (or compact pipe-delimited tables for large datasets).

# Account
coinhunter account overview
coinhunter account overview --agent
coinhunter account balances
coinhunter account positions

# Market
coinhunter market tickers BTCUSDT ETH/USDT sol-usdt
coinhunter market klines BTCUSDT ETHUSDT --interval 1h --limit 50

# Trade
coinhunter trade buy BTCUSDT --quote 100 --dry-run
coinhunter trade sell BTCUSDT --qty 0.01 --type limit --price 90000

# Opportunities
coinhunter opportunity portfolio
coinhunter opportunity scan
coinhunter opportunity scan --symbols BTCUSDT ETHUSDT SOLUSDT

# Self-upgrade
coinhunter upgrade

# Shell completion (manual)
coinhunter completion zsh  > ~/.zsh/completions/_coinhunter
coinhunter completion bash > ~/.local/share/bash-completion/completions/coinhunter

upgrade will try pipx upgrade coinhunter first, and fall back to pip install --upgrade coinhunter if pipx is not available.

Architecture

CoinHunter V2 uses a flat, direct architecture:

Layer Responsibility Key Files
CLI Single entrypoint, argument parsing cli.py
Binance Thin API wrappers with unified error handling binance/spot_client.py
Services Domain logic services/account_service.py, services/market_service.py, services/trade_service.py, services/opportunity_service.py
Config TOML config, .env secrets, path resolution config.py
Runtime Paths, TUI/JSON/compact output runtime.py
Audit Structured JSONL logging audit.py

Logging

Audit logs are written to:

~/.coinhunter/logs/audit_YYYYMMDD.jsonl

Events include:

  • trade_submitted
  • trade_filled
  • trade_failed
  • opportunity_portfolio_generated
  • opportunity_scan_generated

Development

Clone the repo and install in editable mode:

git clone https://git.tacitlab.cc/TacitLab/coinhunter-cli.git
cd coinhunter-cli
pip install -e ".[dev]"

Run quality checks:

pytest tests/           # run tests
ruff check src tests     # lint
mypy src                 # type check

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coinhunter-2.0.7.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coinhunter-2.0.7-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

Details for the file coinhunter-2.0.7.tar.gz.

File metadata

  • Download URL: coinhunter-2.0.7.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for coinhunter-2.0.7.tar.gz
Algorithm Hash digest
SHA256 d4b066d70d824980940d5b6f16a8ae39ca833f3e97dfee324e5890d41ceb50ae
MD5 48797c428998305c863407f9b9d3b98e
BLAKE2b-256 d754b1bac9894c8448f9d6b0a227b154d04b896480dfbb12f79acf3e7fef3621

See more details on using hashes here.

File details

Details for the file coinhunter-2.0.7-py3-none-any.whl.

File metadata

  • Download URL: coinhunter-2.0.7-py3-none-any.whl
  • Upload date:
  • Size: 23.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for coinhunter-2.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 eeff98c357a126606ee16e3323cdb70d7caa740c03a46f9d6e2bed2b4494329d
MD5 cb8208021098c3bf906d540de96fe434
BLAKE2b-256 bae589fa68e2768005f243ef6672d73b305886bf7733b58633af3c519a6998a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page