Token导航 LogoToken导航TokenDH.com
Zke Trading SDK logo
金融服务stdio官方来源来源级核验

Zke Trading SDK

MCP Server

ZKE交易所官方交易SDK,提供完整的开发工具包,支持AI代理交互,适用于现货和期货API的安全高效交互。

工具数

43

提示词数

0

GitHub Stars

1

资源数

0
PythonAI代理金融数据

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ZKE-Exchange

提供方

ZKE-Exchange

最后核验

2026/5/17 20:22

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

python main.py ticker BTCUSDT

详细介绍

ZKE交易SDK

官方 ZKE交易所交易SDK 有AI代理支持。

此存储库为与ZKE Exchange交互提供了一个完整的开发人员工具包。

它包括:

•Python交易SDK\ •WebSocket市场数据客户端\ •CLI交易工具\ •用于AI代理的本地MCP服务器\ •OpenClaw插件集成\ •自动安装脚本

SDK使开发人员和AI代理能够与 ZKE现货和期货API安全高效。

______________________________________________________________________

特性

斑点

•市场数据\ •交易\ •钱包余额\ •订单管理\ •资产转移\ •提款历史

期货

•市场数据\ •职位管理\ •订单管理\ •有条件订单\ •利润调整\ •杠杆控制

高级集成

•Python应用程序\ •通过MCP的AI代理\ •OpenClaw插件工具\ •WebSocket实时市场流

______________________________________________________________________

快速开始

安装SDK

curl -s https://raw.githubusercontent.com/ZKE-Exchange/zke-trading-sdk/main/install.sh | bash

安装OpenClaw插件

bash <(curl -s "https://raw.githubusercontent.com/ZKE-Exchange/zke-trading-sdk/main/install_openclaw_plugin.sh?v=$RANDOM")

______________________________________________________________________

存储库结构

zke-trading-sdk
│
├── main.py
├── mcp_server.py
├── config.example.json
├── requirements.txt
│
├── install.sh
├── install_openclaw_plugin.sh
│
├── tools
│   ├── account_service.py
│   ├── common.py
│   ├── errors.py
│   ├── field_mapper.py
│   ├── formatters.py
│   ├── futures_account_service.py
│   ├── futures_order_service.py
│   ├── futures_private.py
│   ├── futures_public.py
│   ├── futures_service.py
│   ├── margin_order_service.py
│   ├── margin_private.py
│   ├── market_service.py
│   ├── order_service.py
│   ├── spot_private.py
│   ├── spot_public.py
│   ├── symbol_utils.py
│   ├── transfer_service.py
│   ├── withdraw_service.py
│   ├── ws_client.py
│   ├── ws_parser.py
│   └── ws_service.py
│
├── openclaw-plugin
│   ├── src
│   │   ├── index.ts
│   │   ├── python.ts
│   │   └── types.ts
│   │
│   ├── skills
│   │   └── zke_trading
│   │       └── SKILL.md
│   │
│   ├── package.json
│   ├── openclaw.plugin.json
│   └── tsconfig.json
│
├── docs
│   ├── cli.md
│   ├── openclaw.md
│   └── examples
│
└── README.md

______________________________________________________________________

配置

创建配置文件

cp config.example.json config.json

配置示例

{
  "spot": {
    "base_url": "https://openapi.zke.com",
    "api_key": "YOUR_SPOT_API_KEY",
    "api_secret": "YOUR_SPOT_API_SECRET",
    "recv_window": 5000
  },
  "futures": {
    "base_url": "https://futuresopenapi.zke.com",
    "api_key": "YOUR_FUTURES_API_KEY",
    "api_secret": "YOUR_FUTURES_API_SECRET",
    "recv_window": 5000
  },
  "ws": {
    "url": "wss://ws.zke.com/kline-api/ws"
  }
}

创建API密钥

https://www.zke.com/en_US/personal/apiManagement

推荐权限

•阅读\ •贸易

除非需要,否则禁用提款权限。

______________________________________________________________________

CLI使用情况

示例

python main.py ticker BTCUSDT
python main.py depth BTCUSDT
python main.py balance
python main.py positions

输出示例

{
  "high": "68539.78",
  "low": "67446.38",
  "last": "67621.67"
}

______________________________________________________________________

Python SDK示例

现场示例

from tools.spot_private import SpotPrivateApi
from tools.zke_client import ZKEClient

client = ZKEClient(
    base_url="https://openapi.zke.com",
    api_key="YOUR_KEY",
    api_secret="YOUR_SECRET"
)

spot = SpotPrivateApi(client)

balance = spot.account()

print(balance)

______________________________________________________________________

期货示例

from tools.futures_private import FuturesPrivateApi
from tools.zke_client import ZKEClient

client = ZKEClient(
    base_url="https://futuresopenapi.zke.com",
    api_key="YOUR_KEY",
    api_secret="YOUR_SECRET"
)

futures = FuturesPrivateApi(client)

positions = futures.account()

print(positions)

______________________________________________________________________

WebSocket支持

模块

tools/ws_client.py
tools/ws_parser.py
tools/ws_service.py

支持的流

•自动收报机\ •订单深度\ •贸易流\ •克莱恩

示例

from tools.ws_service import WSService

ws = WSService()

ws.subscribe_ticker("BTCUSDT")

ws.run()

______________________________________________________________________

MCP服务器

运行MCP服务器

python mcp_server.py

______________________________________________________________________

MCP工具

斑点

zke_get_spot_ticker
zke_get_spot_depth
zke_get_spot_klines
zke_get_spot_account
zke_get_spot_nonzero_balances
zke_get_spot_balance
zke_get_spot_account_by_type
zke_get_spot_open_orders
zke_get_spot_my_trades
zke_get_spot_my_trades_v3
zke_get_spot_history_orders
zke_create_spot_order
zke_cancel_spot_order

资产

zke_transfer_spot_to_futures
zke_transfer_futures_to_spot
zke_get_transfer_history
zke_create_withdraw
zke_get_withdraw_history

边距

zke_create_margin_order
zke_get_margin_order
zke_cancel_margin_order
zke_get_margin_open_orders
zke_get_margin_my_trades

期货

zke_get_futures_ticker
zke_get_futures_index
zke_get_futures_depth
zke_get_futures_klines
zke_get_futures_balance
zke_get_futures_positions
zke_get_futures_order
zke_get_futures_open_orders
zke_get_futures_my_trades
zke_get_futures_order_history
zke_get_futures_profit_history
zke_get_futures_transaction_history
zke_create_futures_order
zke_create_futures_condition_order
zke_cancel_futures_order
zke_cancel_all_futures_orders
zke_edit_futures_position_mode
zke_edit_futures_margin_mode
zke_adjust_futures_position_margin
zke_edit_futures_leverage

______________________________________________________________________

OpenClaw插件

安装插件

curl -s https://raw.githubusercontent.com/ZKE-Exchange/zke-trading-sdk/main/install_openclaw_plugin.sh | bash

验证

openclaw plugins list

预期

ZKE Trading
Status: loaded

______________________________________________________________________

重要的OpenClaw设置

编辑

~/.openclaw/openclaw.json

"tools": {
  "profile": "full"
}

更新后重新启动OpenClaw。

______________________________________________________________________

建筑

主控程序

AI Agent
   │
   ▼
MCP Server
   │
   ▼
Python SDK
   │
   ├─ REST API
   └─ WebSocket

开爪

AI Agent
   │
   ▼
OpenClaw Plugin
   │
   ▼
Python SDK
   │
   ├─ REST API
   └─ WebSocket

______________________________________________________________________

安全通告

永远不要公开您的API密钥。

推荐权限

•阅读\ •贸易

除非必要,否则禁用提款权限。

______________________________________________________________________

ZKE交易所

官方网站

https://www.zke.com

API 文档

https://help.zke.com/api_en/

______________________________________________________________________

许可证

MIT许可证

目录标签

目录标签

PythonAI代理金融数据交易SDK本地部署WebSocket期货交易现货交易

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

43

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP