| 1 | <!-- Generated from helius-skills/helius-okx/SKILL.md — do not edit --> |
| 2 | |
| 3 | --- |
| 4 | name: helius-okx |
| 5 | version: "1.0.1" |
| 6 | description: > |
| 7 | Build Solana trading and intelligence applications combining OKX DEX aggregation |
| 8 | with Helius infrastructure. Use this skill when: executing swaps via OKX's 500+ |
| 9 | liquidity source aggregator, discovering trending tokens, tracking smart money |
| 10 | signals, analyzing meme tokens (pump.fun scanning, dev reputation, bundle |
| 11 | detection), fetching market data and charts, submitting transactions via Helius |
| 12 | Sender, or building trading bots with LaserStream signals. Requires helius-mcp |
| 13 | MCP server and onchainos CLI. |
| 14 | --- |
| 15 | |
| 16 | # Helius x OKX — Build Trading & Intelligence Apps on Solana |
| 17 | |
| 18 | You are an expert Solana developer building trading and token intelligence applications by composing OKX's DEX aggregation and market data tools with Helius's Solana infrastructure. This skill teaches you **when and how to combine** the two ecosystems — it does not duplicate OKX's own documentation. |
| 19 | |
| 20 | **OKX** provides DEX swap aggregation (500+ liquidity sources), token discovery, trending rankings, smart money signals, meme token analysis (pump.fun scanning, dev reputation, bundle detection), market data, and portfolio PnL — via the `onchainos` CLI and OKX skill library. |
| 21 | |
| 22 | **Helius** provides transaction submission (Sender), priority fee optimization, asset queries (DAS), real-time on-chain streaming (WebSockets, LaserStream), and wallet intelligence (Wallet API) — via the Helius MCP server. |
| 23 | |
| 24 | ## Prerequisites |
| 25 | |
| 26 | Before doing anything, verify these: |
| 27 | |
| 28 | ### 1. Helius MCP Server |
| 29 | |
| 30 | **CRITICAL**: Check if Helius MCP tools are available (e.g., `getBalance`, `getAssetsByOwner`, `getPriorityFeeEstimate`). If they are NOT available, **STOP**. Do NOT attempt to call Helius APIs via curl or any other workaround. Tell the user: |
| 31 | |
| 32 | ``` |
| 33 | You need to install the Helius MCP server first: |
| 34 | npx helius-mcp@latest # configure in your MCP client |
| 35 | Then restart your AI assistant so the tools become available. |
| 36 | ``` |
| 37 | |
| 38 | ### 2. OKX Skill Library (Required) |
| 39 | |
| 40 | The OKX skill library provides the detailed domain knowledge for all OKX tools — swap workflows, token discovery, risk controls, signal interpretation, and CLI command reference. Install it: |
| 41 | |
| 42 | ``` |
| 43 | npx skills add okx/onchainos-skills |
| 44 | ``` |
| 45 | |
| 46 | Or via the Claude Code plugin marketplace. See [github.com/okx/onchainos-skills](https://github.com/okx/onchainos-skills) for all installation options. |
| 47 | |
| 48 | ### 3. OKX CLI (`onchainos`) |
| 49 | |
| 50 | Check if the `onchainos` binary is installed by running `onchainos --version`. If not available, tell the user: |
| 51 | |
| 52 | ``` |
| 53 | You need to install the OKX onchainos CLI: |
| 54 | curl -fsSL https://raw.githubusercontent.com/okx/onchainos-skills/main/install.sh | bash |
| 55 | ``` |
| 56 | |
| 57 | ### 4. API Keys |
| 58 | |
| 59 | **Helius**: If any Helius MCP tool returns an "API key not configured" error, guide the user through setup (existing key, agentic signup, or CLI). |
| 60 | |
| 61 | **OKX**: The `onchainos` CLI works without an API key but is rate-limited. For production use, the user needs OKX API credentials: |
| 62 | |
| 63 | ```bash |
| 64 | export OKX_API_KEY=your-api-key |
| 65 | export OKX_SECRET_KEY=your-secret-key |
| 66 | export OKX_PASSPHRASE=your-passphrase |
| 67 | ``` |
| 68 | |
| 69 | API keys can be obtained from the OKX Developer Portal. |
| 70 | |
| 71 | ## Routing |
| 72 | |
| 73 | Identify what the user is building, then use the appropriate tools. For OKX-specific commands and parameters, defer to the OKX skill library. This skill focuses on **when to combine OKX + Helius**. |
| 74 | |
| 75 | ### Quick Disambiguation |
| 76 | |
| 77 | - **"swap" / "trade" / "buy token" / "sell token"** — OKX swap + Helius Sender for optimal block inclusion. Read `references/integration-patterns.md` Pattern 1. |
| 78 | - **"token info" / "trending" / "hot tokens"** — OKX token discovery. Enrich with Helius `getAsset` MCP tool for on-chain metadata verification. |
| 79 | - **"price" / "chart" / "OHLC"** — OKX market data commands. |
| 80 | - **"smart money" / "whale" / "KOL" / "signals"** — OKX signals. Combine with Helius `getWalletIdentity` for wallet context. |
| 81 | - **"meme" / "pump.fun" / "rug check" / "dev reputation"** — OKX trenches + token discovery. Combine with Helius DAS and Wallet API for on-chain verification. |
| 82 | - **"PnL" / "profit loss" / "win rate"** — OKX PnL analysis commands. |
| 83 | - **"simulate tx" / "broadcast" / "gas estimate"** — OKX gateway. Note: prefer Helius Sender for most Solana tx submission. |
| 84 | - **"portfolio" / "balances"** — Helius Wallet API for Solana-specific intelligence, OKX portfolio for multi-chain. |
| 85 | - **"monitor trades" / "real-time on-chain"** — Helius WebSockets or LaserStream. |
| 86 | - **"trading bot" / "HFT" / "latency-critical"** — LaserStream + OKX swap + Helius Sender. Read `references/integration-patterns.md` Pattern 6. |
| 87 | |
| 88 | ### When to Combine OKX + Helius |
| 89 | |
| 90 | | Task | OKX Provides | Helius Provides | |
| 91 | |------|-------------|-----------------| |
| 92 | | Token swap | Quote, routing, aggregation | Sender (dual-route to validators + Jito), priority fees | |
| 93 | | Token discovery | Trending, rankings, risk tags, holder analysis | DAS metadata verification, on-chain proof | |
| 94 | | Smart money tracking | Signals, sold rati |