OKX(欧易) MCP 与 API 接入

数据供应商鉴权:api_key

免密钥读取 OKX 行情、盘口、K 线与资金费率;配置自有密钥后可访问账户交易、资金与理财。

发给 Agent 对话直接发给 Claude Code、OpenClaw、OpenCode、Grok Bot、Antigravity、Hermes 或 Pi

Read https://duang.ai/SKILL.md and use duang to run crypto.candles.

由 OKX(欧易) 提供支持的标准化数据接口(4)

可以让智能体这样提问

“What is Bitcoin trading at on OKX?”

## BTC-USDT on OKX (Spot) | Metric | Value | |---|---| | **Last price** | **$73,884.20** | | **24h open** | $74,307.70 | | **24h high / low** | $74,843.40 / $72,727.30 | | **Best bid / ask** | $73,887.40 / $73,887.50 | | **24h volume** | $740.91M | Bitcoin is slightly below its 24h open, trading near the middle of the day's range.

ticker · 记录于 2026-11-11T10:23:54.824Z

“Show me Bitcoin's daily candles on OKX for the last three days.”

Last three daily **BTC-USDT** candles on OKX: | Open | High | Low | Close | Volume (BTC) | |---|---|---|---|---| | $73,205.40 | $74,179.70 | $72,727.30 | $73,884.20 | 5,822.77 | | $75,522.90 | $75,540.10 | $72,858.50 | $73,205.40 | 7,705.04 | | $76,074.80 | $76,100.00 | $73,500.00 | $75,524.40 | 9,854.15 |

candles · 记录于 2026-11-11T10:23:55.780Z

全部操作(381)

操作价格
GET www.okx.com/api/v5/market/ticker

The last price of an instrument, with its best bid and ask and the last 24 hours.

自备 Key
GET www.okx.com/api/v5/market/books

The order book of an instrument: what buyers and sellers offer, by price.

自备 Key
GET www.okx.com/api/v5/market/candles

The candles of an instrument: open, high, low, close and volume for each bar.

自备 Key
GET www.okx.com/api/v5/market/trades

The latest trades of an instrument.

自备 Key
GET www.okx.com/api/v5/public/instruments

What an instrument is, and the rules for trading it.

自备 Key
GET www.okx.com/api/v5/public/funding-rate

The funding rate of a perpetual swap: what longs pay shorts, or the reverse.

自备 Key
GET www.okx.com/api/v5/public/open-interest

How many contracts are open on a derivative.

自备 Key
GET www.okx.com/api/v5/account/account-position-risk

Get account and position risk

自备 Key
GET www.okx.com/api/v5/account/adjust-leverage-info

Get leverage estimated info

自备 Key
GET www.okx.com/api/v5/account/balance

Get balance

自备 Key
GET www.okx.com/api/v5/account/bills

Get bills details (last 7 days)

自备 Key
GET www.okx.com/api/v5/account/bills-archive

Get bills details (last 3 months)

自备 Key
GET www.okx.com/api/v5/account/bills-history-archive

Get bills details (since 2021)

自备 Key
GET www.okx.com/api/v5/account/collateral-assets

Get collateral assets

自备 Key
GET www.okx.com/api/v5/account/config

Get account configuration

自备 Key
GET www.okx.com/api/v5/account/greeks

Get Greeks

自备 Key
GET www.okx.com/api/v5/account/instruments

Get instruments

自备 Key
GET www.okx.com/api/v5/account/interest-accrued

Get interest accrued data

自备 Key
GET www.okx.com/api/v5/account/interest-limits

Get borrow interest and limit

自备 Key
GET www.okx.com/api/v5/account/interest-rate

Get interest rate

自备 Key
GET www.okx.com/api/v5/account/leverage-info

Get leverage

自备 Key
GET www.okx.com/api/v5/account/max-avail-size

Get maximum available balance/equity

自备 Key
GET www.okx.com/api/v5/account/max-loan

Get the maximum loan of instrument

自备 Key
GET www.okx.com/api/v5/account/max-size

Get maximum order quantity

自备 Key
GET www.okx.com/api/v5/account/max-withdrawal

Get maximum withdrawals

自备 Key
GET www.okx.com/api/v5/account/mmp-config

GET MMP Config

自备 Key
GET www.okx.com/api/v5/account/move-positions-history

Get move positions history

自备 Key
GET www.okx.com/api/v5/account/position-tiers

Get PM position limitation

自备 Key
GET www.okx.com/api/v5/account/positions

Get positions

自备 Key
GET www.okx.com/api/v5/account/positions-history

Get positions history

自备 Key
GET www.okx.com/api/v5/account/precheck-set-delta-neutral

Precheck set delta neutral

自备 Key
GET www.okx.com/api/v5/account/risk-state

Get account risk state

自备 Key
GET www.okx.com/api/v5/account/set-account-switch-precheck

Precheck account mode switch

自备 Key
GET www.okx.com/api/v5/account/spot-borrow-repay-history

Get borrow/repay history

自备 Key
GET www.okx.com/api/v5/account/subaccount/balances

Get sub-account trading balance

自备 Key
GET www.okx.com/api/v5/account/subaccount/max-withdrawal

Get sub-account maximum withdrawals

自备 Key
GET www.okx.com/api/v5/account/subtypes

Get bill types

自备 Key
GET www.okx.com/api/v5/account/trade-fee

Get fee rates

自备 Key
POST www.okx.com/api/v5/account/account-level-switch-preset

Preset account mode switch

自备 Key
POST www.okx.com/api/v5/account/activate-feature

Activate feature

自备 Key
POST www.okx.com/api/v5/account/activate-option

Activate option

自备 Key
POST www.okx.com/api/v5/account/bills-history-archive

Apply bills details (since 2021)

自备 Key
POST www.okx.com/api/v5/account/demo-adjust-balance

Adjust demo account balance

自备 Key
POST www.okx.com/api/v5/account/mmp-config

Set MMP

自备 Key
POST www.okx.com/api/v5/account/mmp-reset

Reset MMP Status

自备 Key
POST www.okx.com/api/v5/account/position-builder

Position builder (new)

自备 Key
POST www.okx.com/api/v5/account/position-builder-graph

Position builder trend graph

自备 Key
POST www.okx.com/api/v5/account/position/margin-balance

Increase/decrease margin

自备 Key
POST www.okx.com/api/v5/account/set-account-level

Set account mode

自备 Key
POST www.okx.com/api/v5/account/set-auto-earn

Set auto earn

自备 Key
POST www.okx.com/api/v5/account/set-auto-loan

Set auto loan

自备 Key
POST www.okx.com/api/v5/account/set-auto-repay

Set auto repay

自备 Key
POST www.okx.com/api/v5/account/set-collateral-assets

Set collateral assets

自备 Key
POST www.okx.com/api/v5/account/set-fee-type

Set fee type

自备 Key
POST www.okx.com/api/v5/account/set-greeks

Set greeks (PA/BS)

自备 Key
POST www.okx.com/api/v5/account/set-isolated-mode

Isolated margin trading settings

自备 Key
POST www.okx.com/api/v5/account/set-leverage

Set leverage

自备 Key
POST www.okx.com/api/v5/account/set-position-mode

Set position mode

自备 Key
POST www.okx.com/api/v5/account/set-riskOffset-amt

Set risk offset amount

自备 Key
POST www.okx.com/api/v5/account/set-settle-currency

Set settle currency

自备 Key
已展示 60 / 381 个操作,在上方输入关键词可检索全部。

常见问题

如何在 Claude Code 或 Cursor 中接入 OKX(欧易)?

通过 Duang 远程 MCP 网关(https://api.duang.ai/mcp)一键连接,即可让 AI Agent 调用 OKX(欧易) 全部 381 个操作,无需本地维护 MCP 插件或明文密钥。

调用 OKX(欧易) 的数据接口如何计费?

在团队加密金库中绑定自有 OKX(欧易) 密钥即可免费调用。

我的 OKX(欧易) 密钥会暴露给大模型吗?

不会。密钥仅在 Duang 服务端出站请求时解密注入,本地配置文件与大模型上下文中均不包含明文密钥。

相关数据供应商