← Back to Skills Marketplace
re-bruce-wayne

Solana Trading Api

by Bruce Wayne · GitHub ↗ · v1.3.0
cross-platform ⚠ suspicious
837
Downloads
0
Stars
1
Active Installs
7
Versions
Install in OpenClaw
/install trade-router
Description
Solana swap execution, MEV-protected transaction submission, wallet scanning, and market-cap-based limit/trailing orders via the TradeRouter API. Use when th...
Usage Guidance
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.
Capability Analysis
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install trade-router
  3. After installation, invoke the skill by name or use /trade-router
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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.
Metadata
Slug trade-router
Version 1.3.0
License
All-time Installs 1
Active Installs 1
Total Versions 7
Frequently Asked Questions

What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 837 downloads so far.

How do I install Solana Trading Api?

Run "/install trade-router" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Solana Trading Api free?

Yes, Solana Trading Api is completely free (open-source). You can download, install and use it at no cost.

Which platforms does Solana Trading Api support?

Solana Trading Api is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Solana Trading Api?

It is built and maintained by Bruce Wayne (@re-bruce-wayne); the current version is v1.3.0.

💬 Comments