Skip to content

docs: clarify that trade accepts bare tickers, not just addresses - #77

Open
psmiratisu wants to merge 1 commit into
mainfrom
docs/trade-accepts-tickers
Open

docs: clarify that trade accepts bare tickers, not just addresses#77
psmiratisu wants to merge 1 commit into
mainfrom
docs/trade-accepts-tickers

Conversation

@psmiratisu

@psmiratisu psmiratisu commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

What

acp trade never resolves tokens locally — it forwards --token-in/--token-out to the /trade/plan backend (internal-trading-bot), whose resolver handles bare tickers for directional trades:

  • buy (a dollar/canonical/address --token-in--token-out <TICKER>) → the deployment with the highest 24h volume (filters same-ticker scams)
  • sell (--token-in <TICKER> → a dollar --token-out) → the wallet's actual holdings

The 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_SYMBOL and 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) and README.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-bot POST /api/trade/planresolveFlatTraderesolveByTicker (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.md and SKILL.md so swap guidance matches how acp trade actually works with the /trade/plan backend.

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.

`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>
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