PlugWiki

okx-cex-portfolio Skill (OKX) for Claude: What It Does and How to Install It

Lets Claude read your OKX account balances, positions, P&L, fees and transfer funds through the okx CLI.

Installs
10.2K
on skills.sh
Stars
200
on GitHub
Updated
Oct 2026
last repo commit

Ask Claude for your balance, positions, P&L, trading fees or account config, and it runs the matching read command on the okx CLI. It can also transfer funds between accounts and switch position mode, which SKILL.md marks as write commands.

Every authenticated command needs either an OKX API key in ~/.okx/config.toml or an OAuth login, checked at the start of each session. SKILL.md tells Claude to never accept credentials in chat and to send you to okx config init or the sibling okx-cex-auth skill instead.

Good for

  • Traders who want a quick balance or P&L check in chat
  • Anyone reviewing open positions or fee tier before trading
  • People moving funds between their trading and funding accounts

Install okx-cex-portfolio

Claude Code

  1. 1

    Copy this prompt.

    Install the okx-cex-portfolio skill in Claude Code. Run this command:
    
    npm install -g @okx_ai/okx-trade-cli
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

This skill does nothing without the okx CLI, so install it first. It needs OKX API credentials or an OAuth login, which the sibling okx-cex-auth skill sets up: run its steps, or okx config init, before using this skill.

From the project README. Source.

What's in the skill

When it loads

This skill should be used when the user asks about 'account balance', 'how much USDT do I have', 'my funding account', 'show my positions', 'open positions', 'position P&L', 'unrealized PnL', 'closed positions', 'position history', 'realized PnL', 'account bills', 'transaction history', 'trading fees', 'fee tier', 'account config', 'max order size', 'how much can I buy', 'withdrawable amount', 'transfer funds', 'move USDT to trading account', or 'switch position mode'. Also use for '总资产', 'full balance', 'all assets', 'total holdings', 'net worth', 'how much do I have in total', 'show all my balances', 'all account balances', 'asset overview', 'aggregated balance', 'asset snapshot', '资产快照'. Requires API credentials. Do NOT use for market prices (use okx-cex-market), placing/cancelling orders (use okx-cex-trade), or grid/DCA bots (use okx-cex-bot).

Sections in SKILL.md

  1. Preflight
  2. Prerequisites
  3. Credential & Profile Check
  4. Step A — Verify credentials
  5. Step B — Confirm trading mode
  6. Handling Authentication Errors
  7. Demo vs Live Mode
  8. Skill Routing
  9. Quickstart
  10. Command Index
  11. Read Commands
  12. Write Commands
  13. Cross-Skill Workflows
  14. Pre-trade balance check
  15. Pre-bot balance check
  16. Net worth quick view

Key facts

License
MIT
Installs on skills.sh
10,234 (Nov 2, 2026)
Last repo commit
Oct 28, 2026

What it includes

  • One-shot trading and funding balance

    okx account balance-all gives a combined view; balance and asset-balance split trading and funding accounts.

    Try: “What is my total balance across trading and funding?”

    Read · Balance snapshot

  • Open and closed positions with realized and unrealized P&L

    Lists open positions filtered by instrument type, and separately lists closed positions with realized P&L.

    Read · Positions and P&L

  • Deposit, withdrawal and trade ledger

    Reads your account bills (transaction history).

    Read · Account bills

  • Your maker/taker fee tier and account settings

    Reads your trading fee tier and account configuration, including position mode and UID.

    Read · Fees and account config

  • Maximum buy/sell size and withdrawal amount

    Reads the maximum order size, available size and withdrawable amount for an instrument or currency.

    Read · Max size checks

  • Moves funds between your trading and funding accounts, or to and from a sub-account.

    A write command (okx account transfer) that takes a currency, amount and from/to account. SKILL.md asks for confirmation of those values and the mode before it runs.

    Try: “Move 500 USDT from funding to my trading account.”

    Write · Transfer funds

  • Changes net or hedge position mode

    A write command for account-level position mode (net or hedge). SKILL.md notes that switching may affect open positions.

    Write · Switch position mode

From the official docs

Permissions

Medium risk

This skill can move funds between your OKX accounts, including sub-accounts, and change position mode, using credentials you set up outside the chat. Test with demo mode before approving a live transfer.

What it can do

  • Read your data
  • Create and change things
  • Delete things
  • Read-only mode

Watch out for

  • It can transfer funds, including to and from sub-accounts

    The transfer command takes a currency, amount and from/to account, and its transferType option covers moves within the account, to a sub-account and from a sub-account (references in SKILL.md). SKILL.md asks the agent to confirm the currency, amount and both accounts once before running it, and the trading mode first; live mode moves real money. github.com

  • Preflight upgrades the CLI and reads your credential setup

    SKILL.md tells the agent to follow the shared preflight.md before any command. It runs `okx upgrade`, which installs newer @okx_ai/okx-trade-mcp and @okx_ai/okx-trade-cli packages from npm when it finds one (checked at most every 12 hours, writing ~/.okx/last_check), then `okx config show --json` and `okx auth status --json`, which list your API-key profiles and OAuth state. github.com

  • Credentials live outside the chat

    SKILL.md tells the agent to never accept credentials in chat and to point you to okx config init instead; your API key or OAuth session sits in the okx CLI's own storage, not in this skill. github.com

Security advisories

No published security advisories as of Nov 2, 2026.

Technical details
Turning on read-onlyNo read-only switch for this skill, though most of its commands are read-only by nature; only transfer and set-position-mode write.
Talks toOKX account endpoints, through the okx CLI, using your API key or OAuth session
Sign-in and keysThe okx CLI stores an API key in ~/.okx/config.toml, or an OAuth session in its own auth-binary state, set up by okx config init or the okx-cex-auth skill.
Scopes
  • Reads account balance, positions, P&L, fees and bills from your OKX account

  • Can transfer funds between your trading and funding accounts, and to or from a sub-account

  • Can switch position mode

Questions

What does the okx-cex-portfolio skill do?

It makes Claude read your OKX account balance, positions, P&L, fees and bills, and run the two write actions this skill covers: fund transfers and position-mode switching.

How do I install it?

Use the install box at the top of this page. Install the okx CLI first, then add the skill, then set up credentials with okx config init or the okx-cex-auth skill.

Does it need an OKX account?

Yes. SKILL.md says this skill requires API credentials, either an API key in ~/.okx/config.toml or an OAuth login.

Can it place trades?

No. SKILL.md routes order placement to the sibling okx-cex-trade skill; this one covers balances and account actions only.

Can it move my money?

Yes, with the transfer command: between your funding and trading accounts, and, through its transferType and sub-account options, to or from a sub-account. SKILL.md asks the agent to confirm the currency, amount and both accounts once before running it, and to settle the live or demo mode first. It never accepts credentials in chat.

Is it safe?

It can transfer funds and change position mode on your OKX account, using credentials you set up yourself outside the chat. SKILL.md notes that switching position mode may affect open positions. Demo mode lets you test commands with simulated funds first. The shared preflight also runs okx upgrade and lists your credential profiles (see the safety box).

What is the difference between live and demo mode?

Live mode uses real money and is irreversible. Demo mode is simulated with no real funds. SKILL.md requires you to pick one before any authenticated command and appends the mode to every response.

Information

updated Nov 2, 2026

Folder
skills/okx-cex-portfolio

okx/agent-skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 3
  1. okx-cex-portfolio SKILL.md · github.com
  2. okx/agent-skills README · github.com
  3. OKX CLI preflight · github.com

Updated Nov 2, 2026.