agentleFS
open-crab-aiopen-crab-ai/okx-plugin/skills/okx-trading-bot/SKILL.md

okx-trading-bot

Skill1 starsChanged 9 months agoApache-2.0View on GitHub

Use this skill when users want to manage automated trading strategies: grid trading (spot/contract), signal-based trading, and recurring buy (DCA). Covers creating, stopping, modifying strategies, viewing sub-orders, positions, and AI parameters. For manual order placement, use okx-trade.

  • Reads credentials
  • Installs packages

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Confirm installed: Run which okx. If not found: npm install -g okx-trader-cli

    line 17

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
SKILL.md

OKX Trading Bot CLI

40+ commands for automated trading: grid trading, signal trading, and recurring buy (DCA).

Pre-flight Checks

  1. Confirm installed: Run which okx. If not found: npm install -g okx-trader-cli
  2. API credentials required: Set in .env

Skill Routing

  • For manual orders → use okx-trade
  • For account info → use okx-account
  • For market data → use okx-market

Grid Trading Commands

Place Grid Order

okx trading-bot grid order-algo --data '{"instId":"BTC-USDT","algoOrdType":"grid","maxPx":"70000","minPx":"60000","gridNum":"20","runType":"1","sz":"1000","direction":"long","lever":"5"}'

Stop Grid

okx trading-bot grid stop --data '[{"algoId":"123","instId":"BTC-USDT","algoOrdType":"grid","stopType":"1"}]'

Get Pending Grid Orders

okx trading-bot grid orders-pending --algoOrdType grid
okx trading-bot grid orders-pending --algoOrdType contract_grid

Get Grid Order History

okx trading-bot grid orders-history --algoOrdType grid

Get Grid Order Details

okx trading-bot grid order-details --algoOrdType grid --algoId 123

Get Grid Sub-Orders

okx trading-bot grid sub-orders --algoId 123 --algoOrdType grid

Get Grid Positions (Contract)

okx trading-bot grid positions --algoOrdType contract_grid

Withdraw Grid Income

okx trading-bot grid withdraw-income --algoId 123

Get Grid AI Parameters

okx trading-bot grid ai-param --algoOrdType grid --instId BTC-USDT
okx trading-bot grid ai-param --algoOrdType contract_grid --instId BTC-USDT-SWAP --direction long

RSI Back Testing

okx trading-bot grid rsi-back-testing --instId BTC-USDT --timeframe 1H

Signal Trading Commands

Create Signal

okx trading-bot signal create --data '{"signalChanName":"my-signal","signalChanDesc":"My trading signal"}'

Get Signals

okx trading-bot signal list

Place Signal Algo Order

okx trading-bot signal order-algo --data '{"signalChanId":"123","lever":"10","investAmt":"1000","subOrdType":"1"}'

Stop Signal

okx trading-bot signal stop --algoId 123

Get Signal Orders

okx trading-bot signal orders-pending
okx trading-bot signal orders-history
okx trading-bot signal order-details --algoId 123

Get Signal Positions

okx trading-bot signal positions --algoId 123
okx trading-bot signal positions-history --algoId 123

Get Signal Sub-Orders

okx trading-bot signal sub-orders --algoId 123

Get Signal Event History

okx trading-bot signal event-history --algoId 123

Recurring Buy (DCA) Commands

Place Recurring Buy

okx trading-bot recurring order-algo --data '{"stgyName":"BTC DCA","recurringList":[{"ccy":"BTC","ratio":"100"}],"investmentCcy":"USDT","investmentAmt":"100","period":"monthly","recurringDay":"1","recurringTime":"0"}'

Amend Recurring Buy

okx trading-bot recurring amend --data '{"algoId":"123","stgyName":"Updated DCA"}'

Stop Recurring Buy

okx trading-bot recurring stop --data '[{"algoId":"123"}]'

Get Recurring Orders

okx trading-bot recurring orders-pending
okx trading-bot recurring orders-history
okx trading-bot recurring order-details --algoId 123
okx trading-bot recurring sub-orders --algoId 123

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.