agentleFS
open-crab-aiopen-crab-ai/okx-plugin/CLAUDE.md

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

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

    All private endpoints require HMAC-SHA256 signing.

    line 45
  2. Very specific:

    Security: Never log or expose credentials.

    line 53
  3. Distinctive:

    All CLI option names match the OKX V5 API parameter names exactly.

    line 74

≈ “Common” is an estimate: at least 1 in 5 of the 12,729 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.

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

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 with commander; source in cli/src/, config in cli/package.json
  • skills/ — 13 skill definitions (each is a SKILL.md with 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

SkillPurposeWhen to Use
okx-accountTrading account managementUser asks about balance, positions, leverage, margin, risk, bills, account config
okx-tradeOrder placement & managementUser wants to place/cancel/amend orders, batch orders, algo orders (TP/SL, trigger, trailing stop, TWAP), view fills
okx-marketMarket dataUser asks for prices, tickers, order book, candles/K-line, trades, index data, exchange rate
okx-publicPublic reference dataUser needs instrument info, funding rates, open interest, mark price, position tiers, system time
okx-assetFunding accountUser wants to check funding balance, transfer funds, deposit/withdraw, flash swap
okx-trading-botAutomated strategiesUser wants grid trading (spot/contract), signal trading, or recurring buy (DCA)
okx-copy-tradingCopy tradingUser wants to follow/lead traders, view copy settings, profit sharing, public stats
okx-rubikTrading analyticsUser wants big data: OI history, long/short ratios, taker volume, margin ratios
okx-rfqBlock trading (RFQ)User wants to create/execute block trades, manage RFQs and quotes
okx-spreadSpread tradingUser wants to trade spreads, view spread instruments and order book
okx-financeFinancial productsUser wants staking (ETH/SOL/DeFi), savings/earn, flexible loans
okx-subaccountSub-account managementUser needs to manage sub-accounts, API keys, permissions, transfers
okx-systemSystem statusUser 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-USDT

API Authentication

All private endpoints require HMAC-SHA256 signing. Set credentials via .env or environment variables:

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

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.