okx avatar

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-code

Installs 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

SiteRegionURL
globalGlobalwww.okx.com
eeaEEAmy.okx.com
usUSapp.okx.com
trTRtr.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.site in ~/.okx/config.toml (written by okx config init).
  • OAuth users: saved inside the okx-auth binary state the first time okx auth login --site <X> succeeds, and returned by okx auth status --json as the site field.

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

More from okx/agent-skills

All 11
1affaan-m avatardatabase-migrationsaffaan-m/everything-claude-codedatabase migrations5.9Kskills.sh installs
2recoupable avatarrecoup-platform-api-accessrecoupable/skillsCall the Recoup API and external connectors directly — fetch any platform resource (artists, socials, organizations, research, documents) and run connector acti5.3Kskills.sh installs
3firebase avatarfirebase-local-env-setupfirebase/agent-skillsBare minimum INITIAL setup for getting started with Firebase (Node.js, CLI installation, first-time login). Use ONLY for first-time setup. For updating, trouble5.1Kskills.sh installs
4yaklang avatarssrf-server-side-request-forgeryyaklang/hack-skillsSSRF playbook. Use when the server fetches URLs, resolves hostnames, imports remote content, or can be driven toward internal networks, cloud metadata, or secon4.1Kskills.sh installs
5yaklang avatarapi-recon-and-docsyaklang/hack-skillsAPI reconnaissance and documentation review playbook. Use when discovering endpoints, schemas, versions, OpenAPI specs, hidden docs, and surface area for API te4Kskills.sh installs
6yaklang avatargraphql-and-hidden-parametersyaklang/hack-skillsGraphQL and hidden parameter testing playbook. Use when exploring introspection, batching, undocumented fields, hidden parameters, schema abuse, and GraphQL aut3.8Kskills.sh installs