Back to Skills

okx-cex-bot

Manage Grid bots (spot/contract/coin-margined) and DCA Martingale bots (Spot DCA 现货马丁 / Contract DCA 合约马丁) on OKX. Covers create, stop, amend, monitor P&L, TP/SL, margin/investment adjustment, and AI-recommended parameters. Requires API credentials. Not for regular orders (okx-cex-trade), market data (okx-cex-market), or account info (okx-cex-portfolio).

104stars15forksUpdated 5/2/2026

Security Assessment

Safe(100/100)
Security Score100/100

About okx-cex-bot

The okx-cex-bot skill provides a comprehensive solution for managing automated trading bots on the OKX platform, focusing specifically on Grid bots (spot and contract) and DCA Martingale bots (Spot DCA and Contract DCA). This skill addresses the need for users to efficiently create, monitor, and manage bots without relying on local processes, as all bot execution occurs server-side on OKX. By integrating with OKX's native infrastructure, it eliminates the complexities of manual trading and allows for seamless automation while ensuring secure access through API credentials or OAuth authentication.

Key features of this skill include the ability to create, stop, and amend bot configurations, monitor profit and loss (P&L), manage take-profit and stop-loss levels, and adjust margin or investment amounts. Additionally, it provides AI-recommended parameters to optimize bot performance. The skill emphasizes security by requiring proper API or OAuth configuration and discourages sharing credentials in chat. Users can check credentials, confirm trading modes (live or demo), and handle authentication errors through guided steps, ensuring robust and safe bot operation.

This skill is ideal for active traders, algorithmic trading enthusiasts, and professional investors who wish to automate strategies on OKX. It is particularly suited for those looking to manage multiple bots simultaneously, optimize trading strategies using AI recommendations, or execute automated trading without maintaining local processes. Its target users are expected to have a basic understanding of OKX bot types and trading concepts, making it a valuable tool for both intermediate and advanced users who want to enhance efficiency and reduce manual trading effort.

FAQ

Do I need to install any software to use okx-cex-bot?

Yes, you must install the okx CLI using npm (`npm install -g @okx_ai/okx-trade-cli`) and complete the configuration with `okx config init` to set up API credentials or OAuth authentication.

Can I use okx-cex-bot for regular spot or futures orders?

No, this skill is designed specifically for Grid and DCA Martingale bots. For regular spot, swap, or futures orders, you should use the okx-cex-trade skill.

How do I switch between live and demo trading modes?

The trading mode is determined based on the authentication method. For API Key users, use `--profile <live-profile>` for live or `--profile <demo-profile>` for demo. For OAuth users, live mode is default, and you can add `--demo` for simulated trading.

What should I do if I encounter a 401 authentication error?

Stop immediately, load the okx-cex-auth skill to re-authenticate, and then retry your original command.

Does okx-cex-bot provide market data or account balances?

No, for market data and prices use okx-cex-market, and for account balances, positions, and fees use okx-cex-portfolio. This skill only manages Grid and DCA bots.

Install okx-cex-bot

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill