Skip to content

feat: add token info, price, liquidity & risk commands and config command#1

Merged
junjieit merged 13 commits into
mainfrom
feat/optimize-token-info
May 29, 2026
Merged

feat: add token info, price, liquidity & risk commands and config command#1
junjieit merged 13 commits into
mainfrom
feat/optimize-token-info

Conversation

@junjieit

@junjieit junjieit commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add token info, token price, token liquidity, and token risk subcommands for on-chain token analysis
  • Add config command for managing CLI configuration
  • Risk analysis powered by GoPlus
  • Support native token info/price lookup via CoinGecko coin ID
  • Add sources field to token liquidity output
  • Fix secure persisted config precedence
  • Fix release workflow to skip instead of failing on version validation errors
  • Bump version to 0.3.0

Test plan

  • Test token info for ERC-20 and native tokens on multiple chains
  • Test token price with CoinGecko primary and DexScreener fallback
  • Test token liquidity output includes sources field
  • Test token risk returns GoPlus risk data
  • Test config command reads/writes configuration correctly

🤖 Generated with Claude Code

@junjieit junjieit changed the title Feat/optimize token info feat: add token info, price, liquidity & risk commands, config command, migrate to GoPlus May 29, 2026
@junjieit junjieit changed the title feat: add token info, price, liquidity & risk commands, config command, migrate to GoPlus feat: add token info, price, liquidity & risk commands and config command May 29, 2026
junjieit and others added 13 commits May 29, 2026 17:41
…xScreener fallback

- New `token price <TOKEN>` subcommand returning price, 1h/24h/7d changes,
  24h high/low with per-field source tracking (CoinGecko primary, DexScreener
  backup for price/change_1h/change_24h)
- Rename `liquidity` → `primary_liquidity` across models, table labels, and
  JSON output
- Add `TokenMetadataClient` with CoinGecko and DexScreener integration
- Add JSON Output Field Reference section to SKILL.md documenting which fields
  are display-ready vs raw integers

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ce tracking

- Rename TokenMetadataSources → TokenInfoSources, metadata_sources → sources
- Remove address field from sources (user already knows the address they queried)
- Only update info.address when the external API returns a different value

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Native tokens (ETH, BNB, AVAX, etc.) use a sentinel address that
CoinGecko's contract endpoint doesn't recognize. Now uses /coins/{id}
for native tokens and DexScreener wrapped-address fallback.

- Add coingecko_id to NativeToken config for all 17 chains
- Add fetch_coingecko_by_id method to TokenMetadataClient
- In fetch_price, detect native sentinel and route to correct API

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
token info ETH/BNB/etc. previously failed with RPC error on the sentinel
address. Now builds TokenInfo from chain config for native tokens and
enriches via /coins/{id} (CoinGecko) + wrapped address (DexScreener).

- In info handler: detect native sentinel, build TokenInfo from chain config
- In enrich: use fetch_coingecko_by_id for native tokens
- In apply_patch: skip address overwrite when current address is native sentinel

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…ity → top_liquidity

- New `token liquidity <TOKEN>` showing DexScreener liquidity data:
  top liquidity, pair count, top pair details (DEX, address, 24h volume)
- Rename primary_liquidity → top_liquidity across all models and labels
- Extend DexScreenerPair with dex_id, pair_address, volume fields
- Handle native tokens via wrapped address for DexScreener lookup

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Risk analysis for ERC-20 tokens: risk_level, risk_score, honeypot,
blacklist, transfer_restricted, mintable, owner_privileged, tax_buy,
tax_sell. Native tokens return hardcoded low-risk defaults.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add `config` command (set/get/list/unset) for managing API keys in
  persistent config.env file with cross-platform support
- Switch token risk analysis from OKX OnchainOS to GoPlus Security API
  (free, no credentials required), with trust_list-based scoring for
  centralized tokens like USDT/USDC
- Remove all OKX API integration (search, metadata, risk) and related
  dependencies (hmac, base64, sha2)
- Fix token search filtering: exclude null addresses and non-EVM
  addresses from CoinGecko and DexScreener results
- Update SKILL.md with config command docs and GoPlus risk documentation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…rrors

When version/channel validation fails (e.g. stable version on non-main
branch), set should_release=false and exit 0 instead of exit 1. This
allows the workflow to succeed while skipping build and release jobs.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@junjieit junjieit force-pushed the feat/optimize-token-info branch from 03c28bb to 42de055 Compare May 29, 2026 09:42
@junjieit junjieit merged commit 3a2a79c into main May 29, 2026
3 checks passed
@junjieit junjieit deleted the feat/optimize-token-info branch May 29, 2026 09:42
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