okx-plugin
CLAUDE.md1 starsChanged 9 months agoApache-2.0View on GitHub
This file provides guidance to Claude Code when working with this repository. This is a Claude Code plugin — a collection of CLI-based skills for the complete OKX V5 REST API. The project provides 13 skills covering 220+ API endpoints for trading, market data, funding, automated strategies, analytics, and more. All private endpoints require HMAC-SHA256 signing. Set credentials via .env or environment variables: For simulated trading, add --simulated flag or set OKX_SIMULATED=1. Security: Never log or expose credentials. The .env…
- Reads credentials
- Installs packages
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 45
All private endpoints require HMAC-SHA256 signing.
- Very specific: line 53
Security: Never log or expose credentials.
- Distinctive: line 74
All CLI option names match the OKX V5 API parameter names exactly.
≈ “Common” is an estimate: at least 1 in 5 of the 29,248 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code when working with this repository.
Project Overview
This is a Claude Code plugin — a collection of CLI-based skills for the complete OKX V5 REST API. The project provides 13 skills covering 220+ API endpoints for trading, market data, funding, automated strategies, analytics, and more.
Architecture
- cli/ — Node.js CLI binary (
okx), built withcommander; source incli/src/, config incli/package.json - skills/ — 13 skill definitions (each is a
SKILL.mdwith YAML frontmatter + CLI command reference) - cli/src/commands/ — One module per API domain (account, trade, market, public, asset, etc.)
- cli/src/utils/ — Shared utilities:
auth.js(HMAC-SHA256 signing),client.js(HTTP requests),config.js(credential loading) - .github/workflows/ — CI pipeline for testing CLI and skill file integrity
Available Skills
| Skill | Purpose | When to Use |
| okx-account | Trading account management | User asks about balance, positions, leverage, margin, risk, bills, account config |
| okx-trade | Order placement & management | User wants to place/cancel/amend orders, batch orders, algo orders (TP/SL, trigger, trailing stop, TWAP), view fills |
| okx-market | Market data | User asks for prices, tickers, order book, candles/K-line, trades, index data, exchange rate |
| okx-public | Public reference data | User needs instrument info, funding rates, open interest, mark price, position tiers, system time |
| okx-asset | Funding account | User wants to check funding balance, transfer funds, deposit/withdraw, flash swap |
| okx-trading-bot | Automated strategies | User wants grid trading (spot/contract), signal trading, or recurring buy (DCA) |
| okx-copy-trading | Copy trading | User wants to follow/lead traders, view copy settings, profit sharing, public stats |
| okx-rubik | Trading analytics | User wants big data: OI history, long/short ratios, taker volume, margin ratios |
| okx-rfq | Block trading (RFQ) | User wants to create/execute block trades, manage RFQs and quotes |
| okx-spread | Spread trading | User wants to trade spreads, view spread instruments and order book |
| okx-finance | Financial products | User wants staking (ETH/SOL/DeFi), savings/earn, flexible loans |
| okx-subaccount | Sub-account management | User needs to manage sub-accounts, API keys, permissions, transfers |
| okx-system | System status | User wants to check system status, maintenance schedule, announcements |
Quick Start
npm install -g okx-trader-cli
okx system status # no auth needed
okx market ticker --instId BTC-USDTAPI Authentication
All private endpoints require HMAC-SHA256 signing. Set credentials via .env or environment variables:
OKX_API_KEYOKX_SECRET_KEYOKX_PASSPHRASE
For simulated trading, add --simulated flag or set OKX_SIMULATED=1.
Security: Never log or expose credentials. The .env file is in .gitignore.
Common Workflows
Check Balance → Place Order → Monitor:
okx-account (balance) → okx-trade (place order) → okx-trade (get-order) → okx-account (positions)
Market Research → Trade:
okx-market (ticker/candles) → okx-public (funding-rate) → okx-rubik (long-short ratio) → okx-trade (order)
Grid Bot Setup:
okx-market (candles for range) → okx-trading-bot (grid ai-param) → okx-trading-bot (grid order-algo) → okx-trading-bot (grid orders-pending)
Fund Management:
okx-asset (balances) → okx-asset (transfer between accounts) → okx-account (verify balance)
Portfolio Review:
okx-account (balance + positions) → okx-market (current prices) → okx-account (bills for P&L history)
CLI Parameter Convention
All CLI option names match the OKX V5 API parameter names exactly. For example:
--instId(not--instrument-id)--tdMode(not--trade-mode)--ordType(not--order-type)
Refer to each skill's SKILL.md for the full parameter list, or consult the OKX V5 API docs.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

