New advertisers: 50% off your first month with code FIRSTMONTHSee slots
okx avatar

Okx Cex Auth

Authenticates OKX CLI users via OAuth device flow with site selection and binary management.

skills.sh installs
6.2K
GitHub stars
201
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers first-time setup, re-authentication after session expiry, logout, and login status checks for the OKX CLI
  • Includes a pre-flight check that verifies site selection, API-key presence, and OAuth state before any login attempt
  • Enforces a required site menu for OKX regions (Global, EEA, US, TR) so the chosen site is never silently defaulted
  • Designed for agents that need to authenticate before using okx-cex-trade, okx-cex-portfolio, okx-cex-earn, or okx-cex-bot

Install

$ npx -y skills add okx/agent-skills --skill okx-cex-auth -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

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)

Details

Repository
github.com/okx/agent-skills
Categories
Finance & Trading, Web3 & Crypto, CLI & Terminal
First seen
May 16, 2026

More from okx/agent-skills

All 10

Similar to Okx Cex Auth

More Finance & Trading