okx-plugin
Copilot instructions1 starsChanged 9 months agoApache-2.0View on GitHub
This repository provides the okx CLI tool wrapping the complete OKX V5 REST API (220+ endpoints). Use it to execute trading operations, query market data, manage funds, and run automated strategies. All option names match the OKX V5 API parameter names exactly (e.g. --instId, --tdMode, --ordType). No extra mapping needed. Credentials are loaded from .env file or environment variables: - OKX_API_KEY - OKX_SECRET_KEY - OKX_PASSPHRASE Add --simulated flag for demo/simulated trading. Each module has a detailed skill file at skills/okx-<module>/SKILL.md…
- Reads credentials
In this repository15 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- okx-accountSkill
- okx-assetSkill
- okx-copy-tradingSkill
- okx-financeSkill
- okx-marketSkill
- okx-publicSkill
- okx-rfqSkill
- okx-rubikSkill
- okx-spreadSkill
- okx-subaccountSkill
- okx-systemSkill
- okx-tradeSkill
- okx-trading-botSkill
The file
We split this copilot-instructions.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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 11
All option names match the OKX V5 API parameter names exactly (e.g.
- Very specific: line 62
Add --simulated flag for demo/simulated trading.
≈ “Common” is an estimate: at least 1 in 5 of the 1,645 Copilot instructions 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
GitHub Copilot Instructions — OKX V5 API Skills
This repository provides the okx CLI tool wrapping the complete OKX V5 REST API (220+ endpoints). Use it to execute trading operations, query market data, manage funds, and run automated strategies.
Command Format
okx <module> <command> [options]All option names match the OKX V5 API parameter names exactly (e.g. --instId, --tdMode, --ordType). No extra mapping needed.
Modules
| Module | Purpose | Auth |
| account | Balance, positions, leverage, margin, bills, risk | Yes |
| trade | Place/cancel/amend orders, batch ops, algo orders (TP/SL, trailing, TWAP) | Yes |
| market | Tickers, order book, K-line/candles, trades, index prices | No |
| public | Instruments, funding rates, open interest, mark price, position tiers | No |
| asset | Funding balance, transfers, deposits, withdrawals, flash swap | Yes |
| trading-bot | Grid trading (spot/contract), signal trading, recurring buy (DCA) | Yes |
| copy-trading | Lead/follow traders, profit sharing, public stats | Yes |
| rubik | Analytics: long/short ratios, taker volume, OI history | No |
| rfq | Block trading: RFQ, quotes, counterparties | Yes |
| spread | Spread trading: orders, instruments, order book | Yes |
| finance | Staking (ETH/SOL/DeFi), savings, flexible loans | Yes |
| subaccount | Sub-account management, API keys, permissions | Yes |
| system | System status, maintenance announcements | No |
Common Commands
# Market data
okx market ticker --instId BTC-USDT
okx market candles --instId BTC-USDT --bar 1H --limit 24
okx public funding-rate --instId BTC-USDT-SWAP
okx rubik long-short-account-ratio --instId BTC-USDT-SWAP --period 1D
# Trading
okx account balance
okx account positions
okx trade order --instId BTC-USDT --tdMode cash --side buy --ordType market --sz 100 --tgtCcy quote_ccy
okx trade algo-order --instId BTC-USDT-SWAP --tdMode cross --side sell --ordType conditional --sz 1 --tpTriggerPx 75000 --tpOrdPx -1
# Fund management
okx asset balances
okx asset transfer --ccy USDT --amt 1000 --from 6 --to 18
# Grid bot
okx trading-bot grid ai-param --algoOrdType grid --instId BTC-USDT
okx trading-bot grid order-algo --data '{"instId":"BTC-USDT","algoOrdType":"grid","maxPx":"70000","minPx":"60000","gridNum":"20","runType":"1","sz":"1000"}'Authentication
Credentials are loaded from .env file or environment variables:
OKX_API_KEYOKX_SECRET_KEYOKX_PASSPHRASE
Add --simulated flag for demo/simulated trading.
Detailed References
Each module has a detailed skill file at skills/okx-<module>/SKILL.md with full parameter documentation. Consult these files for complete command references.
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.

