Keryx®OKX.AI
Agents that pay, not scrape.
OKX.AI · Integration docs
OKX.AI · Docs

Wire your agent to the Finance Copilot.

Nine paid market tools on X Layer. Hit an HTTPS endpoint, pay USDT0 when asked, get JSON back. Four tools hit OKX Web3 market and wallet APIs with our seller credentials. Five coverage tools fill price, Solana risk, and FX so an agent can stay inside one ASP.

Product: /okxasp · Marketplace: okx.ai · ASP tutorial: okx.ai/tutorial/asp

Settlement
X Layer · USDT0
Auth model
x402 · no API keys
OKX-native
4
Total tools
9

1. Discover tools

Free catalog. No payment. Use it to pick an endpoint and see prices before the agent spends.

curl https://keryxhq.xyz/api/okxasp/catalog
bash

Response includes tool id, name, price, summary, and the HTTPS path under /api/okxasp/tools/….

2. Call without payment

First request returns 402. The PAYMENT-REQUIRED header carries amount, asset, network, and pay-to. In a browser (Mozilla UA + Accept: text/html) you get a clear paywall with the real USDT0 price — not a blank 402.

curl -i "https://keryxhq.xyz/api/okxasp/tools/okx-token-price?address=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&chain=ethereum"
# HTTP/2 402
# payment-required: <base64 x402 payload>
# amount is USDT0 on X Layer
bash

3. Pay and retry

Use OKX Agentic Wallet or Onchain OS to settle the 402, then retry with PAYMENT-SIGNATURE. A successful call returns JSON from the tool.

# Extract PAYMENT-REQUIRED from the 402, then:
onchainos payment pay --payload "$PAYMENT_REQUIRED" --chain xlayer

# Retry with the signed header:
curl -H "PAYMENT-SIGNATURE: $SIG" \
  "https://keryxhq.xyz/api/okxasp/tools/okx-token-price?address=0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2&chain=ethereum"
# → { "toolId": "okx.token-price", "result": { "priceUsd": ..., "source": "okx-web3" } }
bash

If the facilitator returns timeout after a successful authorize (tx already present), we still return the tool JSON and mark payment.provisional: true. Reconcile by payment.transaction before treating the spend as final. Do not assume timeout means no USDT0 moved.

4. Buyer wallet ≠ seller payTo

The ASP payTo address cannot pay its own services. The marketplace returns payer_blocked when buyer == seller. Use a separate Agentic Wallet account as the buyer (funded with USDT0 on X Layer). Seller Account stays as payTo only.

Catalog field buyerNoterepeats this for agents. Sold / reviews on the listing are the marketplace source of truth — not this site's health endpoint.

5. OKX-native tools (use these first)

These hit OKX Web3 market and wallet APIs with our seller credentials (native: true in the catalog). That is the edge versus wrapping CoinGecko alone.

OKX Onchain Token Price
/api/okxasp/tools/okx-token-price

Live USD price for any token contract from OKX Web3 market data (not CoinGecko). Pass chain + contract address.

$0.003
OKX Token Market Snapshot
/api/okxasp/tools/okx-token-market

OKX Web3 market snapshot for a token: price, market cap, liquidity, holders. Proprietary to OKX DEX market APIs.

$0.004
OKX Wallet PnL Overview
/api/okxasp/tools/okx-wallet-pnl

OKX Web3 wallet PnL overview: realized PnL, win rate, buy/sell volume, top tokens. Agents use this to size risk before acting.

$0.005
OKX Wallet Recent Token PnL
/api/okxasp/tools/okx-wallet-recent-pnl

Recent per-token PnL rows for a wallet from OKX Web3: unrealized PnL, buy/sell counts, balances.

$0.005

6. Coverage tools

Public feeds so the agent does not leave the pack for multi-coin price, Solana risk, or FX. Catalog marks them native: false with an honest sourceHint (CoinGecko-class / DexScreener / rugcheck / FX APIs).

Crypto Prices
/api/okxasp/tools/crypto-price

Real-time price, market cap, 24h change for one or more coins (CoinGecko).

$0.002
Solana Token Activity
/api/okxasp/tools/solana-token-activity

Live trading data for a Solana token: top DEX pairs, 24h volume, buy/sell counts, liquidity, and market cap.

$0.005
Solana Rug Risk Score
/api/okxasp/tools/solana-rug-check

Live risk assessment from rugcheck.xyz: numeric score, normalised score, LP lock percentage, and every flagged risk.

$0.002
New Solana Token Launches
/api/okxasp/tools/solana-launches

Freshly-boosted Solana token profiles from DexScreener with descriptions, links, and dex URLs.

$0.003
Exchange Rates
/api/okxasp/tools/finance-exchange-rates

Live fiat + crypto exchange rates for any base currency (200+ currencies). Call when you need current rates for a specific conversion or comparison you will show the user.

$0.002

7. Health check

Confirms seller credentials and network config without spending.

curl https://keryxhq.xyz/api/okxasp/health
bash

8. Agent loop (browser)

Prefer a visual walkthrough? The product page has a live agent loop that probes 402, shows the price, and walks the settle path.

Open the agent loop on /okxasp

Why pay-per-call

Agents should not hold shared API keys or burn monthly plans for a single answer. x402 prices the call in the open. You spend when the answer is worth it. Product thesis: read the note.