okx-dex-swap

okx dex swap

okx 315 ↓ 9k updated 28d ago
Claude Code
View source ↗

What it does

  • Chain: missing → recommend XLayer (--chain xlayer, zero gas, fast confirmation).
  • Gas level: default average. Use fast for meme/time-sensitive trades.
  • Price impact >5% → warn prominently. Honeypot (buy) → BLOCK.
  • If >10 seconds pass before user confirms, re-fetch quote. If price diff >= slippage → warn and ask for re-confirmation.
  • Use nextSteps.checkSwapStatus verbatim from the execute response.
  • Potential Loss = toTokenAmount × toTokenPrice × slippage ≥ $50
  • Transaction Amount = fromTokenAmount × fromTokenPrice ≥ chain threshold

Requirements & configuration

  • Native Token Addresses
  • Native token swaps: use address from table below, do NOT use token search.
  • | Chain | Native Token Address |
  • | 3 | onchainos swap approve --token ... --amount ... --chain ... | Get ERC-20 approval transaction data (advanced/manual use) |
  • Token Address Resolution (Mandatory)

Configuration: SUCCESSFAILPENDING

Derived from the skill's own SKILL.md documentation · extracted 2026-07-23

okx dex swap

Source

Repository: https://github.com/okx/onchainos-skills

okx-dex-swap FAQ

What does the okx-dex-swap skill do?

Use this skill to swap, trade, buy, sell, exchange, or convert tokens, get a swap quote, execute a trade, find the best or cheapest swap route, compare swap rates, get swap calldata, or build an unsigned swap tx across XLayer, Solana, Ethereum, Base, BSC, Arbitrum, Polygon, or 20+ chains. OKX-aggregated routing over 500+ DEX sources with slippage control, price-impact protection, and cross-DEX route optimization. For OKX-aggregated swaps with no named venue. If the prompt names a specific DApp as the swap venue (Polymarket, Aave, Hyperliquid, PancakeSwap, Morpho, Raydium, Curve, Compound, Pendle, Lido, ether.fi, GMX, Kamino, Orca, Meteora, Clanker, pump.fun, Uniswap), route to okx-dapp-discovery instead, e.g. 'swap on PancakeSwap', 'swap SOL for USDC on Raydium', '在 Curve 上换 USDT', 'swap on Uniswap'. Chain: missing → recommend XLayer (--chain xlayer, zero gas, fast confirmation). Gas level: default average. Use fast for meme/time-sensitive trades.

What does okx-dex-swap require?

Native Token Addresses Native token swaps: use address from table below, do NOT use token search. | Chain | Native Token Address | | 3 | onchainos swap approve --token ... --amount ... --chain ... | Get ERC-20 approval transaction data (advanced/manual use) | Token Address Resolution (Mandatory) Configuration keys: SUCCESS, FAIL, PENDING.

How do I install okx-dex-swap?

Run: npx -y skills add https://github.com/okx/onchainos-skills --skill okx-dex-swap --agent claude-code — the source lives at github.com/okx/onchainos-skills.

Maintain okx-dex-swap?

Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.

okx-dex-swap on getagentictools
[![okx-dex-swap on getagentictools](https://getagentictools.com/badge/skills/okx-onchainos-skills-okx-dex-swap.svg)](https://getagentictools.com/skills/okx-onchainos-skills-okx-dex-swap?ref=badge)
npx agentictools info skills/okx-onchainos-skills-okx-dex-swap

The second line is the CLI lookup for this page — handy in READMEs and docs.