Skip to content

Feat/protocol command#4

Open
junjieit wants to merge 10 commits into
mainfrom
feat/protocol-command
Open

Feat/protocol command#4
junjieit wants to merge 10 commits into
mainfrom
feat/protocol-command

Conversation

@junjieit
Copy link
Copy Markdown
Collaborator

@junjieit junjieit commented Jun 2, 2026

No description provided.

junjieit and others added 10 commits May 29, 2026 18:05
Add `wallet balance` and `wallet overview` commands that aggregate
on-chain data from multiple providers with graceful fallback:
Debank → Zerion → Goldrush → on-chain RPC.

- Debank: total_balance, all_token_list, all_complex_protocol_list
- Zerion: portfolio + positions with DeFi protocol discovery
- Goldrush: activity-based chain discovery + per-chain balances_v2
- On-chain ERC-20 fallback via JSON-RPC

Other changes:
- `--chain-id` scopes all fields uniformly across all data sources
- Rate-limit resilience: 429/503 backoff with Retry-After parsing
- Goldrush fan-out concurrency capped at 5 via Semaphore
- Zerion chain slug audit with coverage test for all registered chains
- Update README, README_CN, and SKILL.md with wallet docs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Add `wallet pnl` for PnL analysis (realized/unrealized gains, ROI, win
rate) via Zerion's FIFO-based /pnl endpoint. Add `wallet history` for
transaction history with Zerion primary and Debank fallback, including
token_in, token_out, amount, value_usd, and success fields.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add `wallet defi` subcommand to query DeFi positions across protocols
  (deposits, LPs, staking, borrows) with Debank primary and Zerion fallback
- Enrich Debank API types for per-portfolio-item DeFi position extraction
- Add WalletDefi/DefiPosition/DefiPositionToken models and table renderer
- Add Dune client and dune_api_key to configurable keys
- Add Zerion wallet_labels with behavioral tag derivation
- Fix test compilation: add missing dune_api_url/dune_api_key fields to all
  test AppConfig initializers (swap, token, quote, rpc, config)
- Suppress dead_code warnings on Debank API response fields

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- Add wallet pnl, history, labels, defi to SKILL.md
- Add dune_api_key to configurable keys table
- Update description with new capabilities

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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