← 返回 Skills 市场
Solana Trading Api
作者
Bruce Wayne
· GitHub ↗
· v1.3.0
837
总下载
0
收藏
1
当前安装
7
版本数
在 OpenClaw 中安装
/install trade-router
功能描述
Solana swap execution, MEV-protected transaction submission, wallet scanning, and market-cap-based limit/trailing orders via the TradeRouter API. Use when th...
安全使用建议
This skill is API documentation for interacting with a Solana trading service and appears internally consistent. Important cautions before using it: 1) The API uses signature-based auth — do NOT paste your seed phrase or raw private key into the chat or the agent. Use a secure signer (wallet software, hardware wallet, or an external signing service you trust) so the agent never has direct access to private keys. 2) Signed transactions submitted via POST /protect move funds — verify transaction details before signing. 3) Keep WebSocket-connected clients trusted and network-secure while orders are active, because order fills are delivered only over that connection. 4) Verify the service domain (api.traderouter.ai) independently and consider starting with a small or ephemeral wallet to test behavior. If the agent asks you to provide private keys or to run unclear local signing commands, decline and use a trusted wallet client instead.
功能分析
Type: OpenClaw Skill
Name: trade-router
Version: 1.3.0
The 'trade-router' skill bundle provides a Solana trading interface that requires access to a wallet's private key via the 'PRIVATE_KEY' environment variable to sign transactions locally. While the skill includes robust safety features—such as a default dry-run mode, daily loss limits, and server-side signature verification—it involves high-risk capabilities including financial transaction submission to an external API (api.traderouter.ai) and sensitive credential handling. These behaviors are plausibly necessary for the stated purpose of a trading bot but meet the threshold for a suspicious classification due to the inherent risks of private key exposure and third-party transaction routing.
能力评估
Purpose & Capability
The name/description (Solana swap, limit/trailing orders, MEV-protected submission) match the SKILL.md content: REST endpoints and a WebSocket for order management. No unrelated binaries, env vars, or installs are requested—this is consistent for an API documentation skill.
Instruction Scope
The runtime instructions describe a challenge–response flow that requires signing a nonce and submitting signed transactions. The SKILL.md does not ask for API keys or other unrelated system data, but it does presuppose that the client/agent will sign nonces and transactions using the wallet's private key. If an agent acting for the user attempts to perform signing, the user must ensure signing is done securely (external wallet/hardware wallet) and not by pasting seed phrases into the agent. The documentation also instructs keeping a persistent WebSocket for order lifecycle management — expected, but users should be aware this means the client must stay connected while orders are active.
Install Mechanism
Instruction-only skill with no install spec and no code files. Nothing is written to disk or fetched by the skill itself, which is the lowest-risk install profile.
Credentials
The skill requests no environment variables or credentials (auth is wallet-based signature). This is proportionate to the documented API behavior. However, the documented authentication requires signing with the wallet private key; while the skill itself doesn't request the key, any agent that attempts to act on behalf of the user will need either an external signer or the user's private key—the latter would be risky.
Persistence & Privilege
always:false and default invocation settings. The skill does not request persistent system privileges, nor does it modify other skills or system-wide settings. The WebSocket requirement implies the client will hold an open connection while managing orders, which is normal for this kind of service.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install trade-router - 安装完成后,直接呼叫该 Skill 的名称或使用
/trade-router触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.3.0
- Quantity removed for TWAP (and TWAP combo) orders; use "amount" or "holdings_percentage" for sell instead.
- Added support and documentation for combo WebSocket order types, including limit+TWAP, trailing+TWAP, limit+trailing, and limit+trailing+TWAP orders.
- Updated endpoint reference table to list new combo order actions and their associated WebSocket commands.
- No changes to REST endpoints or existing order types.
v1.2.0
- Added REST endpoints GET /mcap and GET /flex for fetching market cap/price data and generating trade card images.
- Documented support for TWAP (time-weighted average price) trades via WebSocket (`twap_buy`, `twap_sell` actions).
- Updated the endpoint usage table to include /mcap, /flex, and TWAP actions.
- No functional code or behavior changes; documentation improvements only.
v1.1.2
TradeRouter v1.1.2
- Clarified that an active WebSocket connection is required to receive `order_filled` events for limit and trailing orders.
- Added instructions for reconnecting and re-registering via WebSocket to ensure fills are received after disconnection.
- Emphasized the need to keep the WebSocket connection alive while any limit/trailing orders are open.
- Highlighted that active orders persist server-side even if clients disconnect.
v1.1.1
trade-router 1.1.1
- Documented authentication requirements for WebSocket order management (proof-of-wallet-control via signed challenge–response, no API key).
- Clarified service origin and provided the service website link (https://traderouter.ai).
- Added detail about MEV protection: transactions are submitted using Jito and a staked connection lane.
- No functional API changes; SKILL.md updated for better clarity and user guidance.
v1.1.0
TradeRouter v1.1.0 — Change Summary
======================================
BREAKING CHANGES
----------------
1. WebSocket Authentication — Challenge-Response (Breaking)
The old unauthenticated "subscribed → register" flow is replaced by a signed
challenge-response. The server now sends a challenge with a nonce on connect;
the client must sign the nonce with the wallet's Ed25519 private key and include
the base58 signature in the register message. Clients that omit the signature
will not be authenticated and cannot place orders.
2. registered Message Now Requires authenticated: true Check
The registered handler must verify msg.authenticated === true. Sessions that
receive registered with authenticated: false will not receive fills.
3. WebSocket State Machine — SUBSCRIBED Renamed to CHALLENGE
The intermediate state between connect and registered is now called CHALLENGE
instead of SUBSCRIBED, reflecting the new protocol step.
NEW FEATURES
------------
4. Server Signature Verification on order_filled
handleOrderFilled now verifies the server's Ed25519 signature before signing
or submitting any transaction. Unverified fills are skipped. Key rotation is
supported via a secondary env var (TRADEROUTER_SERVER_PUBKEY_NEXT). Enabled
by default via TRADEROUTER_REQUIRE_SERVER_SIGNATURE.
5. order_created Params Commitment (Rec 2)
When order_created includes params_hash and server_signature, clients should
verify the server's commitment to the order parameters. Controlled by
TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE (default true).
6. already_dispatched Idempotency Flag on order_filled
If already_dispatched is true, the fill is a duplicate ack — skip sign/submit
entirely. The data.swap_tx field may be absent in this case.
7. MAX_BUY_LAMPORTS Now Enforced in ws.send()
Previously enforced only in buildSwap(). Now also checked in ws.send() for
buy and trailing_buy WebSocket orders, closing a gap where WS orders could
bypass the per-trade cap.
8. Daily Loss Tracking Extended
dailyLoss now covers trailing_buy actions (was buy only) and is updated in
the RPC fallback path and timeout recovery paths, not just on /protect success.
DEPENDENCY CHANGES
------------------
New package: [email protected] (required for Ed25519 nonce signing in WS auth)
New built-in import: createHash from node:crypto (no install needed)
New env vars: TRADEROUTER_SERVER_PUBKEY, TRADEROUTER_SERVER_PUBKEY_NEXT,
TRADEROUTER_REQUIRE_SERVER_SIGNATURE,
TRADEROUTER_REQUIRE_ORDER_CREATED_SIGNATURE
DOCUMENTATION CHANGES
---------------------
- Staleness check clarified: applies to ALL order_filled messages (not just post-reconnect);
divide-by-zero guard added (skip ratio if filled_mcap is 0 or null).
- Troubleshooting table updated: "No order_filled" entry now says to check
authenticated: true; "WS disconnects" now says re-register with signature.
- Definition of Done checklist updated to include challenge-response in every WS step.
- Safety Guards table updated to reflect wider dailyLoss tracking and ws.send() enforcement.
- Canonical Stack expanded with Python client library list.
v1.0.1
Display name change.
v1.0.0
TradeRouter 1.0.0 — Initial Release
- Provides swap execution, wallet scanning, and MEV-protected transaction submission for Solana SPL tokens.
- Supports instant swaps, limit/trailing orders (via WebSocket), and DCA strategies using only a wallet address (no API key).
- REST endpoints: /swap (build unsigned transaction), /holdings (scan wallet balances), /protect (submit signed transactions).
- WebSocket endpoint for placing, managing, and receiving updates on limit and trailing orders.
- Workflow and error-handling guidelines included for safe transaction submission.
- Market-cap-based limit/trailing order support and detailed API examples documented.
元数据
常见问题
Solana Trading Api 是什么?
Solana swap execution, MEV-protected transaction submission, wallet scanning, and market-cap-based limit/trailing orders via the TradeRouter API. Use when th... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 837 次。
如何安装 Solana Trading Api?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install trade-router」即可一键安装,无需额外配置。
Solana Trading Api 是免费的吗?
是的,Solana Trading Api 完全免费(开源免费),可自由下载、安装和使用。
Solana Trading Api 支持哪些平台?
Solana Trading Api 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Solana Trading Api?
由 Bruce Wayne(@re-bruce-wayne)开发并维护,当前版本 v1.3.0。
推荐 Skills