Okx account

From Starchild-ai-agent/official-skills · View interactive version

Okx account is an AI agent skill from the GitHub repository Starchild-ai-agent/official-skills. Read-only OKX tracking: unified-account equity, perp positions, orders, fills, bills. Use when monitoring OKX without trading (e.g. account equity, current PnL, recent fills, withdrawal history, margin level).

How to use this skill

Skill file

OKX Account (Read-Only)

Read-only OKX account tracker built on the official python-okx library.

Use it for account tracking, daily/weekly reports, risk alerts, and cashflow attribution.

How to Get an OKX API Key (Read-Only)

  1. Sign in at okx.com, top-right avatar → API
  1. Create V5 API Key → complete 2FA verification
  2. Fill the form:
  1. Submit → immediately copy and save all three values: API Key / Secret Key / Passphrase (Secret is shown only once)
  2. Set them into this skill's environment variables

Reference: OKX official tutorial

Prerequisites

1) API key

In OKX API Management create a key with Read only. OKX requires three credentials: api_key / secret / passphrase (the password you set when creating the key — not the login password).

2) Environment variables

OKX_RO_API_KEY=...
OKX_RO_SECRET=...
OKX_RO_PASSPHRASE=...

3) Geo restriction (required)

OKX geo-blocks server IPs. Scripts default to the SC internal HK proxy:

HK_PROXY = "http://hk:x@sc-vpn.internal:8080"

Do not set a global HTTP_PROXY.

Scripts

python3 skills/okx-account/scripts/okx_account.py <action> [options]
python3 skills/okx-account/scripts/account_scenarios.py <scenario> [options]

Actions

Scenarios

Common usage

python3 skills/okx-account/scripts/okx_account.py summary
python3 skills/okx-account/scripts/account_scenarios.py portfolio_snapshot
python3 skills/okx-account/scripts/account_scenarios.py perp_risk --loss-threshold 5000
python3 skills/okx-account/scripts/account_scenarios.py cashflow --limit 100
python3 skills/okx-account/scripts/account_scenarios.py trading_activity --inst-types SPOT,SWAP

Notes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.