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

pip install -e ".[dev]"
coinhunter --help

Initialize runtime

coinhunter init
coinhunter init --force

This creates:

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

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

BINANCE_API_KEY=
BINANCE_API_SECRET=

Override the default home directory with COINHUNTER_HOME.

Commands

# Account
coinhunter account overview
coinhunter account balances --spot --futures
coinhunter account positions --spot

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

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

# Trade (Futures)
coinhunter trade futures buy BTCUSDT --qty 0.01 --dry-run
coinhunter trade futures sell BTCUSDT --qty 0.01 --reduce-only
coinhunter trade futures close BTCUSDT

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

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, binance/um_futures_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, JSON helpers 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

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.0.tar.gz (20.5 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.0-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: coinhunter-2.0.0.tar.gz
  • Upload date:
  • Size: 20.5 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.0.tar.gz
Algorithm Hash digest
SHA256 f294b2527e2cb3ea62c80ec0fe3ae214fa58df29eb200864df56c33a8a3bf343
MD5 e9652109119eb9d91a5203cdb3ea5cfd
BLAKE2b-256 09e9f2da89922556261660d4b79af84b81c2d7923ee12ed154db6f0241eb548b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: coinhunter-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 19.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 470cb100f1150d2e0aa091e86620a1f40ce547ff7ca2001214ee362b1114a211
MD5 9b6af9df40d14a0e4ad8f949fed9dae8
BLAKE2b-256 e4e1c87e9f9d0b3555e9b3e2b241005bc43b36cc01088ce76dbe2babf6927435

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