okx-mcp-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseOKX MCP Skill
OKX MCP Skill
Use this skill to run OKX MCP operations through .
uxcReuse the skill for shared protocol discovery, output parsing, and generic auth/binding flows.
uxc使用本Skill通过执行OKX MCP操作。
uxc复用 Skill以实现共享协议发现、输出解析以及通用认证/绑定流程。
uxcPrerequisites
前置条件
- is installed and available in
uxc.PATH - Network access to .
https://web3.okx.com/api/v1/onchainos-mcp - OKX Onchain API key is available for real calls.
- 已安装且可在
uxc中访问。PATH - 可访问网络。
https://web3.okx.com/api/v1/onchainos-mcp - 拥有OKX Onchain API密钥用于实际调用。
Quick Trial Key
快速试用密钥
For quick read-only trial, OKX docs currently expose a shared demo key:
d573a84c-8e79-4a35-b0c6-427e9ad2478d
Example:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret d573a84c-8e79-4a35-b0c6-427e9ad2478d
Use your own key for regular usage, stability, and production workflows.
如需快速进行只读试用,OKX文档目前提供一个共享演示密钥:
d573a84c-8e79-4a35-b0c6-427e9ad2478d
示例:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret d573a84c-8e79-4a35-b0c6-427e9ad2478d
常规使用、追求稳定性以及生产流程请使用您自己的密钥。
Core Workflow
核心流程
- Confirm endpoint and protocol with help-first probing:
uxc https://web3.okx.com/api/v1/onchainos-mcp -h
- Configure credential/binding for repeatable auth:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-env OKX_ACCESS_KEYuxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-op op://Engineering/okx/OK-ACCESS-KEYuxc auth binding add --id okx-mcp --host web3.okx.com --path-prefix /api/v1/onchainos-mcp --scheme https --credential okx-mcp --priority 100
- Use fixed link command by default:
command -v okx-mcp-cli- If missing, create it:
uxc link okx-mcp-cli https://web3.okx.com/api/v1/onchainos-mcp okx-mcp-cli -h
- Inspect operation schema before execution:
okx-mcp-cli dex-okx-market-price -hokx-mcp-cli dex-okx-market-token-search -hokx-mcp-cli dex-okx-balance-total-value -hokx-mcp-cli dex-okx-dex-quote -h
- Prefer read operations first, then high-impact operations.
- 通过优先提供帮助的探测方式确认端点和协议:
uxc https://web3.okx.com/api/v1/onchainos-mcp -h
- 配置凭证/绑定以实现可重复认证:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-env OKX_ACCESS_KEYuxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-op op://Engineering/okx/OK-ACCESS-KEYuxc auth binding add --id okx-mcp --host web3.okx.com --path-prefix /api/v1/onchainos-mcp --scheme https --credential okx-mcp --priority 100
- 默认使用固定链接命令:
command -v okx-mcp-cli- 如果缺失,创建链接:
uxc link okx-mcp-cli https://web3.okx.com/api/v1/onchainos-mcp okx-mcp-cli -h
- 执行前检查操作schema:
okx-mcp-cli dex-okx-market-price -hokx-mcp-cli dex-okx-market-token-search -hokx-mcp-cli dex-okx-balance-total-value -hokx-mcp-cli dex-okx-dex-quote -h
- 优先执行只读操作,再执行高影响操作。
Capability Map
功能映射
- Market:
dex-okx-market-pricedex-okx-market-tradesdex-okx-market-candlesticksdex-okx-market-candlesticks-historydex-okx-index-current-pricedex-okx-index-historical-price
- Token discovery/enrichment:
dex-okx-market-token-searchdex-okx-market-token-rankingdex-okx-market-token-holderdex-okx-market-token-basic-infodex-okx-market-token-price-info
- Wallet:
dex-okx-balance-chainsdex-okx-balance-total-valuedex-okx-balance-total-token-balancesdex-okx-balance-specific-token-balance
- Swap:
dex-okx-dex-aggregator-supported-chainsdex-okx-dex-liquiditydex-okx-dex-quotedex-okx-dex-approve-transactiondex-okx-dex-swapdex-okx-dex-solana-swap-instruction
- 市场相关:
dex-okx-market-pricedex-okx-market-tradesdex-okx-market-candlesticksdex-okx-market-candlesticks-historydex-okx-index-current-pricedex-okx-index-historical-price
- 代币发现/信息增强:
dex-okx-market-token-searchdex-okx-market-token-rankingdex-okx-market-token-holderdex-okx-market-token-basic-infodex-okx-market-token-price-info
- 钱包相关:
dex-okx-balance-chainsdex-okx-balance-total-valuedex-okx-balance-total-token-balancesdex-okx-balance-specific-token-balance
- 兑换相关:
dex-okx-dex-aggregator-supported-chainsdex-okx-dex-liquiditydex-okx-dex-quotedex-okx-dex-approve-transactiondex-okx-dex-swapdex-okx-dex-solana-swap-instruction
ChainIndex Quick Reference
ChainIndex快速参考
- Ethereum:
1 - BSC:
56 - XLayer:
196 - Solana:
501 - Base:
8453 - Arbitrum:
42161
Always prefer runtime discovery ( / / ) when possible.
dex-okx-market-price-chainsdex-okx-dex-aggregator-supported-chainsdex-okx-balance-chains- Ethereum:
1 - BSC:
56 - XLayer:
196 - Solana:
501 - Base:
8453 - Arbitrum:
42161
尽可能优先使用运行时发现( / / )。
dex-okx-market-price-chainsdex-okx-dex-aggregator-supported-chainsdex-okx-balance-chainsGuardrails
防护规则
- Keep automation on JSON output envelope; do not rely on .
--text - Parse stable fields first: ,
ok,kind,protocol,data.error - Use as default command path.
okx-mcp-cli - is equivalent to
okx-mcp-cli <operation> ....uxc https://web3.okx.com/api/v1/onchainos-mcp <operation> ... - If call result contains :
Request header OK-ACCESS-KEY can not be empty- confirm auth binding matches endpoint with
uxc auth binding match https://web3.okx.com/api/v1/onchainos-mcp - update credential with explicit header:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-env OKX_ACCESS_KEY - confirm credential has a secret source (,
--secret-env, or literal--secret-op)--secret
- confirm auth binding matches endpoint with
- For high-impact operations require explicit user confirmation:
dex-okx-dex-approve-transactiondex-okx-dex-swapdex-okx-dex-solana-swap-instruction
- Solana caveat from OKX docs:
- for market candles/trades, use wSOL token address
So11111111111111111111111111111111111111112 - for some price contexts, SOL system address may also appear in docs
11111111111111111111111111111111 - when data is empty on Solana, verify operation-level address expectation first.
- for market candles/trades, use wSOL token address
- 自动化操作仅基于JSON输出包,不要依赖格式。
--text - 优先解析稳定字段:,
ok,kind,protocol,data。error - 使用作为默认命令路径。
okx-mcp-cli - 等同于
okx-mcp-cli <operation> ...。uxc https://web3.okx.com/api/v1/onchainos-mcp <operation> ... - 如果调用结果包含:
Request header OK-ACCESS-KEY can not be empty- 使用确认认证绑定与端点匹配
uxc auth binding match https://web3.okx.com/api/v1/onchainos-mcp - 使用显式更新凭证:
uxc auth credential set okx-mcp --auth-type api_key --api-key-header OK-ACCESS-KEY --secret-env OKX_ACCESS_KEY - 确认凭证有密钥来源(,
--secret-env, 或字面量--secret-op)--secret
- 使用
- 高影响操作需要用户明确确认:
dex-okx-dex-approve-transactiondex-okx-dex-swapdex-okx-dex-solana-swap-instruction
- OKX文档中关于Solana的注意事项:
- 市场蜡烛图/交易数据需使用wSOL代币地址
So11111111111111111111111111111111111111112 - 在某些价格场景下,SOL系统地址也可能出现在文档中
11111111111111111111111111111111 - 当Solana上数据为空时,首先验证操作层面的地址要求。
- 市场蜡烛图/交易数据需使用wSOL代币地址
References
参考资料
- Invocation patterns:
references/usage-patterns.md
- 调用模式:
references/usage-patterns.md