okx-trading

Implement and maintain the OKX broker/provider integration for this workspace using okx-api SDK best practices, including auth/signing, spot/margin/futures/options trading, market/account endpoints, rate limiting, websocket subscriptions, and OKX error handling. Use when adding or changing any code under src/providers/okx or when an LLM needs canonical SDK usage patterns derived from .trae/okx-api-llm.txt.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "okx-trading" with this command: npx skills add jasonviipers/okx-trading-skill/jasonviipers-okx-trading-skill-okx-trading

OKX Provider Broker Skill

Use this workflow when editing src/providers/okx/*.

1. Load only needed references

  • For SDK usage patterns and method names, read references/okx-sdk-usage.md.
  • For error-to-action mapping, read references/okx-error-map.md.
  • For full source context, consult .trae/okx-api-llm.txt only for missing details.

2. Keep architecture compatibility

  • Preserve compatibility with src/providers/types.ts (BrokerProvider, MarketDataProvider, OptionsProvider).
  • Put OKX-specific expanded APIs behind OKX provider interfaces (for example OkxTradingProvider) while keeping generic provider methods working.
  • Ensure src/providers/broker-factory.ts can return OKX providers without adapter breakage.

3. Enforce auth and signing rules

  • Require all three credentials: API key, secret, passphrase.
  • Use OKX signing prehash: timestamp + UPPERCASE_METHOD + requestPathWithQuery + rawBody.
  • Use HMAC SHA256 base64 signing for both REST and private websocket auth via customSignMessageFn.
  • Pass demoTrading: true for simulated trading.

4. Trading and market coverage minimums

  • Trading: spot, margin, swap/futures, options order placement + cancel/query + list.
  • Account: balances, positions, bills/transactions, fills.
  • Market data: ticker(s), order book, trades, candles, instruments.
  • Websocket: ticker, orderbook, trades, candles, account/orders/positions subscriptions.

5. Error and rate-limit behavior

  • Parse and map OKX code + msg errors into internal error categories.
  • Handle known auth/order/risk/rate-limit codes explicitly.
  • Apply request throttling + retry with exponential backoff and jitter for retryable failures.
  • Avoid retrying invalid input/auth failures.

6. Documentation requirements for code changes

  • Update src/providers/okx/README.md with examples that match current method names.
  • Include one example each for: spot order, futures order, option order, account history, websocket subscription.
  • Keep examples SDK-realistic and aligned with references/okx-sdk-usage.md.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Web3

revolut-trading

No summary provided by upstream source.

Repository SourceNeeds Review
Coding

openclaw-version-monitor

监控 OpenClaw GitHub 版本更新,获取最新版本发布说明,翻译成中文, 并推送到 Telegram 和 Feishu。用于:(1) 定时检查版本更新 (2) 推送版本更新通知 (3) 生成中文版发布说明

Archived SourceRecently Updated
Coding

ask-claude

Delegate a task to Claude Code CLI and immediately report the result back in chat. Supports persistent sessions with full context memory. Safe execution: no data exfiltration, no external calls, file operations confined to workspace. Use when the user asks to run Claude, delegate a coding task, continue a previous Claude session, or any task benefiting from Claude Code's tools (file editing, code analysis, bash, etc.).

Archived SourceRecently Updated
Coding

ai-dating

This skill enables dating and matchmaking workflows. Use it when a user asks to make friends, find a partner, run matchmaking, or provide dating preferences/profile updates. The skill should execute `dating-cli` commands to complete profile setup, task creation/update, match checking, contact reveal, and review.

Archived SourceRecently Updated