docs: clarify that trade accepts bare tickers, not just addresses - #77
Open
psmiratisu wants to merge 1 commit into
Open
docs: clarify that trade accepts bare tickers, not just addresses#77psmiratisu wants to merge 1 commit into
psmiratisu wants to merge 1 commit into
Conversation
`acp trade` forwards --token-in/--token-out to /trade/plan, whose resolver (internal-trading-bot) resolves a bare ticker for the two directional shapes: a buy (dollar -> --token-out <TICKER>) picks the highest-24h-volume deployment, and a sell (--token-in <TICKER> -> dollar) matches the wallet's holdings. The old "anything else is treated as a token address" line was stale -- it only holds for a token->token swap with no dollar leg. Update SKILL.md and README so users (and agents driving the CLI) pass the ticker instead of pre-resolving a contract address. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
acp tradenever resolves tokens locally — it forwards--token-in/--token-outto the/trade/planbackend (internal-trading-bot), whose resolver handles bare tickers for directional trades:--token-in→--token-out <TICKER>) → the deployment with the highest 24h volume (filters same-ticker scams)--token-in <TICKER>→ a dollar--token-out) → the wallet's actual holdingsThe old line — "Known token symbols … anything else is treated as a token address" — was stale: it only holds for a token→token swap with no dollar leg (there a non-canonical bare symbol is rejected as
AMBIGUOUS_SYMBOLand needs an address). As written it pushed users and CLI-driving agents to pre-resolve a contract address they don't need.Changes
SKILL.md(swap section) andREADME.md(Trading section): replace the "treated as a token address" line with the accurate rule — a bare ticker resolves for buys/sells; an explicit address is only required for a token→token swap.Docs only — no code or CLI behavior change. The backend already behaves this way; verified against
internal-trading-botPOST /api/trade/plan→resolveFlatTrade→resolveByTicker(buy = highest 24h volume, sell = wallet holdings).Note
Recommend a quick testnet smoke-test before merge (a small buy-by-ticker, e.g.
acp trade --token-in usdc --chain-in 8453 --amount-in 2 --token-out <TICKER> --chain-out 8453 --json) to confirm the wording matches the deployed backend for a direct CLI user.🤖 Generated with Claude Code
Note
Low Risk
Documentation-only edits to README and SKILL; no code, APIs, or trading logic changed.
Overview
Docs-only update to
README.mdandSKILL.mdso swap guidance matches howacp tradeactually works with the/trade/planbackend.The old wording implied non-canonical symbols are always treated as contract addresses. The new text says canonical symbols still resolve locally, but directional buys and sells can pass a bare ticker and the backend picks the token (buy: highest 24h volume; sell: wallet holdings). Token→token swaps without a dollar leg still need an explicit address; bare tickers there stay ambiguous (
AMBIGUOUS_SYMBOL).No CLI or runtime behavior changes.
Reviewed by Cursor Bugbot for commit 61671c1. Bugbot is set up for automated code reviews on this repo. Configure here.