Agent skill · marketing growth · okx

okx-cex-portfolio

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).

Why this skill is useful

Adds specific commands and workflows for managing account balances and positions on the OKX exchange that the AI wouldn't reliably generate on its own.

What it needs

Requires npm, okx installed locally. Requires okx account access. About 12k tokens when loaded. Last updated 2026-07-22. 160 stars on the source repository.

What this skill does

OKX CEX Portfolio & Account CLI Account balance, positions, P&L, bills, fees, and fund transfers on OKX exchange. Requires API credentials. Preflight Before running any command, follow ../shared/preflight.md. Use metadata.version from this file's frontmatter as the reference for Step 2. Prerequisites 1. Install okx CLI: 2. Configure credentials: 3. Test with demo mode (simulated trading, no real funds): Security: NEVER accept credentials in chat. Guide users to okx config init for setup. Credential & Profile Check Run this check before any authenticated command. The auth method is detected during preflight Step 2 and remembered for the session. Step A — Verify credentials Check both sources (see preflight Step 2 for the decision table). okx auth status --json alone is insufficient — its apiKey field is always false and does NOT reflect the TOML config. Branch in this order — first match wins: config show has any profile with a non-empty apikey — API Key mode. Proceed to Step B. No API-key profile AND auth status returns "status": "loggedin" — OAuth mode. Proceed to Step B. No API-key profile AND auth status returns "status": "pending" — login in progress, wait. No API-key profile AND auth status returns "status": "notloggedin" — stop all operations, load okx-cex-auth skill and follow login steps, wait for completion. Step B — Confirm trading mode Resolution rules: 1. Current message intent is clear (e.g. "real" / "实盘" / "live" → live; "test" / "模拟" / "demo" → demo) → use it and inform the user 2. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills okx/okx-cex-portfolio

View the source on GitHub

Browse the @skills marketplace