okx-cex-portfolio

Query OKX account balances, positions, P&L, bills, fees, and execute fund transfers via CLI.

Updated Aug 18, 2026
One-click install
npx skills add https://github.com/wandreandrade2018-maker/claude-config --skill okx-cex-portfolio-wandreandrade2018-maker
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: okx-cex-portfolio
Source: https://github.com/wandreandrade2018-maker/claude-config/tree/main/.agents/skills/okx-cex-portfolio
Command: npx skills add https://github.com/wandreandrade2018-maker/claude-config --skill okx-cex-portfolio-wandreandrade2018-maker

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @okx_ai/okx-trade-cli.

What problem does it solve? Checking balances, open positions, realized P&L, and moving funds between OKX sub-accounts normally requires navigating the exchange UI or writing raw API calls; this Skill exposes all of it through simple natural-language requests backed by the okx CLI. ## Core Features & Use Cases - Balance & Asset Overview: Query trading account equity, funding account balances, and total asset valuation across trading, funding, and earn accounts in USDT or BTC. - Positions & P&L Tracking: List open contract positions with unrealized PnL, closed position history with realized PnL, and account bills for full transaction history. - Fund Management: Transfer funds between funding (6) and trading (18) accounts, check max order size, max withdrawable amounts, fee tiers, and switch position modes. - Use Case: A user asks "how much USDT do I have in total?" — the Skill runs okx account asset-balance --valuation, shows the breakdown across accounts, and offers to transfer idle funding-account USDT into the trading account. ## Quick Start Ask the assistant to show your total OKX asset valuation and current open positions, and it will run the appropriate okx account commands after confirming live or demo mode.

Frequently Asked Questions about okx-cex-portfolio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I check my OKX account balance from the command line?

Run `okx account balance` for trading account equity or `okx account asset-balance` for funding account balances. Add `--valuation` to asset-balance to see total assets across trading, funding, and earn accounts denominated in USDT.

How do I transfer USDT from funding to trading account on OKX?

Use `okx account transfer --ccy USDT --amt <amount> --from 6 --to 18`, where 6 is the funding account and 18 is the unified trading account. Verify the source balance first with `okx account asset-balance USDT`.

Does the okx CLI support demo trading mode?

Yes. OAuth users add `--demo` to any command for simulated trading, while API key users select a demo profile with `--profile <demo-profile>`. Demo mode uses simulated funds, not real money.

Why does my OKX balance show zero even though I deposited funds?

The balance command filters out currencies with zero balance, and funds may sit in the funding account rather than the trading account. Run `okx account asset-balance --valuation` to see the breakdown across all sub-accounts.

What credentials does the okx CLI need for account commands?

It requires either an OAuth session created via `okx config init` or an API key stored in `~/.okx/config.toml`. Credential status is verified with `okx config show --json` and `okx auth status --json` before any authenticated command.