Back to Skills

okx-cex-auth

Use this skill when the user wants to 'login/log in/sign in', 'authenticate', 'authorize', 'connect OKX account', 'set up credentials', 'first time setup', 'configure okx', '登录', '授权', '认证', '连接账户', '首次配置'. Also when any OKX CLI command fails with an auth error: 'Run okx auth login first', 'Session expired', 'not authenticated', 'requires_auth', '401 Unauthorized', 'token expired/not found', 'StorageNotFoundError', '会话过期', '未认证', '需要登录'. Also when the user asks about login status or the login wa

134stars21forksUpdated 6/8/2026

Security Assessment

Safe(100/100)
Security Score100/100

About okx-cex-auth

okx-cex-auth is an AI skill for guiding OKX CLI authentication workflows. It is designed to help users log in, authenticate, authorize, connect an OKX account, set up credentials, or recover from authentication failures such as expired sessions, missing tokens, unauthorized responses, or interrupted login attempts. The skill solves the problem of safely preparing an OKX CLI session before using authenticated OKX features, while avoiding incorrect site defaults during login.

The skill supports OAuth 2.0 device flow authentication for the OKX CLI and covers first-time setup, re-authentication after session expiry, logout, login status checks, and installation or management of the okx-auth binary. It recognizes supported OKX sites across Global, EEA, and US regions, and enforces a mandatory pre-flight process using okx config show --json and okx auth status --json before login. It also distinguishes between persisted site selection and placeholder defaults returned when a user is not logged in.

This skill is intended for users who need authenticated access to OKX CLI workflows, especially before using OKX trading, portfolio, earn, or bot capabilities for the first time. It is also useful for agents handling OKX CLI errors related to authentication, credential setup, session expiry, or missing auth binaries. It should not be used for market data queries, which are explicitly routed to a separate market-focused skill.

FAQ

When should this skill be used?

Use it when a user wants to log in, authenticate, authorize, connect an OKX account, configure OKX credentials, check login status, recover from an interrupted login, or resolve OKX CLI authentication errors.

Which OKX sites are supported?

The skill supports Global at www.okx.com, EEA at my.okx.com, and US at app.okx.com. The user must select the correct site when no persisted site selection is available.

What is required before using this skill?

The okx CLI must be installed. The provided installation command is npm install -g @okx_ai/okx-trade-cli.

Does this skill support market data queries?

No. The source explicitly says not to use this skill for market data queries; those should use the OKX CEX market skill instead.

Can the site be set independently with a config command?

No. The source states there is no okx config set-site command, and the site cannot be persisted independently of an authentication attempt.

Install okx-cex-auth

Download and extract the skill files to your .claude/skills/ directory.

Quick Setup:

  1. Copy the skill folder to .claude/skills/
  2. Claude will automatically detect and use the skill