onv-mcp
量化策略回测、组合配置与多交易所执行(14 家通道)
Should I use this
Quality & Safety
Findings (32)
- LOWin platform_market_quote
- LOWin platform_market_overview
- LOWin platform_market_ticker
- LOWin platform_market_factors
- LOWin platform_quick_analysis
- LOWin platform_list_agents
- LOWin platform_get_agent
- LOWin platform_agent_signal
- LOWin platform_agent_performance
- LOWin platform_plans
Based on automated analysis of tool definitions and protocol compliance.
Context Cost
This is the approximate number of tokens consumed each time the server's tools are loaded into a model's context. Higher counts reduce the attention available for other tasks.
Install
One-Click Install
Add this to your `claude_desktop_config.json` file:
{
"mcpServers": {
"onv-mcp": {
"command": "npx",
"args": [
"@onvcodes/mcp-server"
]
}
}
}Runnable packages
1.0.3stdioRemote endpoints
https://onv.codes/mcpstreamable-httpWhat it can do
Tool inventory
Tools (50)
🟢platform_market_quote(symbol, timeframe, limit)
【行情】查询平台行情 K 线。参数 symbol 为交易标的(如 BTCUSDT / ETHUSDT),timeframe 可选 1m/5m/15m/30m/1H/4H/1D,limit 最大 299。返回该标的的 K 线数组。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "交易标的,如 BTCUSDT(必填)"
},
"timeframe": {
"description": "K 线周期,如 1H / 4H / 1D(可选)",
"type": "string"
},
"limit": {
"description": "返回 K 线条数上限(可选,最大 299)",
"type": "number"
}
},
"required": [
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_market_overview
【行情】市场总览:主流币种快照、涨跌幅、成交量等市场状态概览。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_market_ticker(symbol)
【行情】查询标的实时行情 ticker。参数 symbol 为交易标的(如 BTCUSDT,可选,缺省返回全部)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"symbol": {
"description": "交易标的,如 BTCUSDT(可选)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_market_factors(symbol, limit)
【行情】查询标的的市场因子数据(技术/宏观因子)。参数 symbol 为交易标的。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "交易标的,如 BTCUSDT(必填)"
},
"limit": {
"description": "返回因子条数上限(可选)",
"type": "number"
}
},
"required": [
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_symbol_search(query)
【行情】搜索平台支持的交易标的(币种/交易对)。参数 query 为关键词如 BTC。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "搜索关键词,如 BTC(必填)"
}
},
"required": [
"query"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_quick_analysis(symbol, timeframe)
【行情】对指定标的进行快速 AI 技术分析(拉取行情并生成分析结论)。参数 symbol 为交易标的,如 BTCUSDT。(cost: ≈ 22–28 credits/次(按实际 tokens 结算))
Input Schema
{
"type": "object",
"properties": {
"symbol": {
"type": "string",
"description": "交易标的,如 BTCUSDT(必填)"
},
"timeframe": {
"description": "K 线周期(可选)",
"type": "string"
}
},
"required": [
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_list_agents(capabilities, activeOnly, page, pageSize)
【策略】列出平台上已发布的公开 AI 助理(策略),可按能力过滤与分页。参数 capabilities 可选(如 dex/defi)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"capabilities": {
"description": "按能力过滤(可选,如 dex)",
"type": "string"
},
"activeOnly": {
"description": "仅返回活跃 AI 助理(可选)",
"type": "boolean"
},
"page": {
"description": "页码(可选)",
"type": "number"
},
"pageSize": {
"description": "每页数量(可选)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_get_agent(agentId)
【策略】获取单个已发布的公开 AI 助理(策略)详情。参数 agentId 为策略 ID。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"agentId": {
"type": "string",
"description": "策略 / AI 助理 ID(必填)"
}
},
"required": [
"agentId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_agent_signal(strategyId, limit)
【策略】查询**已订阅策略**的最新交易信号(需本人有效订阅,或本人创建该策略)。返回最近信号列表(动作/标的/价格/时间等);不包含下单执行。参数 strategyId 必填,limit 可选(默认 10,最大 50)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "string",
"description": "策略 ID(必填)"
},
"limit": {
"description": "返回条数(可选,默认 10,最大 50)",
"type": "number"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_agent_performance(strategyId)
【策略】查询**已订阅策略**的绩效(需本人有效订阅,或本人创建该策略):订阅人数、样本内外指标、OOS 验证状态与实盘观察天数。参数 strategyId 必填。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "string",
"description": "策略 ID(必填)"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_plans
【账户与额度】查询平台订阅套餐列表(免费/付费 tier 与价格)。无需参数。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_my_strategies(status, page, pageSize)
【策略】查询我创建的**策略市场/订阅域**策略列表(onv-backend `strategies` 表,按钱包地址归属,邮箱注册账号回退按数字 userId)。⚠️ 不含实盘策略——实盘策略在 `qd_strategies_trading`,请用 REST `GET /api/cex/strategies`(该端点不支持 status 过滤,返回全部状态)。status 可选 draft/published/archived(缺省三者全取)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"status": {
"description": "状态过滤(可选,draft/published/archived)",
"type": "string"
},
"page": {
"description": "页码(可选)",
"type": "number"
},
"pageSize": {
"description": "每页数量(可选)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_backtest_result(jobId)
【策略】查询回测任务结果。参数 jobId 为 run_backtest 返回的任务 ID。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"jobId": {
"type": "string",
"description": "回测任务 ID(必填)"
}
},
"required": [
"jobId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_backtest_history(strategyId)
【策略】查询回测历史(可指定策略 ID 过滤)。参数 strategyId 可选。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"description": "策略 ID(可选,缺省返回全部)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_explain_backtest(runId, jobId, strategyId)
【行情】解释一次回测「为什么亏 / 为什么没成交」。返回结构化卡片(数据区间、样本内外、最大回撤、数据缺失)与逐条原因。参数 runId / jobId / strategyId 至少给一个,三选一即可。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"runId": {
"description": "回测记录 ID(qd_backtest_runs.id,可选)",
"type": "number"
},
"jobId": {
"description": "回测任务 ID(run_backtest 返回,可选)",
"type": "string"
},
"strategyId": {
"description": "策略 ID(取最近一次回测,可选)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_explain_portfolio
【行情】解释我的持仓与账户风控:逐仓名义价值 / 未实现盈亏 / 杠杆,以及账户敞口、当日盈亏、保证金使用率、熔断状态。返回结构化卡片,每个数字带 source(来源接口 + 字段),narrative.traces 写明口径公式;不做收益预测。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_explain_factors(runId, jobId, maxFactors)
【行情】解释一次回测里各因子对收益的贡献:同一指标代码 / 区间 / 参数,逐个剔除一个因子列重跑,用指标差分(基准 − 剔除后)给出边际贡献,并把每个数字的 source 写明(基准结果 / ablate(id))。参数 runId / jobId 至少给一个,maxFactors 可选(默认 3,最大 5)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"runId": {
"description": "回测记录 ID(qd_backtest_runs.id,可选)",
"type": "number"
},
"jobId": {
"description": "回测任务 ID(run_backtest 返回,可选;经 backtest_jobs 桥接为 run)",
"type": "string"
},
"maxFactors": {
"description": "最多解释的因子个数(可选,默认 3,最大 5)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_subscription_status(strategyId)
【账户与额度】查询对某 AI 助理的订阅状态。参数 strategyId 或 agentId。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "string",
"description": "策略 / AI 助理 ID(必填)"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_subscription_list
【账户与额度】查询我的策略订阅列表(含状态 status/running_status、到期时间 expires_at、最近执行错误 last_error/last_error_at)。退订用 platform_unsubscribe。无需参数。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_user_subscription
【账户与额度】查询我的平台套餐订阅状态(当前套餐/到期时间)。无需参数。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_user_usage
【账户与额度】查询我的平台用量汇总(今日 bars / 本月 tokens / 剩余配额)。无需参数。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_run_backtest(strategy, symbol, timeframe, startDate, endDate, ...)
【策略】提交回测任务(写操作,需用户确认)。strategy 为策略代码字符串或已有策略 ID(纯数字),symbol 为交易标的如 BTCUSDT,timeframe 可选 1m/5m/15m/30m/1H/4H/1D。params 为指标参数覆盖(可选,写入引擎 indicator_params,与代码内 # @param 默认值合并、此处优先),与同步链 /api/cex/indicator/backtest 的 params 同口径。(cost: ≈ 27 credits/次(90d·1H))(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"strategy": {
"type": "string",
"description": "策略代码或策略 ID(纯数字视为 ID)"
},
"symbol": {
"type": "string",
"description": "交易标的,如 BTCUSDT(必填)"
},
"timeframe": {
"description": "K 线周期(可选)",
"type": "string"
},
"startDate": {
"description": "开始日期,如 2024-01-01(可选)",
"type": "string"
},
"endDate": {
"description": "结束日期,如 2024-12-31(可选)",
"type": "string"
},
"params": {
"description": "指标参数覆盖,如 {\"fast_period\":20,\"slow_period\":60}(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"strategy",
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_manage_strategy(action, strategyId, data)
【策略】管理自己的策略(写操作,需用户确认)。action 为 create / update / delete;update/delete 需要 strategyId;create/update 用 data 传策略数据(data.name 必填,data.strategy_category 为 dex/defi)。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"action": {
"type": "string",
"description": "要执行的操作"
},
"strategyId": {
"description": "策略 ID(update / delete 必填)",
"type": "string"
},
"data": {
"description": "策略数据(create / update 必填)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"action"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_publish_strategy(name, category, description, code, params, ...)
【策略】发布策略(写操作,需用户确认)。name 必填、category 为 dex/defi;code 为策略代码(可选);subscription_price 订阅价格;strategy_id 可指定已有草稿发布。发布为公开上架。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "策略名称(必填)"
},
"category": {
"type": "string",
"description": "分类(必填)"
},
"description": {
"description": "策略描述(可选)",
"type": "string"
},
"code": {
"description": "策略代码(可选)",
"type": "string"
},
"params": {
"description": "策略参数(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"performance": {
"description": "历史表现数据(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"subscription_price": {
"description": "订阅价格(可选)",
"type": "number"
},
"payment_token": {
"description": "支付代币,默认 ETH",
"type": "string"
},
"strategy_id": {
"description": "已有草稿 ID(可选,发布该草稿)",
"type": "number"
}
},
"required": [
"name",
"category"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_subscribe_guide(strategyId, agentId, period)
【账户与额度】订阅引导(写操作,需用户确认):为指定 AI 助理生成订阅引导信息(周期可选 day/week/month/year),确认后返回订阅链接与支付信息,不自动扣费。参数 strategyId 必填(agentId 为等价别名)。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"description": "要订阅的 AI 助理 / 策略 ID(来自 platform_list_agents)",
"type": "string"
},
"agentId": {
"description": "同 strategyId(兼容旧客户端别名,二选一)",
"type": "string"
},
"period": {
"description": "订阅周期(可选)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_subscribe_strategy(strategyId, period, payment_method)
【账户与额度】订阅策略市场里的 AI 助理 / 策略(写操作,需用户确认):免费策略提交即生效;付费策略创建收款单并返回订单号与支付信息,支付确认后自动激活(不会重复扣费)。参数 strategyId 必填(来自 platform_list_agents),period 可选 monthly/quarterly/yearly。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "string",
"description": "策略 / AI 助理 ID(必填)"
},
"period": {
"description": "订阅周期(可选,默认 monthly)",
"type": "string"
},
"payment_method": {
"description": "付费策略的支付方式(可选,默认 usdt;credit 表示用平台点数余额)",
"type": "string"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_unsubscribe(subscriptionId, strategyId)
【账户与额度】退订策略(写操作,需用户确认):停止后续信号执行并释放订阅名额,不支持退款。subscriptionId 与 strategyId 二选一——只给 strategyId 时自动匹配本人当前有效订阅。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"subscriptionId": {
"description": "订阅记录 ID(来自 platform_subscription_list)",
"type": "number"
},
"strategyId": {
"description": "策略 ID(未提供 subscriptionId 时用于匹配本人有效订阅)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_subscribe_plan(plan_id, period, payment_method)
【账户与额度】购买平台套餐(写操作,需用户确认):plan_id 必填(来自 platform_plans),period 可选 day/week/month/year,payment_method 可选 chain/x402。创建支付订单,支付在平台完成。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"plan_id": {
"type": "number",
"description": "套餐 ID(必填)"
},
"period": {
"description": "订阅周期(可选)",
"type": "string"
},
"payment_method": {
"description": "支付方式(可选,默认 chain;仅支持加密货币)",
"type": "string"
}
},
"required": [
"plan_id"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_ai_generate(prompt, context)
【策略】AI 生成策略代码(写操作,需用户确认):输入自然语言 prompt(可选 context 传入研究流水线结构化学徒上下文),返回策略代码与解释。(cost: ≈ 36–48 credits/次(按实际 tokens 结算))(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "策略描述提示词,如「BTC 均线金叉策略」(必填)"
},
"context": {
"description": "可选结构化学徒上下文(B2-a):failedReasons/retiredFactors/reviewNotes/targetMetrics,独立注入 LLM,不进 prompt 文本",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"prompt"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_ai_optimize(prompt, category, maxRounds, backtestParams, initialCode, ...)
【策略】AI 多轮优化策略(写操作,需用户确认):输入 prompt 描述策略目标,自动生成→回测→分析→改进(最多 maxRounds 轮,1-5,默认 3)。耗时较长。给了 initialCode 时第 1 轮不生成:直接回测这份既有代码作基线,第 2 轮起在其上改进(A3)。strategyParams 为指标参数覆盖(对齐 /api/cex/indicator/backtest 的 params)。context 为可选结构化学徒上下文(B2-a,失败因子/评审结论/目标指标),独立注入 LLM。每轮回传 rounds[].params(本轮实际生效参数)与 rounds[].errorCode(失败原因可判定);全轮未产出代码时返回 502/429 + errorCode,不再返回空 finalCode。(cost: ≈ 34–38 credits/轮(按实际 tokens 结算))(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"prompt": {
"type": "string",
"description": "策略目标描述(必填)"
},
"category": {
"description": "分类(可选,默认 dex)",
"type": "string"
},
"maxRounds": {
"description": "优化轮数 1-5(可选,默认 3)",
"type": "number"
},
"backtestParams": {
"description": "回测参数(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"initialCode": {
"description": "待改进的既有策略代码(可选;提供时第 1 轮直接回测它作基线)",
"type": "string"
},
"strategyParams": {
"description": "指标参数覆盖,写入引擎 indicator_params(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"context": {
"description": "可选结构化学徒上下文(B2-a):failedReasons/retiredFactors/reviewNotes/targetMetrics,独立注入 LLM,不进 prompt 文本",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"required": [
"prompt"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_account_overview
【持仓与执行】我的跨所账户总览:各交易所余额、持仓与币种归并(无凭证返回空)。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_positions(exchangeId, symbol)
【持仓与执行】我的全部持仓(跨交易所扁平化,含方向/数量/开仓价/未实现盈亏)。可按交易所或交易对过滤。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"exchangeId": {
"description": "交易所 ID(可选,如 binance)",
"type": "string"
},
"symbol": {
"description": "交易对(可选,如 BTC/USDT)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_strategy_positions(strategyId)
【持仓与执行】查询**实盘策略**的持仓(策略级,按实盘策略 ID)。⚠️ ID 取自 `qd_strategies_trading`(REST `GET /api/cex/strategies`),不是策略市场/订阅域的 `strategies` 表 ID。返回方向/数量/开仓价/未实现盈亏。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "number",
"description": "实盘策略 ID(必填)"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_strategy_trades(strategyId, limit)
【持仓与执行】查询**实盘策略**的成交记录(策略级,按实盘策略 ID;含平仓原因与模拟盘标记)。ID 取自 `qd_strategies_trading`。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "number",
"description": "实盘策略 ID(必填)"
},
"limit": {
"description": "返回条数上限(可选,默认 200,最大 1000)",
"type": "number"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_strategy_performance(strategyId)
【持仓与执行】查询**实盘策略**的绩效(策略级,按实盘策略 ID):权益曲线、最新权益、区间收益与点数。ID 取自 `qd_strategies_trading`。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"strategyId": {
"type": "number",
"description": "实盘策略 ID(必填)"
}
},
"required": [
"strategyId"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_close_preview(credentialId, symbol)
【持仓与执行】一键全平预演(dry-run,不会下单):列出将被平仓的合约持仓 / 现货余额目标与合计盈亏。可按凭证或交易对过滤。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"credentialId": {
"description": "凭证 ID(可选,来自 platform_credentials)",
"type": "number"
},
"symbol": {
"description": "交易对(可选,如 BTC/USDT)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_trade_history(limit, offset)
【持仓与执行】查询我的最近成交记录(默认 50 条,最多 200)。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"limit": {
"description": "返回条数(可选,1-200)",
"type": "number"
},
"offset": {
"description": "偏移量(可选)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_credentials
【账户与额度】查询我绑定的交易所凭证(脱敏,不含密钥)。返回凭证 ID/交易所/名称,供下单、平仓、查询使用。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_risk_config
【账户与额度】查询我的账户级风控面板:配置、熔断状态、聚合风险与策略风险。(cost: free)
Input Schema
{
"type": "object",
"properties": {},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_factory_runs(limit, runId)
【策略】查询我的策略工厂运行记录;传 runId 时返回该次运行详情。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"limit": {
"description": "返回条数(可选,默认 20)",
"type": "number"
},
"runId": {
"description": "运行 ID(可选,传则取详情)",
"type": "number"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🟢platform_dex_quote(chain, fromToken, toToken, amount, slippage)
【行情】链上 DEX 报价(只读):chain 如 ETH/BSC/BASE/SOL,fromToken/toToken 为代币地址或符号,amount 为最小单位字符串。(cost: free)
Input Schema
{
"type": "object",
"properties": {
"chain": {
"type": "string",
"description": "链短名,如 ETH / BSC / BASE / SOL"
},
"fromToken": {
"description": "卖出代币(地址或符号;原生币可留空)",
"type": "string"
},
"toToken": {
"type": "string",
"description": "买入代币(地址或符号)"
},
"amount": {
"type": "string",
"description": "卖出数量(最小单位字符串)"
},
"slippage": {
"description": "滑点百分比(可选,默认 1)",
"type": "number"
}
},
"required": [
"chain",
"toToken",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_place_order(credentialId, symbol, side, amount, orderType, ...)
【持仓与执行】真实下单(写操作,需确认,动用真实资金):credentialId 来自 platform_credentials,amount 为 USDT 名义金额;orderType=market|limit,限价单必填 price。执行前校验账号级「AI 实盘授权」,未开启一律拒绝。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"credentialId": {
"type": "number",
"description": "交易所凭证 ID(必填)"
},
"symbol": {
"type": "string",
"description": "交易对,如 BTC/USDT(必填)"
},
"side": {
"type": "string",
"description": "方向(必填)"
},
"amount": {
"type": "number",
"description": "下单金额,USDT 名义(必填)"
},
"orderType": {
"description": "订单类型(可选,默认 market)",
"type": "string"
},
"price": {
"description": "限价(限价单必填)",
"type": "number"
},
"leverage": {
"description": "杠杆(可选,默认 1)",
"type": "number"
},
"marketType": {
"description": "市场类型 swap/spot(可选)",
"type": "string"
},
"tpPrice": {
"description": "止盈价(可选)",
"type": "number"
},
"slPrice": {
"description": "止损价(可选)",
"type": "number"
},
"idempotencyKey": {
"description": "幂等键(可选,防重复下单)",
"type": "string"
}
},
"required": [
"credentialId",
"symbol",
"side",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_cancel_order(credentialId, symbol, exchangeOrderId, clientOrderId, marketType)
【持仓与执行】撤销未成交挂单(写操作,需确认):exchangeOrderId 与 clientOrderId 二选一。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"credentialId": {
"type": "number",
"description": "交易所凭证 ID(必填)"
},
"symbol": {
"type": "string",
"description": "交易对(必填)"
},
"exchangeOrderId": {
"description": "交易所订单 ID(与 clientOrderId 二选一)",
"type": "string"
},
"clientOrderId": {
"description": "客户端订单 ID(与 exchangeOrderId 二选一)",
"type": "string"
},
"marketType": {
"description": "市场类型 swap/spot(可选)",
"type": "string"
}
},
"required": [
"credentialId",
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_close_position(credentialId, symbol, size, closeScope, marketType)
【持仓与执行】平仓(写操作,需确认):按 credentialId + symbol 平掉持仓;closeScope=full 全平,传 size 时部分平。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"credentialId": {
"type": "number",
"description": "交易所凭证 ID(必填)"
},
"symbol": {
"type": "string",
"description": "交易对(必填)"
},
"size": {
"description": "平仓数量(可选,缺省全平)",
"type": "number"
},
"closeScope": {
"description": "full=全平(可选,默认 full)",
"type": "string"
},
"marketType": {
"description": "市场类型 swap/spot(可选)",
"type": "string"
}
},
"required": [
"credentialId",
"symbol"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_flat_all(credentialId, symbol, marketType, dryRun)
【持仓与执行】一键全平(写操作,需确认):默认 dryRun=true 只预演;确认执行须显式 dryRun=false。可按凭证/交易对/市场类型限定,marketType=spot 时清现货余额。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"credentialId": {
"description": "凭证 ID(可选,缺省全部)",
"type": "number"
},
"symbol": {
"description": "交易对(可选)",
"type": "string"
},
"marketType": {
"description": "swap/spot(可选)",
"type": "string"
},
"dryRun": {
"description": "仅预演(默认 true)",
"type": "boolean"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_set_risk_config(config)
【账户与额度】更新账户级风控配置(写操作,需确认):config 为要修改的字段对象(如日亏损上限、单笔上限)。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"config": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "风控字段对象(必填)"
}
},
"required": [
"config"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_set_breaker(enabled, dailyLossLimitUsd, consecutiveFailLimit, gasSpikeLimitUsd, alertChannels)
【账户与额度】更新账户熔断配置(写操作,需确认):enabled 开关,可设日亏损上限、连续失败次数、gas 尖峰上限。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"enabled": {
"description": "是否启用熔断",
"type": "boolean"
},
"dailyLossLimitUsd": {
"description": "日亏损上限 USD(可选)",
"type": "number"
},
"consecutiveFailLimit": {
"description": "连续失败次数上限(可选)",
"type": "number"
},
"gasSpikeLimitUsd": {
"description": "gas 尖峰上限 USD(可选)",
"type": "number"
},
"alertChannels": {
"description": "告警通道(可选)",
"type": "string"
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_reset_breaker(recoveryCode)
【账户与额度】人工解除熔断(写操作,需确认):须提供 recoveryCode;解除后策略恢复实盘执行。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"recoveryCode": {
"type": "string",
"description": "解除码(必填)"
}
},
"required": [
"recoveryCode"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_dex_swap(chain, fromToken, toToken, amount, slippage, ...)
【持仓与执行】链上 DEX 兑换(写操作,需确认,动用真实资金):钱包地址自动取本人智能账户,不接受任意地址;大额授权需 approvalToken(由平台签发)。(cost: free)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"chain": {
"type": "string",
"description": "链短名,如 ETH / BSC / BASE / SOL(必填)"
},
"fromToken": {
"description": "卖出代币(地址或符号;原生币可留空)",
"type": "string"
},
"toToken": {
"type": "string",
"description": "买入代币(地址或符号,必填)"
},
"amount": {
"type": "string",
"description": "卖出数量(最小单位字符串,必填)"
},
"slippage": {
"description": "滑点百分比(可选,默认 1)",
"type": "number"
},
"amountUsd": {
"description": "本次金额 USD 估值(可选,用于大额授权校验)",
"type": "number"
},
"approvalToken": {
"description": "大额授权确认 token(可选,平台签发)",
"type": "string"
},
"reference": {
"description": "幂等参考号(可选)",
"type": "string"
}
},
"required": [
"chain",
"toToken",
"amount"
],
"$schema": "http://json-schema.org/draft-07/schema#"
}🔴platform_factory_run(sourceType, symbol, timeframe, intent, strategyId, ...)
【策略】发起策略工厂运行(写操作,需确认):sourceType=llm(描述生成)/search(条件扫描)/optimize(优化现有策略,需 strategyId)。同一用户同时只允许一个运行。(cost: base 5 + 10/1k bars(>10000 部分 5/1k) + 1/1k tokens credits)(写操作,外部调用将以 apikey 身份直接执行)
Input Schema
{
"type": "object",
"properties": {
"sourceType": {
"description": "运行类型(可选,默认 llm)",
"type": "string"
},
"symbol": {
"description": "交易对(可选,默认 BTC/USDT)",
"type": "string"
},
"timeframe": {
"description": "周期(可选)",
"type": "string"
},
"intent": {
"description": "自然语言意图(llm 模式用)",
"type": "string"
},
"strategyId": {
"description": "被优化的策略 ID(optimize 必填,支持 s:/t: 前缀)",
"type": "string"
},
"factorIds": {
"description": "条件 ID 列表(search 模式用)",
"type": "array",
"items": {}
},
"days": {
"description": "回测天数(可选)",
"type": "number"
},
"maxCandidates": {
"description": "候选上限(可选)",
"type": "number"
},
"nCandidates": {
"description": "生成候选数(llm 模式,可选)",
"type": "number"
},
"searchBudget": {
"description": "搜索预算(可选)",
"type": "number"
},
"thresholds": {
"description": "指标阈值(可选)",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}Community
Evidence