Skip to content

refactor: split fintool into per-exchange CLIs#9

Merged
juntao merged 4 commits intomainfrom
refactor/multi-binary-cli
Mar 9, 2026
Merged

refactor: split fintool into per-exchange CLIs#9
juntao merged 4 commits intomainfrom
refactor/multi-binary-cli

Conversation

@juntao
Copy link
Member

@juntao juntao commented Mar 9, 2026

Summary

  • Split single fintool binary into 5 dedicated CLIs: fintool (market intelligence), hyperliquid, binance, coinbase, polymarket
  • Removed --exchange flag — each binary handles one exchange directly
  • Removed order subcommand — spot trading is now buy/sell at top level
  • Removed predict subcommand — polymarket uses list/quote/buy/sell/positions directly
  • Shared logic stays in fintool_lib library crate; per-binary CLI definitions and JSON dispatch are self-contained
  • All CLIs support --json mode for programmatic use
  • Updated README, SKILL.md, all 18 test scripts, and all 4 example bot files

Test plan

  • cargo check — clean
  • cargo clippy -- -D warnings — clean
  • cargo fmt -- --check — clean
  • All 5 binaries build and show correct --help output
  • Run tests/hyperliquid/e2e_trading.sh end-to-end
  • Run tests/polymarket/predict_btc.sh end-to-end
  • Verify fintool --json '{"command":"quote","symbol":"BTC"}' returns data
  • Verify hyperliquid --json '{"command":"balance"}' returns data

🤖 Generated with Claude Code

juntao and others added 4 commits March 9, 2026 18:56
Replace the single fintool binary with 5 dedicated CLIs:
- fintool: market intelligence (quote, news, report, init)
- hyperliquid: spot + perp + HIP-3 + deposits/withdrawals/transfers
- binance: spot + perp + deposits/withdrawals
- coinbase: spot + deposits/withdrawals
- polymarket: prediction market trading

This removes the --exchange flag, the "order" subcommand (now just
buy/sell), and the "predict" subcommand (polymarket uses direct
commands). Shared logic stays in the library crate (fintool_lib).

Updates README, SKILL.md, all test scripts, and example bots.

Signed-off-by: Michael Yuan <michael@secondstate.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update release workflow to package all 5 binaries (fintool,
hyperliquid, binance, coinbase, polymarket) into each platform zip.
Static linking via musl for Linux and crt-static for Windows.
Verify static linking for all binaries.

Update CI workflow smoke tests to use the new binary names
(hyperliquid quote instead of fintool perp quote, etc.).

Signed-off-by: Michael Yuan <michael@secondstate.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The perp quote command now correctly lives under the `perp` subcommand
(e.g. `hyperliquid perp quote TSLA`) instead of being a top-level command.

Signed-off-by: Michael Yuan <michael@secondstate.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Michael Yuan <michael@secondstate.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@juntao juntao merged commit c323d0d into main Mar 9, 2026
2 checks passed
@juntao juntao deleted the refactor/multi-binary-cli branch March 9, 2026 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant