Okx Cex Market
dex-original/okx-agent-trade-kit
A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…
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'…
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install okx/agent-skills okx-cex-portfolio --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/okx-cex-portfolio .claude/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .claude/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolioType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install okx/agent-skills okx-cex-portfolio --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/okx-cex-portfolio .agents/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .agents/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install okx/agent-skills okx-cex-portfolio --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/okx-cex-portfolio .cursor/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .cursor/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/okx/agent-skills.git --path skills/okx-cex-portfolio--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install okx/agent-skills okx-cex-portfolio --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/okx-cex-portfolio .gemini/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .gemini/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install okx/agent-skills okx-cex-portfolioInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/okx-cex-portfolio .github/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .github/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add okx/agent-skills --skill okx-cex-portfolio -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install okx/agent-skills okx-cex-portfolio --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/okx/agent-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/okx-cex-portfolio .opencode/skills/okx-cex-portfolio && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "okx-cex-portfolio" agent skill from https://github.com/okx/agent-skills/tree/github-main/skills/okx-cex-portfolio into .opencode/skills/okx-cex-portfolio/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "okx-cex-portfolio", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
okx-cex-portfolioThis 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'…
Okx Cex Portfolio is an agent skill from okx/agent-skills. 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…
Its SKILL.md is about 6.4k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Business, Finance & HR, covering Trading and backtesting. It works with OKX. The repository describes itself as: Plug-and-play AI agent skills for OKX — letting any LLM agent trade, manage portfolios, query live market data, and run grid/DCA bots through a single okx CLI, no API wiring… The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 9c180cc. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
npmFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use npm, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Okx Cex Portfolio loads about 6.4k tokens when it runs. Until then it costs about 219 tokens; SKILL.md has 2,253 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from okx/agent-skills at commit 9c180cc, republished under its MIT licence (© okx). 2,253 words, ~6,411 tokens.
.claude/skills/okx-cex-portfolio/SKILL.md (or your agent's skills folder).Account balance, positions, P&L, bills, fees, and fund transfers on OKX exchange. Requires API credentials.
Before running any command, follow ../_shared/preflight.md.
Use metadata.version from this file's frontmatter as the reference for Step 2.
okx CLI:npm install -g @okx_ai/okx-trade-cliokx config init # select site -> follow browser OAuth flowokx --demo account balanceSecurity: NEVER accept credentials in chat. Guide users to
okx config initfor setup.
Run this check before any authenticated command. The auth method is detected during preflight Step 2 and remembered for the session.
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.
okx config show --json # authoritative for API-key presence
okx auth status --json # authoritative for OAuth session stateBranch in this order — first match wins:
config show has any profile with a non-empty api_key — API Key mode. Proceed to Step B.auth status returns "status": "logged_in" — OAuth mode. Proceed to Step B.auth status returns "status": "pending" — login in progress, wait.auth status returns "status": "not_logged_in" — stop all operations, load okx-cex-auth skill and follow login steps, wait for completion.Resolution rules:
"Live (实盘) or Demo (模拟盘)?" — wait for answer before proceedingHow to apply the mode depends on auth method (detected in Step A):
| Auth method | Live (实盘) | Demo (模拟盘) |
|---|---|---|
| API Key | --profile <live-profile> | --profile <demo-profile> |
| OAuth | (no flag needed, live is default) | --demo |
okx config show --json to discover available profile names and their demo settings. Use --profile <name> to select the correct one.--demo for simulated trading. Do not use --profile to switch modes.Authentication error (error contains "401", "Session expired", or "Run okx auth login first"):
okx-cex-auth skill and follow the re-authentication steps| Mode | Funds | API Key param | OAuth param |
|---|---|---|---|
| 实盘 (live) | Real funds | --profile <live-profile> | (default, no flag) |
| 模拟盘 (demo) | Simulated funds | --profile <demo-profile> | --demo |
# API Key user
okx --profile okx-prod account balance # 实盘
okx --profile okx-demo account balance # 模拟盘
# OAuth user
okx account balance # 实盘 (default)
okx --demo account balance # 模拟盘Rules:
transfer, set-position-mode): mode must be confirmed before execution (see "Credential & Profile Check" Step B); transfer especially — wrong mode means wrong account[mode: live] or [mode: demo]okx-cex-marketokx-cex-portfolio (this skill)okx-cex-tradeokx-cex-bot# One-shot full asset snapshot (recommended first command)
okx account balance-all
okx account balance-all --no-valuation
okx account balance-all --valuationCcy BTC
# Trading account balance (all currencies with balance > 0)
okx account balance
# Check USDT balance only
okx account balance USDT
# Funding account balance
okx account asset-balance
# All open positions, every product
okx account positions
# Positions for one product only — always narrow when the user named a product
okx account positions --instType SWAP # SWAP | FUTURES | OPTION | MARGIN | EVENTS
# Closed position history with realized PnL
okx account positions-history
# Recent account bills (last 100)
okx account bills
# My trading fee tier
okx account fees --instType SPOT
# Transfer 100 USDT from funding (6) to trading (18)
okx account transfer --ccy USDT --amt 100 --from 6 --to 18| # | Command | Type | Description |
|---|---|---|---|
| 1 | okx account balance-all [ccy] | READ | One-shot snapshot: trading + funding (+ valuation) in one call |
| 2 | okx account balance [ccy] | READ | Trading account equity, available, frozen |
| 3a | okx account asset-balance [ccy] | READ | Funding account balance (per-currency list) |
| 3b | okx account asset-balance [ccy] --valuation [--valuationCcy <ccy>] | READ | Same + total asset valuation across trading/funding/earn; denomination defaults to USDT, override with --valuationCcy BTC |
| 4 | okx account positions [--instType <type>] [--instId <id>] | READ | Open contract/swap positions. When the user names a product ("my swap positions", "futures positions", "option positions"), pass --instType <type> (SWAP | FUTURES | OPTION | MARGIN | EVENTS) — or use that product's own command (okx swap positions, okx futures positions, okx option positions). Only omit the filter when the user genuinely wants everything: an unfiltered list is larger and leaves the product filtering to the model, which is where mistakes happen |
| 5 | okx account positions-history | READ | Closed positions + realized PnL |
| 6 | okx account bills | READ | Account ledger (deposits, withdrawals, trades) |
| 7 | okx account fees --instType <type> | READ | My trading fee tier (maker/taker) |
| 8 | okx account config | READ | Account level, position mode, UID |
| 9 | okx account max-size --instId <id> --tdMode <mode> | READ | Max buy/sell size at current price |
| 10 | okx account max-avail-size --instId <id> --tdMode <mode> | READ | Available size for next order |
| 11 | okx account max-withdrawal [ccy] | READ | Max withdrawable per currency |
| # | Command | Type | Description |
|---|---|---|---|
| 12 | okx account set-position-mode <mode> | WRITE | Switch net/hedge position mode |
| 13 | okx account transfer | WRITE | Transfer funds between accounts |
User: "I want to buy 0.1 BTC — do I have enough USDT?"
1. okx-cex-portfolio okx account balance-all → one-shot trading + funding + valuation snapshot
→ check trading.details (available in trading account)
→ if trading balance < needed: check funding.details — may need to transfer
2. okx-cex-market okx market ticker BTC-USDT → check current price
↓ user approves
3. okx-cex-trade okx spot place --instId BTC-USDT --side buy --ordType market --sz 0.1User: "I want to start a BTC grid bot with 1000 USDT"
1. okx-cex-portfolio okx account balance-all → one-shot trading + funding + valuation snapshot
→ check trading.details ≥ 1000 (funds must be in trading account for grid bot)
→ if funding.details has the USDT instead: use account transfer first
2. okx-cex-market okx market candles BTC-USDT --bar 4H --limit 50 → determine price range
↓ user approves
3. okx-cex-bot okx bot grid create --instId BTC-USDT --algoOrdType grid \
--minPx 90000 --maxPx 100000 --gridNum 10 --quoteSz 1000User: "What's my total balance?" / "总资产多少?"
1. okx-cex-portfolio okx account balance-all → returns {trading, funding, valuation, meta}
→ valuation.totalBal = total net worth in USDT
→ trading.totalEq = trading account equity
→ funding.details = per-currency funding balances
→ meta.partialFailure = true if any section failed (still returns available data)User: "Show me my current positions and how they're performing"
1. okx-cex-portfolio okx account positions → open positions with UPL
2. okx-cex-portfolio okx account positions-history → recently closed positions
3. okx-cex-market okx market ticker BTC-USDT-SWAP → check current price vs entryUser: "Move 500 USDT from my funding account to trade BTC"
1. okx-cex-portfolio okx account asset-balance USDT → confirm funding balance ≥ 500
↓ user approves
2. okx-cex-portfolio okx account transfer --ccy USDT --amt 500 --from 6 --to 18
3. okx-cex-portfolio okx account balance USDT → confirm trading balance updated
↓ ready to trade
4. okx-cex-trade okx spot place ...User: "How much BTC can I buy with cross margin?"
1. okx-cex-portfolio okx account balance → total equity
2. okx-cex-portfolio okx account max-size --instId BTC-USDT-SWAP --tdMode cross → max buy/sell size
3. okx-cex-market okx market ticker BTC-USDT-SWAP → current price referenceBefore any authenticated command: see Credential & Profile Check. Determine auth method and trading mode before executing.
After every command result: append [mode: live] or [mode: demo] to the response
okx account balance-all (trading + funding + valuation in one call; recommended for "总资产 / net worth / all balances")okx account balance (trading equity only) or okx account asset-balance (funding balances) or okx account asset-balance --valuation (total across all accounts in USDT)okx account positionsokx account positions-historyokx account billsokx account feesokx account configokx account max-size or okx account max-avail-sizeokx account max-withdrawalokx account transferokx account set-position-modeRead commands (1–10): run immediately, no confirmation needed.
ccy filter: use currency symbol like USDT, BTC, ETH--instType for fees/positions: SPOT, SWAP, FUTURES, OPTION--archive for bills: access older records beyond the default window--tdMode for max-size: cash (spot), cross, or isolatedWrite commands (11–12): confirm once before executing.
set-position-mode: confirm mode (net = one-directional, long_short_mode = hedge mode); switching may affect open positionstransfer: confirm --ccy, --amt, --from, --to (account types: 6=funding, 18=trading); verify source balance firstset-position-mode: run okx account config to confirm posMode updatedtransfer: run okx account balance and okx account asset-balance to confirm balances updatedokx account balance-all [ccy] [--accounts trading,funding] [--no-valuation] [--no-aggregate] [--valuationCcy <ccy>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
ccy | No | - | Filter by currency (comma-separated). Applied to trading + funding queries only. |
--accounts | No | trading,funding | Comma-separated accounts to query |
--no-valuation | No | - | Skip cross-account valuation (default: valuation included) |
--no-aggregate | No | - | Force the direct parallel path instead of the server aggregate. Use when you need the per-account valuation breakdown, or a non-USD --valuationCcy (the aggregate path denominates valuation in USD). |
--valuationCcy | No | USDT | Denomination currency for valuation |
This command calls a server-side aggregate endpoint first and automatically falls back to direct parallel queries when it is unavailable; the output contract is identical either way.
Returns { trading, funding, valuation, meta }. Each section has available: boolean:
trading: totalEq, adjEq, details[] (per-currency)funding: details[] (per-currency ccy, bal, availBal, frozenBal)valuation: valuationCcy, totalBal, details[] (per-account breakdown is only populated on the parallel path; use --no-aggregate to force it)meta: requestedAt (ISO 8601), elapsedMs, partialFailure, source (aggregate or fallback), siteWhen --json is NOT set: prints [PARTIAL] banner if meta.partialFailure=true, followed by three sections (Trading / Funding / Valuation), then a [source: ...] footer showing which path served the data. Failed sections show [ERROR: <msg>].
okx account balance [ccy] [--json]| Param | Required | Default | Description |
|---|---|---|---|
ccy | No | - | Filter to a single currency (e.g., USDT) |
Returns table: currency, equity, available, frozen. Only shows currencies with balance > 0.
okx account asset-balance [ccy] [--valuation] [--valuationCcy <ccy>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
ccy | No | - | Filter to a specific currency (e.g., USDT); does not affect valuation denomination |
--valuation | No | false | Also show total asset valuation across all account types (trading/funding/earn) |
--valuationCcy | No | USDT | Currency in which to denominate the total asset valuation (e.g., USDT, BTC). Only used when --valuation is set. |
Returns: ccy, bal, availBal, frozenBal. Only shows currencies with balance > 0.
With --valuation: additionally prints a valuation summary table with totalBal and per-account-type breakdown (classic/earn/funding/trading). The numbers are denominated in --valuationCcy (default USDT).
Important: ccy (balance filter) and --valuationCcy (valuation denomination) are independent parameters — ccy=BTC filters the balance list to BTC rows but does NOT change the valuation currency; set --valuationCcy BTC explicitly for BTC-denominated totals.
okx account positions [--instType <type>] [--instId <id>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
--instType | No | - | Filter: SWAP, FUTURES, OPTION |
--instId | No | - | Filter to specific instrument |
Returns: instId, instType, side (posSide), pos, avgPx, upl (unrealized PnL), lever. Only shows positions with size ≠ 0.
okx account positions-history [--instType <type>] [--instId <id>] [--limit <n>] [--json]Returns: instId, direction, openAvgPx, closeAvgPx, realizedPnl, uTime.
okx account bills [--archive] [--instType <type>] [--ccy <ccy>] [--limit <n>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
--archive | No | false | Access older records (archive endpoint) |
--instType | No | - | Filter by instrument type |
--ccy | No | - | Filter by currency |
--limit | No | 100 | Number of records |
Returns: billId, instId, type, ccy, balChg, bal, ts.
okx account fees --instType <type> [--instId <id>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
--instType | Yes | - | SPOT, SWAP, FUTURES, OPTION |
--instId | No | - | Specific instrument (optional) |
Returns: level, maker, taker, makerU, takerU, ts.
okx account config [--json]Returns: uid, acctLv (account level), posMode (net/long_short_mode), autoLoan, greeksType, level, levelTmp.
okx account max-size --instId <id> --tdMode <mode> [--px <price>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
--instId | Yes | - | Instrument ID |
--tdMode | Yes | - | cash (spot), cross, or isolated |
--px | No | - | Reference price (uses mark price if omitted) |
Returns: instId, maxBuy, maxSell.
okx account max-avail-size --instId <id> --tdMode <mode> [--json]Returns: instId, availBuy, availSell — the immediately available size for the next order.
okx account max-withdrawal [ccy] [--json]Returns table: ccy, maxWd, maxWdEx (with borrowing). Shows all currencies if no filter.
okx account set-position-mode <net|long_short_mode> [--json]| Value | Behavior |
|---|---|
net | One-directional (default) — long and short net out |
long_short_mode | Hedge mode — long and short can coexist |
Warning: Switching modes when positions are open may cause unexpected behavior. Check
okx account positionsfirst.
okx account transfer --ccy <ccy> --amt <n> --from <acctType> --to <acctType> \
[--transferType <type>] [--subAcct <name>] [--json]| Param | Required | Default | Description |
|---|---|---|---|
--ccy | Yes | - | Currency to transfer (e.g., USDT) |
--amt | Yes | - | Amount to transfer |
--from | Yes | - | Source account type: 6=funding, 18=trading |
--to | Yes | - | Destination account type: 6=funding, 18=trading |
--transferType | No | 0 | 0=within account, 1=to sub-account, 2=from sub-account |
--subAcct | No | - | Sub-account name (required for sub-account transfers) |
Returns: transId, ccy, amt.
| Tool | Description |
|---|---|
account_get_balance_all | One-shot snapshot of trading + funding (+ valuation), served by a server-side aggregate endpoint with automatic fallback to parallel queries. Use showValuation=true (default) to include cross-account totals; valuationCcy='USDT' by default. Set preferParallel=true to force the parallel path (per-account valuation breakdown / non-USD valuation). Prefer over calling account_get_balance + account_get_asset_balance separately. |
account_get_balance | Trading account balance |
account_get_asset_balance | Funding account balance. Use showValuation=true to include total asset valuation across trading/funding/earn accounts. Use valuationCcy (default "USDT") to set the denomination for the valuation total — e.g. valuationCcy="BTC" returns the total in BTC. |
account_get_positions | Open positions |
account_get_positions_history | Closed position history |
account_get_bills | Account bills (recent) |
account_get_bills_archive | Account bills (archive) |
account_get_trade_fee | Trading fee tier |
account_get_config | Account configuration |
account_get_max_size | Max order size |
account_get_max_avail_size | Max available size |
account_get_max_withdrawal | Max withdrawable |
account_set_position_mode | Set position mode |
account_transfer | Transfer between accounts |
"How much USDT do I have?"
okx account balance USDT
# → currency: USDT | equity: 5000.00 | available: 4500.00 | frozen: 500.00"Show all my open positions"
okx account positions
# → table: instId, instType, side, pos, avgPx, upl, lever"What's my trading history and realized PnL?"
okx account positions-history
# → table: instId, direction, openAvgPx, closeAvgPx, realizedPnl, uTime"Show my recent account activity"
okx account bills --limit 20
# → table: billId, instId, type, ccy, balChg, bal, ts"What are my trading fees for SWAP?"
okx account fees --instType SWAP
# → level: VIP1 | maker: -0.0001 | taker: 0.0005"How much BTC can I buy in cross margin?"
okx account max-size --instId BTC-USDT-SWAP --tdMode cross
# → instId: BTC-USDT-SWAP | maxBuy: 12.5 | maxSell: 12.5"Transfer 200 USDT from funding to trading"
okx account transfer --ccy USDT --amt 200 --from 6 --to 18
# → Transfer: TXN123456 (USDT 200)"Check my account config"
okx account config
# → uid: 123456789 | acctLv: 2 | posMode: net | autoLoan: falseOKX splits assets across multiple sub-accounts. The --valuation breakdown maps directly:
| Account type | details key | Used for | Check with |
|---|---|---|---|
| Trading (unified) | trading | Spot, margin, swap, futures, options | okx account balance or details.trading in --valuation |
| Funding | funding | Deposits/withdrawals, idle funds | okx account asset-balance or details.funding in --valuation |
| Earn | earn | Simple earn, staking, savings | details.earn in --valuation |
| Classic | classic | Classic account (legacy, less common) | details.classic in --valuation |
Typical flow when user says "I have X USDT but can't trade":
okx account asset-balance --valuation → look at each details.* fielddetails.funding is large and details.trading is small → the funds are in the funding accountokx account transfer --ccy USDT --amt <n> --from 6 --to 18okx account balance USDT → equity should now reflect the transferred amountaccount balance)net if you have both long and short positions on the same instrument6=funding account, 18=trading account; other values exist for sub-account flowsmax-size is the theoretical maximum; max-avail-size accounts for existing orders and reserved marginokx --demo account balance (OAuth) or okx --profile <demo-profile> account balance (API Key) shows simulated balances, not real funds~/.okx/config.toml)[mode: live] or [mode: demo] tag for audit reference--json returns the raw OKX API v5 response by default. Add --env to wrap the output as {"env": "<live|demo>", "profile": "<name>", "data": <response>}6=Funding Account (deposits/withdrawals), 18=Unified Trading Account (spot + derivatives)© okx, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in skills/okx-cex-portfolio of okx/agent-skills.
Open the folder on GitHubat commit 9c180cc
We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 2 other GitHub owners. This page covers the copy in okx/agent-skills, which our catalogue first saw on October 7, 2026.
Okx Cex Portfolio next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Okx Cex Portfolio this skillokx/agent-skills | 187 | 2 repos | ~6.4k | Automated safety check: Pass | MIT | |
| Okx Cex Marketdex-original/okx-agent-trade-kit | 110 | 1 repos | ~2.7k | Automated safety check: Pass | MIT | |
| Fintoolsecond-state/fintool | 316 | — | ~5.9k | Automated safety check: Pass | None | |
| Okx Cex Smartmoneydex-original/okx-agent-trade-kit | 110 | 1 repos | ~1.4k | Automated safety check: Pass | MIT | |
| Okx Sentiment Trackerdex-original/okx-agent-trade-kit | 110 | 1 repos | ~3.8k | Automated safety check: Pass | MIT | |
| Okx Growth Competitioninternet-court/internet-court-skill | 6.6k | 2 repos | ~3k | Automated safety check: Pass | MIT |
dex-original/okx-agent-trade-kit
A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…
second-state/fintool
Financial trading CLIs — spot and perp trading on Hyperliquid, Binance, Coinbase, OKX.
dex-original/okx-agent-trade-kit
Smart Money analytics on OKX: leaderboard traders, position tracking, trade records, aggregated consensus signals, and signal history.
dex-original/okx-agent-trade-kit
A skill your agent uses when the user asks about: 'any crypto news', 'latest news', 'market update', 'daily briefing', 'BTC news', 'ETH news', 'news on SOL', 'search SEC ETF', 'regulation news'…
internet-court/internet-court-skill
List OKX Agentic Wallet exclusive trading competitions, register users for contests, track participation and leaderboard rankings, and claim won rewards.
internet-court/internet-court-skill
Register for the OKX.AI Trading Hackathon or explain its entry requirements and eligibility.
okx/agent-skills
Manages OKX Simple Earn (flexible savings/lending), Flash Earn, On-chain Earn (staking/DeFi), Dual Investment (DCD/双币赢), and AutoEarn (自动赚币) via the okx CLI.
okx/agent-skills
Automatically monitors OKX Flash Earn, Fixed Earn and Flexible Earn opportunities, sends push notifications, and guides subscription.
okx/agent-skills
A skill your agent uses when the user wants to 'login/log in/sign in', 'authenticate', 'authorize', 'connect OKX account', 'set up credentials', 'first time setup', 'configure okx', '登录', '授权'…
okx/agent-skills
A skill your agent uses when the user asks for: price of any asset, ticker, order book, candles, OHLCV, funding rate, open interest, OI change scanner, market screener (top movers, high-volume…
okx/agent-skills
A skill your agent uses when the user asks to: 'find a trading skill', 'search for skills', 'install a skill', 'add a skill', 'download a skill', 'browse skill marketplace', 'what skills are…
okx/agent-skills
Smart Money analytics on OKX: leaderboard traders, position tracking, trade records, closed-position history, aggregated consensus signals, and signal history.
Works with
Categories
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'…. Okx Cex Portfolio is an agent skill from okx/agent-skills. 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'.
Okx Cex Portfolio fits situations like: asks about account balance; how much USDT do I have; my funding account; show my positions.
Run `npx skills add okx/agent-skills --skill okx-cex-portfolio -a claude-code`. Or copy the skill folder (skills/okx-cex-portfolio in okx/agent-skills) into .claude/skills/okx-cex-portfolio in your project. Claude Code loads it when a task matches its description.
Run `npx skills add okx/agent-skills --skill okx-cex-portfolio -a codex`. Or copy the skill folder (skills/okx-cex-portfolio in okx/agent-skills) into .agents/skills/okx-cex-portfolio in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add okx/agent-skills --skill okx-cex-portfolio -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/okx-cex-portfolio, .gemini/skills/okx-cex-portfolio, .github/skills/okx-cex-portfolio and .opencode/skills/okx-cex-portfolio in your project.
Going by SKILL.md and its folder, Okx Cex Portfolio needs the command-line tools its instructions call (npm). Our summary lists: Node.js.
SKILL.md contains no URLs. Its commands use npm, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Okx Cex Portfolio is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 6.4k tokens (SKILL.md is roughly 26k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Okx Cex Portfolio: Okx Cex Market (dex-original/okx-agent-trade-kit, 110 stars), Fintool (second-state/fintool, 316 stars), Okx Cex Smartmoney (dex-original/okx-agent-trade-kit, 110 stars) and Okx Sentiment Tracker (dex-original/okx-agent-trade-kit, 110 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
okx (a GitHub organization) maintains it in okx/agent-skills, which has 187 GitHub stars. The repository holds 10 skills in this directory. The repository was last updated on September 23, 2026.
Source: okx/agent-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.