Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

Okx Pro

v1.1.0

完整 OKX 交易所集成,U本位/币本位合约,杠杆交易,止盈止损,仓位管理

2· 295·0 current·0 all-time
byLostOmato@icenoodle

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for icenoodle/okx-pro.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "Okx Pro" (icenoodle/okx-pro) from ClawHub.
Skill page: https://clawhub.ai/icenoodle/okx-pro
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Required binaries: curl, jq, openssl
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install okx-pro

ClawHub CLI

Package manager switcher

npx clawhub@latest install okx-pro
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description (OKX trading) matches the instructions: it uses OKX V5 endpoints and provides order/position examples. The declared required binaries (curl, jq, openssl) are appropriate for the described functionality.
!
Instruction Scope
The runtime instructions explicitly require API credentials (either ~/.openclaw/credentials/okx.json or env vars OKX_API_KEY/OKX_SECRET/OKX_PASSPHRASE) and provide shell helpers that sign and send requests. The registry metadata, however, lists no required env vars/credentials — an inconsistency. Instructions otherwise stay within the stated trading scope and do not request unrelated system data.
Install Mechanism
Instruction-only skill with no install spec or downloads; no code files to write to disk. This is the lowest-risk install mechanism.
!
Credentials
The skill legitimately needs API credentials for OKX, but the skill metadata does not declare any required env vars or primary credential. Requesting three sensitive values (api key, secret, passphrase) is proportionate to the purpose, but the missing declaration in metadata and persistent credential file path means secrets could be present and accessed without the user noticing.
!
Persistence & Privilege
always: true is set in the registry metadata. That forces the skill to be present/loaded for all agents and increases blast radius if credentials are provided. There is no justification in the SKILL.md for requiring always-on behavior.
What to consider before installing
This skill's instructions are consistent with an OKX trading integration, but the package metadata fails to declare the required API credentials and it is marked always:true. Before installing: (1) do not provide your real exchange API keys until you confirm the skill source and code — prefer testnet or read-only keys first; (2) ask the publisher why credentials are not declared in metadata and why always:true is required; (3) if you proceed, limit key permissions (no withdraw), rotate keys after testing, and store secrets in a secure place; (4) prefer a skill with a verifiable homepage, source repo, or published owner; (5) if you need higher assurance, request the actual code files or a reviewed package rather than an opaque instruction-only skill.

Like a lobster shell, security has layers — review code before you run it.

Runtime requirements

🟧 Clawdis
Binscurl, jq, openssl
latestvk973ssbvgrx29zk8h58q4g1b0n834345
295downloads
2stars
2versions
Updated 22h ago
v1.1.0
MIT-0

OKX Pro 🟧

专业 OKX 交易所交易技能 - 全球领先的加密货币合约交易所。

🚀 Quick Start

Setup Credentials

Save to ~/.openclaw/credentials/okx.json:

{
  "apiKey": "YOUR_API_KEY",
  "secretKey": "YOUR_SECRET_KEY",
  "passphrase": "YOUR_PASSPHRASE"
}

Environment Variables (alternative)

export OKX_API_KEY="your_api_key"
export OKX_SECRET="your_secret_key"
export OKX_PASSPHRASE="your_passphrase"

📖 技术文档 | Technical Documentation

中文文档

1. 概述

OKX Pro 是一个完整的 OKX 交易所集成技能,支持:

  • 现货交易 (Spot Trading)
  • 合约交易 (Futures Trading)
  • U本位合约 / 币本位合约
  • 杠杆交易 (Leverage Trading)
  • 止盈止损 (Take Profit / Stop Loss)
  • 仓位管理 (Position Management)

2. API 版本

本技能使用 OKX V5 API:

  • 基础URL: https://www.okx.com
  • 所有请求需要签名认证

3. 支持的交易对

交易对说明
BTC-USDTBTC 现货
ETH-USDTETH 现货
BTC-USDT-SWAPBTC U本位永续合约
ETH-USDT-SWAPETH U本位永续合约
BTC-USD-SWAPBTC 币本位永续合约

4. 交易参数

参数说明示例
instId交易对IDBTC-USDT-SWAP
tdMode仓位模式cross(全仓) / isolated(逐仓)
side交易方向buy / sell
ordType订单类型market / limit / conditional
sz数量0.001
px价格50000
SL止损slTriggerPx
TP止盈tpTriggerPx

5. 订单类型详解

市价单 (Market Order)

立即以市场价成交

{"instId":"BTC-USDT-SWAP","tdMode":"cross","side":"buy","ordType":"market","sz":"0.001"}

限价单 (Limit Order)

指定价格成交

{"instId":"BTC-USDT-SWAP","tdMode":"cross","side":"buy","ordType":"limit","sz":"0.001","px":"50000"}

条件单 (Conditional Order)

止盈止损订单

{
  "instId": "BTC-USDT-SWAP",
  "tdMode": "cross",
  "side": "sell",
  "ordType": "conditional",
  "sz": "0.001",
  "slTriggerPx": "45000",
  "slOrdPx": "-1"
}

6. 止盈止损详解

  • slTriggerPx: 止损触发价格
  • slOrdPx: 止损订单价格 (-1 = 市价)
  • tpTriggerPx: 止盈触发价格
  • tpOrdPx: 止盈订单价格

7. 仓位管理

操作API
查询仓位GET /api/v5/position/positions
设置杠杆POST /api/v5/account/set-leverage
追加保证金POST /api/v5/account/increase-margin
减少保证金POST /api/v5/account/decrease-margin

8. 风险控制

⚠️ 安全规则:

  1. 杠杆不超过10x(新手建议2-3x)
  2. 始终设置止损
  3. 大额订单先确认
  4. 测试网验证后再实盘

English Documentation

1. Overview

OKX Pro provides complete OKX exchange integration:

  • Spot Trading
  • Futures Trading (U-Margin / Coin-Margin)
  • Leverage Trading
  • Take Profit / Stop Loss
  • Position Management

2. API Version

Uses OKX V5 API:

  • Base URL: https://www.okx.com
  • All requests require signature authentication

3. Supported Trading Pairs

PairDescription
BTC-USDTBTC Spot
ETH-USDTETH Spot
BTC-USDT-SWAPBTC USDT-Margin Perpetual
ETH-USDT-SWAPETH USDT-Margin Perpetual

4. Trading Parameters

ParameterDescriptionExample
instIdInstrument IDBTC-USDT-SWAP
tdModeTrade Modecross / isolated
sideOrder Sidebuy / sell
ordTypeOrder Typemarket / limit / conditional
szSize0.001
pxPrice50000

5. Order Types

Market Order

Execute immediately at market price

{"instId":"BTC-USDT-SWAP","tdMode":"cross","side":"buy","ordType":"market","sz":"0.001"}

Limit Order

Execute at specified price

{"instId":"BTC-USDT-SWAP","tdMode":"cross","side":"buy","ordType":"limit","sz":"0.001","px":"50000"}

Conditional Order

Stop loss / Take profit orders

{
  "instId": "BTC-USDT-SWAP",
  "tdMode": "cross",
  "side": "sell",
  "ordType": "conditional",
  "sz": "0.001",
  "slTriggerPx": "45000",
  "slOrdPx": "-1"
}

6. Stop Loss / Take Profit

  • slTriggerPx: Stop loss trigger price
  • slOrdPx: Stop loss order price (-1 = market)
  • tpTriggerPx: Take profit trigger price
  • tpOrdPx: Take profit order price

7. Position Management

OperationAPI
Get PositionsGET /api/v5/position/positions
Set LeveragePOST /api/v5/account/set-leverage
Increase MarginPOST /api/v5/account/increase-margin
Decrease MarginPOST /api/v5/account/decrease-margin

8. Risk Control

⚠️ Safety Rules:

  1. Leverage max 10x (beginners: 2-3x)
  2. Always set stop loss
  3. Confirm large orders
  4. Test on demo trading first

🔐 Signature Helper

# 生成 OKX 签名的函数
okx_sign() {
  local method="$1"
  local request_path="$2"
  local body="$3"
  local timestamp=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
  local message="${timestamp}${method}${request_path}${body}"
  local signature=$(echo -n "$message" | openssl dgst -sha256 -hmac "$OKX_SECRET" | cut -d' ' -f2)
  echo "$signature"
}

okx_request() {
  local method="$1"
  local endpoint="$2"
  local body="$3"
  local timestamp=$(date -u +"%Y-%m-%dT%H:%M:%S.000Z")
  local signature=$(okx_sign "$method" "$endpoint" "$body")
  
  curl -s -X "$method" "https://www.okx.com$endpoint" \
    -H "Content-Type: application/json" \
    -H "OKX-ACCESS-KEY: $OKX_API_KEY" \
    -H "OKX-ACCESS-SIGN: $signature" \
    -H "OKX-ACCESS-TIMESTAMP: $timestamp" \
    -H "OKX-ACCESS-PASSPHRASE: $OKX_PASSPHRASE" \
    -d "$body"
}

📊 Basic Queries

Check Balance

okx_request "GET" "/api/v5/account/balance" ''

Get Current Price

curl -s "https://www.okx.com/api/v5/market/ticker?instId=BTC-USDT" | jq '.data[0]'

Get All Positions

okx_request "GET" "/api/v5/position/positions" ''

⚡ Futures Trading

Open LONG Position (Buy)

INST_ID="BTC-USDT-SWAP"
SZ="0.001"
TD_MODE="cross"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"$TD_MODE\",\"side\":\"buy\",\"ordType\":\"market\",\"sz\":\"$SZ\"}"

Open SHORT Position (Sell)

INST_ID="BTC-USDT-SWAP"
SZ="0.001"
TD_MODE="cross"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"$TD_MODE\",\"side\":\"sell\",\"ordType\":\"market\",\"sz\":\"$SZ\"}"

Set Stop Loss

INST_ID="BTC-USDT-SWAP"
SZ="0.001"
STOP_PRICE="75000"
TD_MODE="cross"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"$TD_MODE\",\"side\":\"sell\",\"ordType\":\"conditional\",\"sz\":\"$SZ\",\"slTriggerPx\":\"$STOP_PRICE\",\"slOrdPx\":\"-1\"}"

Set Take Profit

INST_ID="BTC-USDT-SWAP"
SZ="0.001"
TP_PRICE="85000"
TD_MODE="cross"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"$TD_MODE\",\"side\":\"sell\",\"ordType\":\"conditional\",\"sz\":\"$SZ\",\"tpTriggerPx\":\"$TP_PRICE\",\"tpOrdPx\":\"-1\"}"

Close Position (Market)

INST_ID="BTC-USDT-SWAP"
SZ="0.001"
TD_MODE="cross"

okx_request "POST" "/api/v5/trade/close-position" "{\"instId\":\"$INST_ID\",\"mgnMode\":\"cross\",\"posSide\":\"long\"}"

Set Leverage

INST_ID="BTC-USDT-SWAP"
LEVERAGE="10"
TD_MODE="cross"

okx_request "POST" "/api/v5/account/set-leverage" "{\"instId\":\"$INST_ID\",\"lever\":\"$LEVERAGE\",\"mgnMode\":\"$TD_MODE\"}"

📈 Spot Trading

Buy (Market)

INST_ID="BTC-USDT"
SZ="0.001"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"cash\",\"side\":\"buy\",\"ordType\":\"market\",\"sz\":\"$SZ\"}"

Sell (Market)

INST_ID="BTC-USDT"
SZ="0.001"

okx_request "POST" "/api/v5/trade/order" "{\"instId\":\"$INST_ID\",\"tdMode\":\"cash\",\"side\":\"sell\",\"ordType\":\"market\",\"sz\":\"$SZ\"}"

🔧 Utilities

View Open Orders

okx_request "GET" "/api/v5/trade/orders-pending" ''

Cancel Order

INST_ID="BTC-USDT-SWAP"
ORD_ID="123456789"

okx_request "POST" "/api/v5/trade/cancel-order" "{\"instId\":\"$INST_ID\",\"ordId\":\"$ORD_ID\"}"

View Trade History

okx_request "GET" "/api/v5/trade/fills" ''

📋 Popular Pairs

InstIDDescription
BTC-USDTBitcoin U本位合约
ETH-USDTEthereum U本位合约
SOL-USDTSolana U本位合约
XRP-USDTXRP U本位合约
DOGE-USDTDogecoin U本位合约
BTC-USDT-SWAP永续合约
ETH-USDT-SWAPETH 永续合约

⚠️ Safety Rules

  1. ALWAYS verify position before closing
  2. ALWAYS set Stop Loss on leveraged trades
  3. NEVER use leverage higher than 10x without experience
  4. VERIFY pair and quantity before executing
  5. CONFIRM with user before executing large orders
  6. 注意:U本位合约用 USDT 计价,币本位用 USD/BTC 计价

🔗 Links

Comments

Loading comments...