# Send OKX交易执行器 to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "okx-trading-exe",
    "name": "OKX交易执行器",
    "source": "tencent",
    "type": "skill",
    "category": "通讯协作",
    "sourceUrl": "https://clawhub.ai/iceonme/okx-trading-exe",
    "canonicalUrl": "https://clawhub.ai/iceonme/okx-trading-exe",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/okx-trading-exe",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=okx-trading-exe",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      ".env",
      "SKILL.md",
      "scripts/execute.py",
      "providers/base_provider.py",
      "providers/okx_provider.py"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/okx-trading-exe"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/okx-trading-exe",
    "downloadUrl": "https://openagent3.xyz/downloads/okx-trading-exe",
    "agentUrl": "https://openagent3.xyz/skills/okx-trading-exe/agent",
    "manifestUrl": "https://openagent3.xyz/skills/okx-trading-exe/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/okx-trading-exe/agent.md"
  }
}
```
## Documentation

### okx-trading-exe Skill 说明书

本 Skill 是一个无状态的“执行手柄”，只负责对接 OKX 交易所（包含模拟盘与实盘），执行标准化的交易动作与资产查询。它不包含其他交易所接口，也不包含任何策略分析逻辑。

### 🔐 授权与鉴权获取 (Prompt-driven Auth) - Agent 必读

本代码需要 OKX 的 API_KEY, API_SECRET 和 PASSPHRASE 才能运行。
如果你在执行底层的脚本时，收到了关于 Missing API Key 或未授权的报错，你绝对不要尝试去猜测密码，也不要停止工作。
**你的处理逻辑必须是：**中途中断当前的代码思路，使用自然语言明确向你的“物理人类主人”索要这三个秘钥，并让主人将它们写入当前工作目录的 .env 文件中。只有在人类确认写好后，你才能再次尝试执行。

### 能力范围 (Capabilities)

目前支持以下核心操作动作：

查询账户总余额/可用资金 (get_balance)
查询当前已持有的真实仓位 (get_positions)
发起市价买单/卖单 (place_market_order)
发起限价买单/卖单 (place_limit_order)
拉取最近的历史成交记录 (get_recent_trades)

### 调用说明 (Usage for Agents / PA)

如果你是一个外层调度 Agent (比如 TAS 小队成员) 或策略 (Skill)，请使用随附的入口脚本与本 Skill 进行交互。

标准切入点：
python scripts/execute.py --action [ACTION_NAME] --provider [PROVIDER_NAME] [OPTIONS]

### 支持的 Provider (环境提供者)

okx_demo: 连接 OKX 交易所模拟盘 (预设).
okx_live: 连接 OKX 交易所的实盘交易.

### 示例用法 (Examples)

1. 查询模拟盘所有资产与持仓

python scripts/execute.py --action get_positions --provider okx_demo

2. 在模拟盘下一笔市价买单

python scripts/execute.py --action place_market_order --provider okx_demo --symbol BTC-USDT --side buy --size 50
# 注意: OKX 市价买单时，size 通常代表花费 50 USDT。

3. 在模拟盘下一笔限价卖单

python scripts/execute.py --action place_limit_order --provider okx_demo --symbol BTC-USDT --side sell --size 0.1 --price 62000
# 卖出 0.1 枚 BTC，限价标的是 62000 USDT。

### 注意事项与约束 (Constraints)

统一的交易对格式：所有请求必须使用 - 连接的标准格式，如 BTC-USDT，不要使用 /。
凭据安全：本 Skill 在真实请求前会自动读取 .env 中的秘钥配置，不要在任何参数中明文传递私钥！
输出格式：执行结果将以标准化的 JSON 或清爽的 stdout 文本格式输出，方便被其他脚本或大语言模型正则提取。
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: iceonme
- Version: 0.1.1
## Source health
- Status: healthy
- Source download looks usable.
- Yavira can redirect you to the upstream package for this source.
- Health scope: source
- Reason: direct_download_ok
- Checked at: 2026-04-30T16:55:25.780Z
- Expires at: 2026-05-07T16:55:25.780Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/okx-trading-exe)
- [Send to Agent page](https://openagent3.xyz/skills/okx-trading-exe/agent)
- [JSON manifest](https://openagent3.xyz/skills/okx-trading-exe/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/okx-trading-exe/agent.md)
- [Download page](https://openagent3.xyz/downloads/okx-trading-exe)