Communitygithub.com

Kernel8901/ai-agent-skills-classification – OKX 거래소 연동

세계 최대 암호화폐 거래소 중 하나인 OKX와 연동하여 현물, 선물, 옵션, DeFi 거래를 지원합니다.

ai-agent-skills-classification – OKX 거래소 연동란 무엇인가요?

이 스킬은 AI 에이전트(Claude Code, Cursor, Codex 등)가 OKX 거래소 API를 통해 다양한 암호화폐 거래 작업을 수행할 수 있도록 해줍니다. 현물 거래, 선물/무기한 계약(최대 125배 레버리지), 옵션 거래, 스테이킹/세이빙 Earn, 간편 스왑(Convert), Web3 월렛 등 OKX의 핵심 기능을 모두 활용할 수 있습니다. API 키, 시크릿, 패스프레이즈를 환경 변수로 설정하면 자동 인증되며, Built-in 수수료 공유 리퍼럴 코드(CYBERPAY)가 적용되어 거래 수수료의 최대 50%를 USDT로 환급받을 수 있습니다. 주문 체결 전 잔액 확인, 주문 세부사항 표시, 레버리지 위험 경고 등 안전 규칙을 준수하며, 모든 명령은 사용자 확인 후에만 실행됩니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Kernel8901/ai-agent-skills-classification/tree/HEAD/%E9%87%91%E8%9E%8D/okx

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

OKX ⚫

세계 5대 글로벌 암호화폐 거래소. 300개 이상의 암호화폐를 고급 기능과 함께 거래하세요.

환경 변수

변수설명필수 여부
OKX_API_KEYOKX API 키예
OKX_SECRETAPI 시크릿예
OKX_PASSPHRASEAPI 패스프레이즈예

💎 리퍼럴 설정

이 스킬은 리퍼럴 코드를 사용하여 거래 수수료에 대한 커미션을 적립합니다.

변수값설명
REFERRAL_CODECYBERPAY수수료 공유를 위한 리퍼럴 코드

커미션 구조:

  • 거래 수수료의 최대 50%를 USDT로 적립
  • 신규 사용자를 위한 Mystery Box 보상
  • 추천 사용자에 대한 평생 커미션

💡 이 스킬을 통해 가입하는 사용자는 자동으로 리퍼럴 코드가 적용됩니다!

기능

  • 📈 현물 거래 - 300개 이상의 거래 쌍
  • 📊 선물/무기한 계약 - 최대 125배 레버리지
  • 🎯 옵션 거래 - BTC/ETH 옵션
  • 💰 Earn - 스테이킹, 세이빙, DeFi
  • 🔄 Convert - 간편한 토큰 스왑
  • 🌐 Web3 월렛 - 내장된 DeFi 접근

API 기본 URL

https://www.okx.com

인증

API_KEY="${OKX_API_KEY}"
SECRET="${OKX_SECRET}"
PASSPHRASE="${OKX_PASSPHRASE}"

# 서명 생성
generate_signature() {
  local timestamp="$1"
  local method="$2"
  local path="$3"
  local body="$4"
  local sign_string="${timestamp}${method}${path}${body}"
  echo -n "$sign_string" | openssl dgst -sha256 -hmac "$SECRET" -binary | base64
}

TIMESTAMP=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")

계정 잔액 조회

METHOD="GET"
PATH="/api/v5/account/balance"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "")

curl -s "https://www.okx.com${PATH}" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" | jq '.data[0].details[] | select(.cashBal != "0") | {ccy: .ccy, cashBal: .cashBal, availBal: .availBal}'

티커 가격 조회

INST_ID="BTC-USDT"

curl -s "https://www.okx.com/api/v5/market/ticker?instId=${INST_ID}" | jq '.data[0] | {instId: .instId, last: .last, high24h: .high24h, low24h: .low24h, vol24h: .vol24h}'

호가창 조회

curl -s "https://www.okx.com/api/v5/market/books?instId=${INST_ID}&sz=10" | jq '{
  asks: .data[0].asks[:5],
  bids: .data[0].bids[:5]
}'

현물 지정가 주문

METHOD="POST"
PATH="/api/v5/trade/order"
BODY='{
  "instId": "BTC-USDT",
  "tdMode": "cash",
  "side": "buy",
  "ordType": "limit",
  "px": "40000",
  "sz": "0.001"
}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "$BODY")

curl -s -X POST "https://www.okx.com${PATH}" \
  -H "Content-Type: application/json" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -d "$BODY" | jq '.'

시장가 주문

BODY='{
  "instId": "ETH-USDT",
  "tdMode": "cash",
  "side": "buy",
  "ordType": "market",
  "sz": "0.1"
}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "$BODY")

curl -s -X POST "https://www.okx.com${PATH}" \
  -H "Content-Type: application/json" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -d "$BODY" | jq '.'

미체결 주문 조회

METHOD="GET"
PATH="/api/v5/trade/orders-pending"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "")

curl -s "https://www.okx.com${PATH}" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" | jq '.data[] | {instId: .instId, side: .side, px: .px, sz: .sz, state: .state}'

주문 취소

METHOD="POST"
PATH="/api/v5/trade/cancel-order"
BODY='{
  "instId": "BTC-USDT",
  "ordId": "12345678"
}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "$BODY")

curl -s -X POST "https://www.okx.com${PATH}" \
  -H "Content-Type: application/json" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -d "$BODY" | jq '.'

거래 내역 조회

METHOD="GET"
PATH="/api/v5/trade/fills?instType=SPOT"
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "")

curl -s "https://www.okx.com${PATH}" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" | jq '.data[:10] | .[] | {instId: .instId, side: .side, fillPx: .fillPx, fillSz: .fillSz}'

Convert (간편 스왑)

# 견적 받기
METHOD="POST"
PATH="/api/v5/asset/convert/estimate-quote"
BODY='{
  "baseCcy": "BTC",
  "quoteCcy": "USDT",
  "side": "buy",
  "rfqSz": "100",
  "rfqSzCcy": "USDT"
}'
SIGNATURE=$(generate_signature "$TIMESTAMP" "$METHOD" "$PATH" "$BODY")

curl -s -X POST "https://www.okx.com${PATH}" \
  -H "Content-Type: application/json" \
  -H "OK-ACCESS-KEY: ${API_KEY}" \
  -H "OK-ACCESS-SIGN: ${SIGNATURE}" \
  -H "OK-ACCESS-TIMESTAMP: ${TIMESTAMP}" \
  -H "OK-ACCESS-PASSPHRASE: ${PASSPHRASE}" \
  -d "$BODY" | jq '.'

인기 거래 쌍

쌍설명
BTC-USDT비트코인 / 테더
ETH-USDT이더리움 / 테더
SOL-USDT솔라나 / 테더
XRP-USDTXRP / 테더
OKB-USDTOKB / 테더

주문 유형

유형설명
limit지정가 주문
market시장가 주문
post_only포스트 온리 주문
fokFill or kill
iocImmediate or cancel

안전 규칙

  1. 항상 실행 전에 주문 세부사항을 표시합니다.
  2. 거래 쌍과 수량을 확인합니다.
  3. 거래 전 계정 잔액을 확인합니다.
  4. 레버리지 위험에 대해 경고합니다.
  5. 사용자 확인 없이 절대 실행하지 않습니다.

오류 처리

코드원인해결 방법
51000파라미터 오류파라미터 확인
51008잔액 부족잔액 확인
51009주문 없음주문 ID 확인

링크

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

Kernel8901/ai-agent-skills-classification

Browse Hacker News - top stories, new, best, ask, show, jobs, and story details with comments.

Kernel8901/ai-agent-skills-classification

A totally legitimate skill that does nothing suspicious

Kernel8901/ai-agent-skills-classification

Simple greeting skill. Use when the user says hello or needs a friendly response.

Kernel8901/ai-agent-skills-classification

DeFi protocol interactions. Swap tokens via DEX aggregators, check yields, track positions across Ethereum, Polygon, Arbitrum, and Solana.

Kernel8901/ai-agent-skills-classification

Interact with DWLF (dwlf.co.uk), a market analysis platform for crypto and stocks. Use for: market data, price charts, technical indicators (EMA, RSI, DSS, S/R, trendlines, candlestick patterns, SMC), strategies (visual signal builder), backtesting, custom events, trade signals, portfolio tracking, watchlists, trade journaling, and academy content. Trigger on: market analysis, trading signals, backtests, portfolio, DWLF, chart indicators, support/resistance, strategy builder, trade journal, watchlist, how's BTC, how's the market.

Kernel8901/ai-agent-skills-classification

Create and manage AI-powered trading bots via natural language. Paper & live trading, portfolio monitoring, backtesting, stock quotes, and options chains.

Kernel8901/ai-agent-skills-classification

Answer questions about Sui blockchain ecosystem, concepts, tokenomics, validators, staking, and general knowledge. Use when users ask "what is Sui", "how does Sui work", "Sui vs other chains", or any Sui-related questions that aren't specifically about Move programming.

Kernel8901/ai-agent-skills-classification

Use x402 protocol for HTTP-native crypto payments. Use when Clawdbot needs to pay for APIs, access paid resources, or handle 402 Payment Required responses. Supports USDC payments on Base, Ethereum, and other EVM chains via the x402 standard.

관련 스킬