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

okx-dex-market-price

Fetch token prices from OKX DEX Market Price API (v6). Use this skill when a user wants to: 1. Get the latest price of one or more tokens on supported EVM/Solana chains 2. Batch query token prices (up to 100 tokens per request) for portfolios or UIs 3. Build applications that need real-time DEX market price data Core value: Correct authenticated POST requests with JSON body, HMAC-SHA256 signing including body in prehash, and proper handling of batch request/response.

Why use this skill?

Fetch real-time token prices across EVM and Solana chains with the OKX DEX Market Price API skill. Supports batch queries for up to 100 tokens with secure HMAC signing.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/li-zoe-x/market-test-price
Or

What This Skill Does

The okx-dex-market-price skill serves as a robust interface for interacting with the OKX DEX Market Price API v6. It enables OpenClaw agents to retrieve real-time, accurate token price data across multiple blockchain networks, including Ethereum, BSC, Polygon, Arbitrum, Base, and Solana. By utilizing a high-efficiency batch processing architecture, the skill allows you to query the prices of up to 100 unique tokens in a single HTTP POST request, significantly reducing latency and network overhead for complex financial monitoring applications.

This skill is designed with production-grade security as a priority. It implements the strict HMAC-SHA256 signing mechanism required by OKX, which ensures that every request is authenticated and tamper-proof. The skill manages the complex orchestration of generating ISO 8601 timestamps, constructing the precise prehash string—which includes the request body—and handling the Base64 encoding of signatures. Whether you are tracking native coins like ETH using the universal '0xeeee...' format or specific SPL tokens on Solana, this skill provides the underlying logic required to fetch data seamlessly.

Installation

To integrate this capability into your OpenClaw agent, use the official installation command via the terminal:

clawhub install openclaw/skills/skills/li-zoe-x/market-test-price

Ensure that you have your OKX API credentials (OKX_ACCESS_KEY, OKX_SECRET_KEY, and OKX_PASSPHRASE) configured in your agent's environment variables before attempting to execute requests, as these are mandatory for the HMAC signing process.

Use Cases

  • Portfolio Tracking: Automatically refresh the USD value of your holdings across multiple chains.
  • DEX Aggregation: Build real-time monitoring tools for price discrepancies between decentralized exchanges.
  • Automated Trading Bots: Fetch current market data to make informed buy/sell decisions based on liquidity and price fluctuations.
  • Dashboard Development: Power financial dashboards that require batch pricing for dozens of assets concurrently.

Example Prompts

  1. "What is the current market price of ETH and USDC on the Ethereum mainnet?"
  2. "Batch check the current price for these 5 token addresses on BSC and provide a summary table."
  3. "Fetch real-time price updates for all tokens in my active watchlist and notify me if any have dropped more than 5%."

Tips & Limitations

  • Precision: Prices are returned as strings to maintain high numerical precision; ensure your downstream calculations handle these as decimals to avoid floating-point errors.
  • Batch Limits: The API enforces a strict limit of 100 tokens per request. Ensure your input array does not exceed this count, or the request will be rejected.
  • Formatting: Always ensure that EVM addresses are provided in all lowercase. Providing mixed-case addresses may result in API signature mismatches or lookup failures.
  • Security: Never hardcode your API keys or secrets in your scripts. Always utilize environment variables or a secure secret management vault.

Metadata

Author@li-zoe-x
Stars1656
Views0
Updated2026-02-28
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-li-zoe-x-market-test-price": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags

#defi#dex#okx#market#price#web3#token#evm#solana#batch
Safety Score: 4/5

Flags: network-access, external-api