agentleFS
open-crab-aiopen-crab-ai/okx-plugin/.github/copilot-instructions.md

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

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
  1. Very specific:

    All option names match the OKX V5 API parameter names exactly (e.g.

    line 11
  2. Very specific:

    Add --simulated flag for demo/simulated trading.

    line 62

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
copilot-instructions.md

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

ModulePurposeAuth
accountBalance, positions, leverage, margin, bills, riskYes
tradePlace/cancel/amend orders, batch ops, algo orders (TP/SL, trailing, TWAP)Yes
marketTickers, order book, K-line/candles, trades, index pricesNo
publicInstruments, funding rates, open interest, mark price, position tiersNo
assetFunding balance, transfers, deposits, withdrawals, flash swapYes
trading-botGrid trading (spot/contract), signal trading, recurring buy (DCA)Yes
copy-tradingLead/follow traders, profit sharing, public statsYes
rubikAnalytics: long/short ratios, taker volume, OI historyNo
rfqBlock trading: RFQ, quotes, counterpartiesYes
spreadSpread trading: orders, instruments, order bookYes
financeStaking (ETH/SOL/DeFi), savings, flexible loansYes
subaccountSub-account management, API keys, permissionsYes
systemSystem status, maintenance announcementsNo

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_KEY
  • OKX_SECRET_KEY
  • OKX_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.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.