ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified finance Safety 4/5

okx-dex-quote

Fetch optimal swap quotes from OKX DEX Aggregator API (v6). Use this skill when a user wants to: 1. Get the best price for swapping tokens on any supported EVM/Solana chain 2. Compare DEX routing paths and price impact for token swaps 3. Build applications or scripts that query real-time DEX aggregator pricing Core value: Generates correct, authenticated API calls with proper token decimals, amount formatting, HMAC-SHA256 signing, and comprehensive error handling.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/aaronllee/dex-quote
Or

What This Skill Does

The OKX DEX Aggregator Quote Skill enables OpenClaw to fetch real-time, optimal swap quotes from the OKX DEX Aggregator API (v6). Designed for DeFi developers and power users, this skill abstracts the complexities of HMAC-SHA256 request signing, chain-specific token decimal precision, and API authentication. By querying the OKX DEX aggregator, the skill provides competitive price discovery across major DEX protocols like Uniswap, Curve, and SushiSwap, ensuring users get the best execution paths and low slippage for their swaps on various chains including Ethereum, Solana, and Layer 2 solutions.

Installation

To install this skill, run the following command in your OpenClaw terminal: clawhub install openclaw/skills/skills/aaronllee/dex-quote Ensure you have configured your environment variables: OKX_ACCESS_KEY, OKX_SECRET_KEY, and OKX_PASSPHRASE. Without these keys, the API will reject your requests due to authentication failures.

Use Cases

  • DeFi Portfolio Management: Retrieve precise swap prices before executing a transaction, allowing the agent to provide accurate cost estimates for portfolio rebalancing.
  • Arbitrage Analysis: Compare price impacts and routing paths for a token across multiple supported chains to identify price discrepancies.
  • Automated Trading Scripts: Build robust trading bots that require verified price data, using the skill to handle decimal conversion and secure signing for high-frequency quote requests.
  • Token Swap Comparisons: Evaluate the best route for swapping native assets to LP tokens or specific altcoins across EVM networks and Solana.

Example Prompts

  1. "Check the current swap quote for 1000 USDT to ETH on the Arbitrum network; provide the path with the best price impact."
  2. "What is the estimated output for swapping 1 WBTC to USDC on Ethereum? Include gas estimates and the DEX route."
  3. "Fetch the optimal quote for trading 5 SOL for Jupiter (JUP) on Solana and explain the fee breakdown provided by the OKX API."

Tips & Limitations

  • Decimal Precision: The most frequent error is incorrect amount formatting. Always convert human-readable amounts to raw values using the token's decimal count (e.g., multiply by 10^18 for standard EVM tokens).
  • ExactIn vs ExactOut: Note that exactOut is limited to specific networks (Ethereum, Base, BSC, Arbitrum) and Uniswap V2/V3 pools.
  • Security: This is a read-only quote skill. It does not perform actual swaps, keeping your funds safe from unintentional automated trades. Always verify contract addresses before requesting quotes for obscure tokens.

Metadata

Author@aaronllee
Stars4473
Views3
Updated2026-05-01
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-aaronllee-dex-quote": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags

#defi#dex#okx#swap#quote#web3#aggregator#evm#solana
Safety Score: 4/5

Flags: network-access, external-api