
Okx Cex Auth
Handles OAuth 2.0 device flow authentication for the OKX CLI across three regional sites (global, EEA, US). The skill enforces a strict pre-flight gate that's worth noting: it will always ask you to pick a site before login, even if upstream context seems to imply one, because the auth binary emits a placeholder default that doesn't reflect actual user choice. It also checks for existing API key configurations first, since the CLI prefers API keys over OAuth and won't fall back. The documentation is unusually detailed about failure modes, which suggests this flow has sharp edges around session state and site persistence. Use this before any trading, portfolio, or earn operations on your first run.
- skills.sh installs
- 6.1K
- GitHub stars
- 200
- last updated
- Aug 21, 2026
Install
$ npx -y skills add okx/agent-skills --skill okx-cex-auth --agent claude-codeInstalls into .claude/skills of the current project.
Files
OKX CEX Authentication
OAuth 2.0 device flow authentication for OKX CLI. Guides first-time setup, re-authentication after session expiry, and logout.
Supported Sites
| Site | Region | URL |
|---|---|---|
global | Global | www.okx.com |
eea | EEA | my.okx.com |
us | US | app.okx.com |
tr | TR | tr.okx.com |
Site is a separate dimension from auth method. Both API-key and OAuth paths require a site. Once selected, a site is persisted:
- API-key users:
profile.sitein~/.okx/config.toml(written byokx config init). - OAuth users: saved inside the
okx-authbinary state the first timeokx auth login --site <X>succeeds, and returned byokx auth status --jsonas thesitefield.
There is no okx config set-site command — site cannot be persisted independently of an auth attempt. For OAuth flows, the agent must remember the user's choice within the conversation and pass --site <X> on okx auth login.
Prerequisites
Install okx CLI if not already installed:
npm install -g @okx_ai/okx-trade-cli
Step 0: Pre-flight Check (MANDATORY)
Sponsors
Details
- Repository
- github.com/okx/agent-skills
- Categories
- Backend & APIs, AI & Agent Building, Debugging, CLI & Terminal, Finance & Trading
- First seen
- May 16, 2026