[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6Q0T22Y308VD1NS5ZCSSCBM":3,"skill-same:01M6Q0T22Y308VD1NS5ZCSSCBM":88},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":51,"commitSha":52,"skillDirectory":53,"forksCount":54,"repositoryHtmlUrl":55,"repositoryHomepageUrl":6,"ownerHtmlUrl":56,"ownerBlogUrl":6,"ownerDescription":57,"updatedAt":58,"install":59,"resources":71},"01M6Q0T22Y308VD1NS5ZCSSCBM","okx-dex",null,"OKX DEX aggregator (v6). Get swap quotes, swap\u002Fapprove tx data, tokens, and chains.","Kernel8901\u002Fai-agent-skills-classification","Kernel8901","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F72647553?v=4","01M6KV388J2H5PNC8D8P940BJD","01M6KV38CS5B3AY63RKZB410YM",7,"MIT","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F数据与分析\u002Fokx-dex\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"okx dex","dex","okx","swap","approve","api-reference","DEX Aggregator","true","quotes","tokens","get","aggregator","dev","build","Wallet","curl","python3","api","web3","https","2026-11-10 10:12:30",false,"---\nname: okx-dex\ndescription: OKX DEX aggregator (v6). Get swap quotes, swap\u002Fapprove tx data, tokens, and chains.\nhomepage: https:\u002F\u002Fweb3.okx.com\u002Fbuild\u002Fdev-docs\u002Fwallet-api\u002Fdex-api-reference\nmetadata: {\"clawdbot\":{\"emoji\":\"?\",\"always\":true,\"requires\":{\"bins\":[\"curl\",\"jq\",\"python3\"]}}}\n---\n\n# OKX DEX Aggregator ?\n\nOKX Wallet DEX API provides aggregated swap quotes and transaction data across multiple chains (EVM + non‑EVM).\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `OKX_API_KEY` | OKX API key | Yes |\n| `OKX_SECRET_KEY` | OKX API secret | Yes |\n| `OKX_PASSPHRASE` | OKX API passphrase | Yes |\n\n## API Base URL\n\n```\nhttps:\u002F\u002Fweb3.okx.com\n```\n\n## Authentication (Required Headers)\n\nAll requests must include the following headers:\n\n- `OK-ACCESS-KEY`\n- `OK-ACCESS-TIMESTAMP` (UTC ISO time)\n- `OK-ACCESS-PASSPHRASE`\n- `OK-ACCESS-SIGN` (Base64(HMAC_SHA256(prehash, secret)))\n\nPrehash string:\n\n```\nTIMESTAMP + METHOD + REQUEST_PATH_WITH_QUERY + BODY\n```\n\n- For GET requests, `BODY` is empty and `REQUEST_PATH_WITH_QUERY` must include the query string.\n- For POST requests, `BODY` is the raw JSON string.\n\n## Get Supported Chains (Aggregator)\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fsupported\u002Fchain\"\nQUERY=\"chainIndex=1\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '.'\n```\n\n## Get Tokens\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\nCHAIN_INDEX=\"1\"  # Ethereum\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fall-tokens\"\nQUERY=\"chainIndex=${CHAIN_INDEX}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '.data[:5]'\n```\n\n## Get Swap Quote (Quote Only)\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nFROM_TOKEN=\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"  # ETH (native)\nTO_TOKEN=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"    # USDC\nAMOUNT=\"1000000000000000000\"  # 1 ETH in wei\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fquote\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&fromTokenAddress=${FROM_TOKEN}&toTokenAddress=${TO_TOKEN}&amount=${AMOUNT}&swapMode=exactIn\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    fromTokenAmount: .data[0].fromTokenAmount,\n    toTokenAmount: .data[0].toTokenAmount,\n    tradeFee: .data[0].tradeFee,\n    router: .data[0].router\n  }'\n```\n\n## Get Swap Transaction (Router Call Data)\n\nNote: `slippagePercent` is required by the swap endpoint and is expressed as a\ndecimal percentage (e.g., `0.01` = 1%).\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nFROM_TOKEN=\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\nTO_TOKEN=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\nAMOUNT=\"1000000000000000000\"  # 1 ETH in wei\nslippagePercent=\"0.01\"  # 1%\nWALLET=\"\u003CYOUR_WALLET_ADDRESS>\"\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fswap\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&fromTokenAddress=${FROM_TOKEN}&toTokenAddress=${TO_TOKEN}&amount=${AMOUNT}&swapMode=exactIn&slippagePercent=${slippagePercent}&userWalletAddress=${WALLET}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    tx: .data[0].tx,\n    router: .data[0].routerResult.router,\n    priceImpactPercent: .data[0].routerResult.priceImpactPercent,\n    dexRouterList: (.data[0].routerResult.dexRouterList \u002F\u002F [])\n  }'\n```\n\n## Get Approval Transaction (EVM)\n\nNote: Some responses may omit `to`\u002F`value`. If `to` is null, use the chain's\n`dexTokenApproveAddress` from the Supported Chains response as the target.\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nTOKEN_ADDRESS=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"  # USDC\nAMOUNT=\"1000000000\"  # 1,000,000 USDC (6 decimals)\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fapprove-transaction\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&tokenContractAddress=${TOKEN_ADDRESS}&approveAmount=${AMOUNT}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    data: .data[0].data,\n    dexContractAddress: .data[0].dexContractAddress,\n    gasLimit: .data[0].gasLimit,\n    gasPrice: .data[0].gasPrice\n  }'\n```\n\n## Get Approval Transaction (EVM) with `to` from Supported Chains\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nTOKEN_ADDRESS=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"  # USDC\nAMOUNT=\"1000000000\"  # 1,000,000 USDC (6 decimals)\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fsupported\u002Fchain\"\nQUERY=\"chainIndex=${CHAIN_INDEX}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"OKX_SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\nAPPROVE_TO=$(curl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq -r '.data[0].dexTokenApproveAddress')\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fapprove-transaction\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&tokenContractAddress=${TOKEN_ADDRESS}&approveAmount=${AMOUNT}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"OKX_SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq --arg to \"${APPROVE_TO}\" '{\n    data: .data[0].data,\n    dexContractAddress: (.data[0].dexContractAddress \u002F\u002F $to),\n    gasLimit: .data[0].gasLimit,\n    gasPrice: .data[0].gasPrice\n  }'\n```\n\n## Safety Rules\n\n1. ALWAYS display swap details before execution.\n2. WARN if price impact is high or priceImpactProtectionPercent is exceeded.\n3. CHECK token allowance (EVM) before swap execution.\n4. VERIFY slippage settings (`slippagePercent`).\n5. For approve responses, if `to` is null, use `dexTokenApproveAddress` for the chain.\n6. NEVER execute without explicit user confirmation.\n\n## Links\n\n- [OKX DEX API Reference (v6)](https:\u002F\u002Fweb3.okx.com\u002Fbuild\u002Fdev-docs\u002Fwallet-api\u002Fdex-api-reference)\n","# OKX DEX Aggregator ?\n\nOKX Wallet DEX API provides aggregated swap quotes and transaction data across multiple chains (EVM + non‑EVM).\n\n## Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `OKX_API_KEY` | OKX API key | Yes |\n| `OKX_SECRET_KEY` | OKX API secret | Yes |\n| `OKX_PASSPHRASE` | OKX API passphrase | Yes |\n\n## API Base URL\n\n```\nhttps:\u002F\u002Fweb3.okx.com\n```\n\n## Authentication (Required Headers)\n\nAll requests must include the following headers:\n\n- `OK-ACCESS-KEY`\n- `OK-ACCESS-TIMESTAMP` (UTC ISO time)\n- `OK-ACCESS-PASSPHRASE`\n- `OK-ACCESS-SIGN` (Base64(HMAC_SHA256(prehash, secret)))\n\nPrehash string:\n\n```\nTIMESTAMP + METHOD + REQUEST_PATH_WITH_QUERY + BODY\n```\n\n- For GET requests, `BODY` is empty and `REQUEST_PATH_WITH_QUERY` must include the query string.\n- For POST requests, `BODY` is the raw JSON string.\n\n## Get Supported Chains (Aggregator)\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fsupported\u002Fchain\"\nQUERY=\"chainIndex=1\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '.'\n```\n\n## Get Tokens\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\nCHAIN_INDEX=\"1\"  # Ethereum\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fall-tokens\"\nQUERY=\"chainIndex=${CHAIN_INDEX}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '.data[:5]'\n```\n\n## Get Swap Quote (Quote Only)\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nFROM_TOKEN=\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"  # ETH (native)\nTO_TOKEN=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"    # USDC\nAMOUNT=\"1000000000000000000\"  # 1 ETH in wei\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fquote\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&fromTokenAddress=${FROM_TOKEN}&toTokenAddress=${TO_TOKEN}&amount=${AMOUNT}&swapMode=exactIn\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    fromTokenAmount: .data[0].fromTokenAmount,\n    toTokenAmount: .data[0].toTokenAmount,\n    tradeFee: .data[0].tradeFee,\n    router: .data[0].router\n  }'\n```\n\n## Get Swap Transaction (Router Call Data)\n\nNote: `slippagePercent` is required by the swap endpoint and is expressed as a\ndecimal percentage (e.g., `0.01` = 1%).\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nFROM_TOKEN=\"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE\"\nTO_TOKEN=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"\nAMOUNT=\"1000000000000000000\"  # 1 ETH in wei\nslippagePercent=\"0.01\"  # 1%\nWALLET=\"\u003CYOUR_WALLET_ADDRESS>\"\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fswap\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&fromTokenAddress=${FROM_TOKEN}&toTokenAddress=${TO_TOKEN}&amount=${AMOUNT}&swapMode=exactIn&slippagePercent=${slippagePercent}&userWalletAddress=${WALLET}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    tx: .data[0].tx,\n    router: .data[0].routerResult.router,\n    priceImpactPercent: .data[0].routerResult.priceImpactPercent,\n    dexRouterList: (.data[0].routerResult.dexRouterList \u002F\u002F [])\n  }'\n```\n\n## Get Approval Transaction (EVM)\n\nNote: Some responses may omit `to`\u002F`value`. If `to` is null, use the chain's\n`dexTokenApproveAddress` from the Supported Chains response as the target.\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nSECRET_KEY=\"${OKX_SECRET_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nTOKEN_ADDRESS=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"  # USDC\nAMOUNT=\"1000000000\"  # 1,000,000 USDC (6 decimals)\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fapprove-transaction\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&tokenContractAddress=${TOKEN_ADDRESS}&approveAmount=${AMOUNT}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq '{\n    data: .data[0].data,\n    dexContractAddress: .data[0].dexContractAddress,\n    gasLimit: .data[0].gasLimit,\n    gasPrice: .data[0].gasPrice\n  }'\n```\n\n## Get Approval Transaction (EVM) with `to` from Supported Chains\n\n```bash\nAPI_KEY=\"${OKX_API_KEY}\"\nPASSPHRASE=\"${OKX_PASSPHRASE}\"\n\nCHAIN_INDEX=\"1\"  # Ethereum\nTOKEN_ADDRESS=\"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48\"  # USDC\nAMOUNT=\"1000000000\"  # 1,000,000 USDC (6 decimals)\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fsupported\u002Fchain\"\nQUERY=\"chainIndex=${CHAIN_INDEX}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"OKX_SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\nAPPROVE_TO=$(curl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq -r '.data[0].dexTokenApproveAddress')\n\nTIMESTAMP=$(python3 - \u003C\u003C'PY'\nfrom datetime import datetime, timezone\nprint(datetime.now(timezone.utc).isoformat(timespec='milliseconds').replace('+00:00','Z'))\nPY\n)\n\nMETHOD=\"GET\"\nREQUEST_PATH=\"\u002Fapi\u002Fv6\u002Fdex\u002Faggregator\u002Fapprove-transaction\"\nQUERY=\"chainIndex=${CHAIN_INDEX}&tokenContractAddress=${TOKEN_ADDRESS}&approveAmount=${AMOUNT}\"\nPATH_WITH_QUERY=\"${REQUEST_PATH}?${QUERY}\"\n\nSIGN=$(python3 - \u003C\u003CPY\nimport hmac, hashlib, base64\nimport os\nmsg = f\"${TIMESTAMP}${METHOD}${PATH_WITH_QUERY}\"\nsecret = os.environ[\"OKX_SECRET_KEY\"].encode()\nprint(base64.b64encode(hmac.new(secret, msg.encode(), hashlib.sha256).digest()).decode())\nPY\n)\n\ncurl -s \"https:\u002F\u002Fweb3.okx.com${PATH_WITH_QUERY}\" \\\n  -H \"OK-ACCESS-KEY: ${API_KEY}\" \\\n  -H \"OK-ACCESS-TIMESTAMP: ${TIMESTAMP}\" \\\n  -H \"OK-ACCESS-PASSPHRASE: ${PASSPHRASE}\" \\\n  -H \"OK-ACCESS-SIGN: ${SIGN}\" | jq --arg to \"${APPROVE_TO}\" '{\n    data: .data[0].data,\n    dexContractAddress: (.data[0].dexContractAddress \u002F\u002F $to),\n    gasLimit: .data[0].gasLimit,\n    gasPrice: .data[0].gasPrice\n  }'\n```\n\n## Safety Rules\n\n1. ALWAYS display swap details before execution.\n2. WARN if price impact is high or priceImpactProtectionPercent is exceeded.\n3. CHECK token allowance (EVM) before swap execution.\n4. VERIFY slippage settings (`slippagePercent`).\n5. For approve responses, if `to` is null, use `dexTokenApproveAddress` for the chain.\n6. NEVER execute without explicit user confirmation.\n\n## Links\n\n- [OKX DEX API Reference (v6)](https:\u002F\u002Fweb3.okx.com\u002Fbuild\u002Fdev-docs\u002Fwallet-api\u002Fdex-api-reference)\n",{"name":5,"homepage":43,"metadata":44,"description":7},"https:\u002F\u002Fweb3.okx.com\u002Fbuild\u002Fdev-docs\u002Fwallet-api\u002Fdex-api-reference",{"clawdbot":45},{"emoji":46,"always":47,"requires":48},"?",true,{"bins":49},[33,50,34],"jq","main","f4cb2d49f7667e79ef7804f50396d5aaffdf1f56","数据与分析\u002Fokx-dex",1,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification","https:\u002F\u002Fgithub.com\u002FKernel8901","a little little little dobe in life but science geek","2026-04-05 16:43:56",{"source":8,"skillName":5,"commands":60,"prompt":70,"zipAvailable":47},[61,64,67],{"tool":62,"command":63},"npx","npx skills add Kernel8901\u002Fai-agent-skills-classification --skill okx-dex",{"tool":65,"command":66},"bunx","bunx skills add Kernel8901\u002Fai-agent-skills-classification --skill okx-dex",{"tool":68,"command":69},"pnpm","pnpm dlx skills add Kernel8901\u002Fai-agent-skills-classification --skill okx-dex","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F数据与分析\u002Fokx-dex\u002FSKILL.md",[72,78,82],{"path":73,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":76,"sourceHtmlUrl":77},"_meta.json","REFERENCE","参考文档",269,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F数据与分析\u002Fokx-dex\u002F_meta.json",{"path":79,"resourceType":74,"resourceTypeDesc":75,"sizeBytes":80,"sourceHtmlUrl":81},"README.md",786,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F数据与分析\u002Fokx-dex\u002FREADME.md",{"path":83,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"scripts\u002Ftest_okx.sh","SCRIPT","脚本",2589,"https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F数据与分析\u002Fokx-dex\u002Fscripts\u002Ftest_okx.sh",[89,112,147,158,168,196],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":38},"01M6Q5R6WZ06RRB9RQTW54B34B","zyfai","Earn yield on any Ethereum wallet on Base, Arbitrum, and Plasma. Use when a user wants passive DeFi yield on their funds. Deploys a non-custodial subaccount (Safe) linked to their EOA, enables automated yield optimization, and lets them deposit\u002Fwithdraw anytime.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzyfai-sdk\u002FSKILL.md",[],[91,96,97,98,99,100,101,32,102,103,104,105,106,107,108,109,110,111],"safe","ethereum","defi","Optimization","user","use","base","deposit","withdraw","yield","arbitrum","non-custodial","passive","defi yield","earn","yield optimization",{"skillNo":113,"name":114,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":130,"publishedAt":38},"01M6Q5R337B5JSNER4P4YS03TN","zerion-api","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api\u002FSKILL.md",[117,122,125],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000010","后端与接口","SCENARIO","使用场景",{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},"01JBSEEDCAT000000000000023","Skill与智能体开发",{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[35,131,132,133,134,135,136,98,137,32,138,139,140,141,142,143,144,145,146],"zerion api","zerion","MCP","mcp server","server","blockchain","transactions","crypto wallet","crypto","evm","solana","query","across","positions","token","prices",{"skillNo":148,"name":149,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":155,"publishedAt":38},"01M6Q5QZFYTDAZMZ27BN5VZXAR","zerion-api-skill","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-skill\u002FSKILL.md",[152,153,154],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},[35,156,157,131,132,133,134,135,136,98,137,32,139,140,141,142,143,144,145,146],"api skill","zerion api skill",{"skillNo":159,"name":160,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":166,"publishedAt":38},"01M6Q5QW17QW98RA3FE45E4RD8","zerion-api-mcp","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fzerion-api-mcp\u002FSKILL.md",[163,164,165],{"categoryNo":118,"categoryName":119,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":123,"categoryName":124,"taxonomyType":120,"taxonomyTypeDesc":121},{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},[133,35,167,131,132,134,135,98,137,32,138,139,140,141,142,143,144,145,146],"zerion api mcp",{"skillNo":169,"name":170,"nameZh":6,"description":171,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":172,"categories":173,"keywords":177,"publishedAt":38},"01M6Q5QQYZB7A501BDEQWKGSJT","yahoo-finance-forex","Fetches real-time FOREX news and market data from Yahoo Finance for major currency pairs (EUR\u002FUSD, GBP\u002FUSD, USD\u002FJPY, etc.). Analyzes sentiment and provides trading context.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-forex\u002FSKILL.md",[174],{"categoryNo":175,"categoryName":176,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000040","财务",[178,179,180,181,182,183,37,184,185,34,186,187,188,189,190,191,192,193,194,195],"finance","yahoo finance","forex","yahoo","yahoo finance forex","github","sentiment","real-time","install","Market","usd","news","time","currency","gbp","pip","market data","for",{"skillNo":197,"name":198,"nameZh":6,"description":199,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":200,"categories":201,"keywords":203,"publishedAt":38},"01M6Q5QM6VS84WZVM7BKXXPF32","yahoo-finance","This skill should be used when the user asks to \"get stock prices\", \"check stock quotes\", \"look up earnings\", \"get financial data\", \"find trending stocks\", or needs stock market data from Yahoo Finance.","https:\u002F\u002Fgithub.com\u002FKernel8901\u002Fai-agent-skills-classification\u002Fblob\u002Fmain\u002F金融\u002Fyahoo-finance-cli\u002FSKILL.md",[202],{"categoryNo":175,"categoryName":176,"taxonomyType":128,"taxonomyTypeDesc":129},[178,179,181,204,205,206,207,208,209,187,210,28,211,212,213,214,26,215,146,194],"cli","homebrew","find","check","brew","up","local","stock","link","trending","sf","ln"]