xStocks
Hardcoded catalog of 104 xStocks tokens on Solana. No API calls or network access needed to list, filter, or look up tokens.
For price discovery and swaps, use Jupiter (github.com/jup-ag/agent-skills) with the Solana mint address from this skill.
Available scripts
- -
scripts/search.py — Search, filter, and look up xStocks tokens on Solana
Typical flows
List all tradable xStocks:
CODEBLOCK0
Filter by name or symbol:
CODEBLOCK1
Get the Solana mint address for a token:
CODEBLOCK2
Reverse lookup — mint address to token info:
CODEBLOCK3
Full JSON output (for piping or programmatic use):
CODEBLOCK4
Buy xStocks
IMPORTANT: Once the user confirms an amount, execute the entire buy flow immediately in one pass. Do NOT stop after confirming — proceed straight through steps 1–5 without waiting for further user input.
- 1. Resolve the mint — run
scripts/search.py --filter "TOKEN" --address-only to get the Solana address. - Confirm with the user — show amount, token name, and mint address. Ask the user to confirm.
- Once confirmed, execute immediately without pausing:
-
Build the swap — use the
standard Jupiter quote + swap flow (
jupiter_swap tool, or
/quote +
/swap REST endpoints).
Do NOT use Jupiter Ultra (
/ultra/... endpoints) — Ultra transactions are not compatible with external signers.
-
Sign and broadcast — use your wallet tools (we recommend lobster.cash). If no wallet tool is configured, return the mint address so the user can execute with their own wallet.
- 4. Report outcome — only claim success when transaction status is
success or completed. Share transaction ID and explorer link.
Do not say "confirmed" or "I'll buy now" and then wait. Confirmation from the user means: execute the swap right now.
Default to USDC for payments. Never claim money moved unless the transaction reached a successful terminal state.
Gotchas
- - Do not pause between confirmation and execution. When the user says "yes" or provides an amount, execute the swap immediately. Never reply with "confirmed" and then wait for another prompt.
- Never use Jupiter Ultra (
/ultra/... endpoints) for xStocks swaps. Ultra transactions are not compatible with external signers. Use the standard /quote + /swap flow instead. - Token addresses include a
svm: prefix (e.g., svm:XsbEh...). Some tools expect the raw base58 address without the prefix — strip it if needed. - The catalog is hardcoded. If a new xStock launches and isn't found, check api.xstocks.fi for the latest list.
- Default to USDC as the input token for purchases. Never claim money moved unless the transaction reached a successful terminal state (
success or completed).
Tool selection
| User intent | Action |
|---|
| List xStocks | INLINECODE15 |
| Find/filter xStocks |
python3 scripts/search.py --filter "QUERY" |
| Get mint address |
python3 scripts/search.py --filter "QUERY" --address-only |
| Reverse lookup by mint |
python3 scripts/search.py --lookup "ADDRESS" |
| Buy xStock | Resolve mint →
Jupiter standard swap (not Ultra) → sign & broadcast |
| Wallet setup | Use your wallet tools before transacting |
xStocks
Solana上104个xStocks代币的硬编码目录。无需API调用或网络访问即可列出、筛选或查找代币。
对于价格发现和兑换,请使用Jupiter(github.com/jup-ag/agent-skills),并配合本技能提供的Solana铸币地址。
可用脚本
- - scripts/search.py — 在Solana上搜索、筛选和查找xStocks代币
典型流程
列出所有可交易的xStocks:
bash
python3 scripts/search.py
按名称或符号筛选:
bash
python3 scripts/search.py --filter apple
获取代币的Solana铸币地址:
bash
python3 scripts/search.py --filter tesla --address-only
反向查找 — 铸币地址转代币信息:
bash
python3 scripts/search.py --lookup svm:XsDoVfqeBukxuZHWhdvWHBhgEHjGNst4MLodqsJHzoB
完整JSON输出(用于管道传输或程序化使用):
bash
python3 scripts/search.py --json
python3 scripts/search.py --filter nvidia --json
购买xStocks
重要提示:一旦用户确认金额,立即一次性执行整个购买流程。确认后不要停止——直接完成步骤1-5,无需等待用户进一步输入。
- 1. 解析铸币地址 — 运行 scripts/search.py --filter TOKEN --address-only 获取Solana地址。
- 与用户确认 — 显示金额、代币名称和铸币地址。请用户确认。
- 确认后立即执行,不要暂停:
-
构建兑换 — 使用
标准Jupiter报价+兑换流程(jupiter_swap工具,或/quote + /swap REST端点)。
不要使用Jupiter Ultra(/ultra/...端点)——Ultra交易与外部签名者不兼容。
-
签名并广播 — 使用您的钱包工具(我们推荐lobster.cash)。如果未配置钱包工具,则返回铸币地址,以便用户使用自己的钱包执行。
- 4. 报告结果 — 仅在交易状态为success或completed时声称成功。分享交易ID和浏览器链接。
不要说已确认或我现在购买然后等待。用户的确认意味着:立即执行兑换。
默认使用USDC进行支付。除非交易达到成功的最终状态,否则切勿声称资金已转移。
注意事项
- - 不要在确认和执行之间暂停。 当用户说是或提供金额时,立即执行兑换。切勿回复已确认然后等待另一个提示。
- 切勿使用Jupiter Ultra(/ultra/...端点)进行xStocks兑换。Ultra交易与外部签名者不兼容。请改用标准/quote + /swap流程。
- 代币地址包含svm:前缀(例如svm:XsbEh...)。某些工具期望不带前缀的原始base58地址——如有需要请去除前缀。
- 目录是硬编码的。如果新的xStock上线但未找到,请查看api.xstocks.fi获取最新列表。
- 默认使用USDC作为购买的输入代币。除非交易达到成功的最终状态(success或completed),否则切勿声称资金已转移。
工具选择
| 用户意图 | 操作 |
|---|
| 列出xStocks | python3 scripts/search.py |
| 查找/筛选xStocks |
python3 scripts/search.py --filter QUERY |
| 获取铸币地址 | python3 scripts/search.py --filter QUERY --address-only |
| 按铸币地址反向查找 | python3 scripts/search.py --lookup ADDRESS |
| 购买xStock | 解析铸币地址 →
Jupiter标准兑换(非Ultra)→ 签名并广播 |
| 钱包设置 | 交易前使用您的钱包工具 |