TraderAI
AI 图表分析实时图表仪表盘全部工具
价格方案
PRO
开发者 API
升级到专业版
登录创建账户
TraderAI/开发者 API/Developer API 文档

Developer API 文档

查找端点、保护密钥,并使用明确的积分上限完成集成。

打开控制台比较套餐OpenAPI 3.1

保护认证信息

在控制台创建密钥,并从服务器通过 Authorization: Bearer 或 X-API-Key 发送。不要将密钥放入 URL、公开的浏览器代码、分析系统或代码仓库。秘密值只显示一次,泄露后请立即撤销。

使用相同标识重试

执行前保存 Idempotency-Key,响应丢失时继续使用相同值。相同标识搭配不同输入会被拒绝。重放会检查当前权限,且不再次扣费。标识仍被保留但结果已过期时,不允许重新执行。结果不确定的操作需要先完成核对。

报价与支出上限

先获取报价,再携带 X-Max-Credits 执行。报价会过期,执行时会重新检查价格和权限。项目与密钥预算共享账户的额度和钱包,创建项目不会增加积分。批处理中成功的项目仍会扣费,失败项目请使用原标识重试。

正确理解缺失数据

蜡烛时间使用 UTC Unix 秒。指标的 null 表示预热数据不足或无法计算,不是零。缺失的成交量不同于实际观测到的零。相似度和形态质量不是盈利概率。没有对应时点的证据时,不支持历史 asOf。

七种传输方式使用同一规则

REST、GraphQL、JSON-RPC、MCP、顺序批处理、SSE 任务结果和 Socket.IO 共享认证与计费。即使 HTTP 200,也应检查各项或字段的错误。SSE 和 Socket.IO 返回任务结果,并非实时行情流。GraphQL 保留旧 JSON 数据并新增类型化查询。

TypeScript 与 Python

SDK 在有限重试中保持操作标识,遵守 Retry-After,并支持截止时间和取消。不要盲目重试输入、认证、权限或余额错误。认证信息应保存在服务器环境变量中。下方示例用于计算仓位大小。

cURL
curl -X POST https://traderai.cloud/api/v1/open/risk/position-size \
  -H "Authorization: Bearer $TRADERAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"accountBalance":10000,"riskPercent":1,"entryPrice":100,"stopLossPrice":95,"takeProfitPrice":110}'
Python
import os, requests

res = requests.post(
    "https://traderai.cloud/api/v1/open/risk/position-size",
    headers={"Authorization": f"Bearer {os.environ['TRADERAI_API_KEY']}"},
    json={"accountBalance": 10000, "riskPercent": 1, "entryPrice": 100, "stopLossPrice": 95},
    timeout=30,
)
print(res.json()["meta"]["creditsCharged"])

团队与数据权限

团队共享付款所有者的预付额度。添加成员、项目或密钥不会增加额度。

仅付款所有者可购买额度或查看自己的付款记录。成员可查看团队用量。

数据访问取决于已批准的来源权限、地区和用途。升级套餐不会自动获得再分发权。实时数据流暂未提供。

任务与 Webhook

使用 API 密钥运行任务。完成事件可发送至您的 HTTPS 端点。重新投递不会重新运行任务。

仅在您的应用发送已收盘 K 线时评估事件。没有新数据时不会继续实时监控。

POST /open/jobs
{ "endpoint": "risk.position-size", "input": { "accountBalance": 10000, "riskPercent": 1, "entryPrice": 100, "stopLossPrice": 95 }, "options": { "idempotencyKey": "my-job-1", "maxCredits": 10 } }

GET /open/jobs/{id}
GET /open/jobs/{id}/result
POST /open/jobs/{id}/cancel

POST /open/workflows
POST /open/workflows/{id}/run

POST /open/subscriptions
POST /open/subscriptions/{id}/push
GET /open/subscriptions/{id}/events?after=0&limit=20

端点参考

POST /open/indicators/compute每工作单位积分: 1 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One OHLCV bar. time = bar OPEN time in UTC seconds (or milliseconds; auto-detected). Ascending, unique.",
        "properties": {
          "time": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number",
            "description": "Optional. Required by volume studies."
          }
        },
        "required": [
          "time",
          "open",
          "high",
          "low",
          "close"
        ]
      },
      "minItems": 2,
      "maxItems": 5000
    },
    "indicators": {
      "type": "array",
      "minItems": 1,
      "maxItems": 10,
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Indicator id from GET /indicators."
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          },
          "key": {
            "type": "string",
            "maxLength": 40,
            "description": "Optional label echoed back."
          }
        },
        "required": [
          "id"
        ]
      }
    },
    "last": {
      "type": "number",
      "minimum": 1,
      "maximum": 5000,
      "description": "Return only the newest N points of each series."
    }
  },
  "required": [
    "candles",
    "indicators"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "integer",
      "minimum": 2
    },
    "indicators": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "family": {
            "type": "string"
          },
          "formulaVersion": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": true,
            "description": "Validated effective indicator parameters."
          },
          "outputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "points": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "time": {
                        "type": "number",
                        "description": "Bar OPEN time in UTC Unix seconds."
                      },
                      "value": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "description": "Indicator-native units. null means warm-up, a gap, or mathematically unavailable; never zero-fill."
                      }
                    },
                    "required": [
                      "time",
                      "value"
                    ],
                    "additionalProperties": true
                  }
                }
              },
              "required": [
                "id",
                "points"
              ],
              "additionalProperties": true
            }
          },
          "key": {
            "type": "string",
            "description": "Optional caller label."
          }
        },
        "required": [
          "id",
          "family",
          "formulaVersion",
          "params",
          "outputs"
        ],
        "additionalProperties": true
      }
    },
    "metadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "caller",
            "server"
          ]
        },
        "observedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "computedAt": {
          "type": "string",
          "description": "UTC ISO 8601 timestamp."
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "lastClosedBar": {
          "type": [
            "number",
            "null"
          ],
          "description": "Bar OPEN time in UTC Unix seconds."
        },
        "barPolicy": {
          "type": "string",
          "enum": [
            "closed",
            "caller-supplied"
          ]
        },
        "market": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestedSymbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "resolvedInstrument": {
          "type": "null"
        },
        "venue": {
          "type": "null"
        },
        "currency": {
          "type": "null"
        },
        "units": {
          "type": "object",
          "properties": {
            "time": {
              "type": "string",
              "enum": [
                "unix_seconds"
              ]
            },
            "prices": {
              "type": "string"
            },
            "volume": {
              "type": "string"
            }
          },
          "required": [
            "time",
            "prices",
            "volume"
          ],
          "additionalProperties": true
        },
        "volume": {
          "type": "object",
          "properties": {
            "missingBars": {
              "type": "number"
            },
            "zeroBars": {
              "type": "number"
            }
          },
          "required": [
            "missingBars",
            "zeroBars"
          ],
          "additionalProperties": true
        },
        "gaps": {
          "type": "object",
          "properties": {
            "assessed": {
              "type": "boolean"
            },
            "missingIntervals": {
              "type": [
                "number",
                "null"
              ]
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "after": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "before": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "missing": {
                    "type": "number"
                  }
                },
                "required": [
                  "after",
                  "before",
                  "missing"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "assessed",
            "missingIntervals",
            "ranges",
            "truncated"
          ],
          "additionalProperties": true
        },
        "stale": {
          "type": "null"
        },
        "delaySeconds": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "origin",
        "observedAt",
        "computedAt",
        "dataAsOf",
        "lastClosedBar",
        "barPolicy",
        "market",
        "requestedSymbol",
        "resolvedInstrument",
        "venue",
        "currency",
        "units",
        "volume",
        "gaps",
        "stale",
        "delaySeconds"
      ],
      "additionalProperties": true,
      "description": "Unknown instrument, venue, currency and stale status remain null until the adapter supplies verified evidence. observedAt is API observation time, not a provider publication timestamp."
    }
  },
  "required": [
    "candles",
    "indicators"
  ],
  "additionalProperties": true
}
POST /open/patterns/detect每工作单位积分: 2 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One OHLCV bar. time = bar OPEN time in UTC seconds (or milliseconds; auto-detected). Ascending, unique.",
        "properties": {
          "time": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number",
            "description": "Optional. Required by volume studies."
          }
        },
        "required": [
          "time",
          "open",
          "high",
          "low",
          "close"
        ]
      },
      "minItems": 2,
      "maxItems": 5000
    },
    "max": {
      "type": "number",
      "minimum": 1,
      "maximum": 50,
      "default": 10
    }
  },
  "required": [
    "candles"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "patterns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "label": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "descriptionKey": {
            "type": "string"
          },
          "bias": {
            "type": "string",
            "enum": [
              "bullish",
              "bearish",
              "neutral"
            ]
          },
          "strength": {
            "type": "string",
            "enum": [
              "strong",
              "moderate",
              "weak"
            ]
          },
          "candleIndex": {
            "type": "integer",
            "minimum": 0
          },
          "time": {
            "type": "number",
            "description": "Bar OPEN time in UTC Unix seconds."
          },
          "price": {
            "type": "number",
            "description": "Chart annotation price, not an executable quote."
          }
        },
        "required": [
          "id",
          "label",
          "description",
          "descriptionKey",
          "bias",
          "strength",
          "candleIndex",
          "time",
          "price"
        ],
        "additionalProperties": true
      },
      "description": "Empty array means no detected pattern, not a request failure."
    },
    "note": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "caller",
            "server"
          ]
        },
        "observedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "computedAt": {
          "type": "string",
          "description": "UTC ISO 8601 timestamp."
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "lastClosedBar": {
          "type": [
            "number",
            "null"
          ],
          "description": "Bar OPEN time in UTC Unix seconds."
        },
        "barPolicy": {
          "type": "string",
          "enum": [
            "closed",
            "caller-supplied"
          ]
        },
        "market": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestedSymbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "resolvedInstrument": {
          "type": "null"
        },
        "venue": {
          "type": "null"
        },
        "currency": {
          "type": "null"
        },
        "units": {
          "type": "object",
          "properties": {
            "time": {
              "type": "string",
              "enum": [
                "unix_seconds"
              ]
            },
            "prices": {
              "type": "string"
            },
            "volume": {
              "type": "string"
            }
          },
          "required": [
            "time",
            "prices",
            "volume"
          ],
          "additionalProperties": true
        },
        "volume": {
          "type": "object",
          "properties": {
            "missingBars": {
              "type": "number"
            },
            "zeroBars": {
              "type": "number"
            }
          },
          "required": [
            "missingBars",
            "zeroBars"
          ],
          "additionalProperties": true
        },
        "gaps": {
          "type": "object",
          "properties": {
            "assessed": {
              "type": "boolean"
            },
            "missingIntervals": {
              "type": [
                "number",
                "null"
              ]
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "after": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "before": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "missing": {
                    "type": "number"
                  }
                },
                "required": [
                  "after",
                  "before",
                  "missing"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "assessed",
            "missingIntervals",
            "ranges",
            "truncated"
          ],
          "additionalProperties": true
        },
        "stale": {
          "type": "null"
        },
        "delaySeconds": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "origin",
        "observedAt",
        "computedAt",
        "dataAsOf",
        "lastClosedBar",
        "barPolicy",
        "market",
        "requestedSymbol",
        "resolvedInstrument",
        "venue",
        "currency",
        "units",
        "volume",
        "gaps",
        "stale",
        "delaySeconds"
      ],
      "additionalProperties": true,
      "description": "Unknown instrument, venue, currency and stale status remain null until the adapter supplies verified evidence. observedAt is API observation time, not a provider publication timestamp."
    }
  },
  "required": [
    "patterns",
    "note"
  ],
  "additionalProperties": true
}
POST /open/risk/position-size每工作单位积分: 1 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {
    "accountBalance": {
      "type": "number",
      "minimum": 0
    },
    "riskPercent": {
      "type": "number",
      "minimum": 0,
      "maximum": 100
    },
    "entryPrice": {
      "type": "number"
    },
    "stopLossPrice": {
      "type": "number"
    },
    "takeProfitPrice": {
      "type": "number"
    },
    "leverage": {
      "type": "number",
      "minimum": 1,
      "maximum": 200,
      "default": 1
    }
  },
  "required": [
    "accountBalance",
    "riskPercent",
    "entryPrice",
    "stopLossPrice"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "direction": {
      "type": "string",
      "enum": [
        "long",
        "short"
      ]
    },
    "riskAmount": {
      "type": "number"
    },
    "quantity": {
      "type": "number"
    },
    "notional": {
      "type": "number"
    },
    "marginRequired": {
      "type": "number"
    },
    "stopDistance": {
      "type": "number"
    },
    "stopDistancePercent": {
      "type": [
        "number",
        "null"
      ],
      "description": "Percent of entry price."
    },
    "rewardRisk": {
      "type": [
        "number",
        "null"
      ],
      "description": "Dimensionless reward/risk ratio; null without a target."
    },
    "potentialProfit": {
      "type": [
        "number",
        "null"
      ],
      "description": "Account/quote currency; excludes fees, slippage and contract multipliers."
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "direction",
    "riskAmount",
    "quantity",
    "notional",
    "marginRequired",
    "stopDistance",
    "stopDistancePercent",
    "rewardRisk",
    "potentialProfit",
    "note"
  ],
  "additionalProperties": true,
  "description": "Quantity is base asset units. Monetary numbers are calculated IEEE-754 estimates, not venue fills or payment amounts."
}
POST /open/volatility/forecast每工作单位积分: 2 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One OHLCV bar. time = bar OPEN time in UTC seconds (or milliseconds; auto-detected). Ascending, unique.",
        "properties": {
          "time": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number",
            "description": "Optional. Required by volume studies."
          }
        },
        "required": [
          "time",
          "open",
          "high",
          "low",
          "close"
        ]
      },
      "minItems": 2,
      "maxItems": 5000
    }
  },
  "required": [
    "candles"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "model": {
      "type": "string"
    },
    "lastClose": {
      "type": "number"
    },
    "sigmaPercent": {
      "type": "number",
      "description": "Expected next-bar move in percent; not direction."
    },
    "range68": {
      "type": "object",
      "properties": {
        "lower": {
          "type": "number"
        },
        "upper": {
          "type": "number"
        }
      },
      "required": [
        "lower",
        "upper"
      ],
      "additionalProperties": true
    },
    "range95": {
      "type": "object",
      "properties": {
        "lower": {
          "type": "number"
        },
        "upper": {
          "type": "number"
        }
      },
      "required": [
        "lower",
        "upper"
      ],
      "additionalProperties": true
    },
    "note": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "caller",
            "server"
          ]
        },
        "observedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "computedAt": {
          "type": "string",
          "description": "UTC ISO 8601 timestamp."
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "lastClosedBar": {
          "type": [
            "number",
            "null"
          ],
          "description": "Bar OPEN time in UTC Unix seconds."
        },
        "barPolicy": {
          "type": "string",
          "enum": [
            "closed",
            "caller-supplied"
          ]
        },
        "market": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestedSymbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "resolvedInstrument": {
          "type": "null"
        },
        "venue": {
          "type": "null"
        },
        "currency": {
          "type": "null"
        },
        "units": {
          "type": "object",
          "properties": {
            "time": {
              "type": "string",
              "enum": [
                "unix_seconds"
              ]
            },
            "prices": {
              "type": "string"
            },
            "volume": {
              "type": "string"
            }
          },
          "required": [
            "time",
            "prices",
            "volume"
          ],
          "additionalProperties": true
        },
        "volume": {
          "type": "object",
          "properties": {
            "missingBars": {
              "type": "number"
            },
            "zeroBars": {
              "type": "number"
            }
          },
          "required": [
            "missingBars",
            "zeroBars"
          ],
          "additionalProperties": true
        },
        "gaps": {
          "type": "object",
          "properties": {
            "assessed": {
              "type": "boolean"
            },
            "missingIntervals": {
              "type": [
                "number",
                "null"
              ]
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "after": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "before": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "missing": {
                    "type": "number"
                  }
                },
                "required": [
                  "after",
                  "before",
                  "missing"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "assessed",
            "missingIntervals",
            "ranges",
            "truncated"
          ],
          "additionalProperties": true
        },
        "stale": {
          "type": "null"
        },
        "delaySeconds": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "origin",
        "observedAt",
        "computedAt",
        "dataAsOf",
        "lastClosedBar",
        "barPolicy",
        "market",
        "requestedSymbol",
        "resolvedInstrument",
        "venue",
        "currency",
        "units",
        "volume",
        "gaps",
        "stale",
        "delaySeconds"
      ],
      "additionalProperties": true,
      "description": "Unknown instrument, venue, currency and stale status remain null until the adapter supplies verified evidence. observedAt is API observation time, not a provider publication timestamp."
    }
  },
  "required": [
    "model",
    "lastClose",
    "sigmaPercent",
    "range68",
    "range95",
    "note"
  ],
  "additionalProperties": true
}
POST /open/analogs/search每工作单位积分: 10 · 最低套餐: starter

输入结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One OHLCV bar. time = bar OPEN time in UTC seconds (or milliseconds; auto-detected). Ascending, unique.",
        "properties": {
          "time": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number",
            "description": "Optional. Required by volume studies."
          }
        },
        "required": [
          "time",
          "open",
          "high",
          "low",
          "close"
        ]
      },
      "minItems": 2,
      "maxItems": 20000
    },
    "intervalSec": {
      "type": "number",
      "minimum": 60,
      "maximum": 604800
    },
    "window": {
      "type": "number",
      "enum": [
        20,
        30,
        50,
        100
      ],
      "default": 30
    },
    "limit": {
      "type": "number",
      "minimum": 1,
      "maximum": 20,
      "default": 10
    }
  },
  "required": [
    "candles",
    "intervalSec"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "methodVersion": {
      "type": "string"
    },
    "intervalSec": {
      "type": "number"
    },
    "window": {
      "type": "number"
    },
    "horizons": {
      "type": "array",
      "items": {
        "type": "number"
      }
    },
    "query": {
      "type": "object",
      "properties": {
        "startTime": {
          "type": "number"
        },
        "endTime": {
          "type": "number"
        },
        "close": {
          "type": "number"
        },
        "features": {
          "type": "object",
          "properties": {
            "rsi": {
              "type": "number"
            },
            "atrPct": {
              "type": "number"
            },
            "rangePos": {
              "type": "number"
            },
            "rsiZone": {
              "type": "string",
              "enum": [
                "oversold",
                "neutral",
                "overbought"
              ]
            },
            "trendAtr": {
              "type": [
                "number",
                "null"
              ]
            },
            "trend": {
              "type": [
                "string",
                "null"
              ]
            },
            "fundingRate": {
              "type": [
                "number",
                "null"
              ]
            }
          },
          "required": [
            "rsi",
            "atrPct",
            "rangePos",
            "rsiZone",
            "trendAtr",
            "trend",
            "fundingRate"
          ],
          "additionalProperties": true
        },
        "path": {
          "type": "array",
          "items": {
            "type": "number"
          }
        }
      },
      "required": [
        "startTime",
        "endTime",
        "close",
        "features",
        "path"
      ],
      "additionalProperties": true
    },
    "matches": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "rank": {
            "type": "number"
          },
          "startTime": {
            "type": "number"
          },
          "endTime": {
            "type": "number"
          },
          "similarity": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "features": {
            "type": "object",
            "properties": {
              "rsi": {
                "type": "number"
              },
              "atrPct": {
                "type": "number"
              },
              "rangePos": {
                "type": "number"
              },
              "rsiZone": {
                "type": "string",
                "enum": [
                  "oversold",
                  "neutral",
                  "overbought"
                ]
              },
              "trendAtr": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "trend": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "fundingRate": {
                "type": [
                  "number",
                  "null"
                ]
              }
            },
            "required": [
              "rsi",
              "atrPct",
              "rangePos",
              "rsiZone",
              "trendAtr",
              "trend",
              "fundingRate"
            ],
            "additionalProperties": true
          },
          "outcomes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "horizon": {
                  "type": "number"
                },
                "returnPct": {
                  "type": "number"
                },
                "maePct": {
                  "type": "number"
                },
                "mfePct": {
                  "type": "number"
                }
              },
              "required": [
                "horizon",
                "returnPct",
                "maePct",
                "mfePct"
              ],
              "additionalProperties": true
            }
          },
          "path": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "forward": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "rank",
          "startTime",
          "endTime",
          "similarity",
          "close",
          "features",
          "outcomes",
          "path",
          "forward"
        ],
        "additionalProperties": true
      }
    },
    "stats": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "horizon": {
            "type": "number"
          },
          "sample": {
            "type": "number"
          },
          "medianPct": {
            "type": "number"
          },
          "p25Pct": {
            "type": "number"
          },
          "p75Pct": {
            "type": "number"
          },
          "meanPct": {
            "type": "number"
          },
          "upPct": {
            "type": "number"
          },
          "worstReturnPct": {
            "type": "number"
          },
          "bestReturnPct": {
            "type": "number"
          },
          "worstDrawdownPct": {
            "type": "number"
          },
          "bestRunupPct": {
            "type": "number"
          }
        },
        "required": [
          "horizon",
          "sample",
          "medianPct",
          "p25Pct",
          "p75Pct",
          "meanPct",
          "upPct",
          "worstReturnPct",
          "bestReturnPct",
          "worstDrawdownPct",
          "bestRunupPct"
        ],
        "additionalProperties": true
      }
    },
    "coverage": {
      "type": "object",
      "properties": {
        "bars": {
          "type": "number"
        },
        "firstTime": {
          "type": "number"
        },
        "lastTime": {
          "type": "number"
        },
        "candidates": {
          "type": "number"
        },
        "eligible": {
          "type": "number"
        }
      },
      "required": [
        "bars",
        "firstTime",
        "lastTime",
        "candidates",
        "eligible"
      ],
      "additionalProperties": true
    },
    "fundingUsed": {
      "type": "boolean"
    },
    "fundingCoverage": {
      "type": "number"
    },
    "unavailable": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "insufficient_history",
        "flat_window",
        "no_candidates",
        null
      ]
    },
    "note": {
      "type": "string"
    },
    "metadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "caller",
            "server"
          ]
        },
        "observedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "computedAt": {
          "type": "string",
          "description": "UTC ISO 8601 timestamp."
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "lastClosedBar": {
          "type": [
            "number",
            "null"
          ],
          "description": "Bar OPEN time in UTC Unix seconds."
        },
        "barPolicy": {
          "type": "string",
          "enum": [
            "closed",
            "caller-supplied"
          ]
        },
        "market": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestedSymbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "resolvedInstrument": {
          "type": "null"
        },
        "venue": {
          "type": "null"
        },
        "currency": {
          "type": "null"
        },
        "units": {
          "type": "object",
          "properties": {
            "time": {
              "type": "string",
              "enum": [
                "unix_seconds"
              ]
            },
            "prices": {
              "type": "string"
            },
            "volume": {
              "type": "string"
            }
          },
          "required": [
            "time",
            "prices",
            "volume"
          ],
          "additionalProperties": true
        },
        "volume": {
          "type": "object",
          "properties": {
            "missingBars": {
              "type": "number"
            },
            "zeroBars": {
              "type": "number"
            }
          },
          "required": [
            "missingBars",
            "zeroBars"
          ],
          "additionalProperties": true
        },
        "gaps": {
          "type": "object",
          "properties": {
            "assessed": {
              "type": "boolean"
            },
            "missingIntervals": {
              "type": [
                "number",
                "null"
              ]
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "after": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "before": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "missing": {
                    "type": "number"
                  }
                },
                "required": [
                  "after",
                  "before",
                  "missing"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "assessed",
            "missingIntervals",
            "ranges",
            "truncated"
          ],
          "additionalProperties": true
        },
        "stale": {
          "type": "null"
        },
        "delaySeconds": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "origin",
        "observedAt",
        "computedAt",
        "dataAsOf",
        "lastClosedBar",
        "barPolicy",
        "market",
        "requestedSymbol",
        "resolvedInstrument",
        "venue",
        "currency",
        "units",
        "volume",
        "gaps",
        "stale",
        "delaySeconds"
      ],
      "additionalProperties": true,
      "description": "Unknown instrument, venue, currency and stale status remain null until the adapter supplies verified evidence. observedAt is API observation time, not a provider publication timestamp."
    }
  },
  "required": [
    "methodVersion",
    "intervalSec",
    "window",
    "horizons",
    "query",
    "matches",
    "stats",
    "coverage",
    "fundingUsed",
    "fundingCoverage",
    "unavailable",
    "note"
  ],
  "additionalProperties": true,
  "description": "Similarity is a distance score, not a probability. Inspect unavailable even on HTTP 200."
}
POST /open/backtest/run每工作单位积分: 25 · 最低套餐: starter

输入结构

{
  "type": "object",
  "properties": {
    "candles": {
      "type": "array",
      "items": {
        "type": "object",
        "description": "One OHLCV bar. time = bar OPEN time in UTC seconds (or milliseconds; auto-detected). Ascending, unique.",
        "properties": {
          "time": {
            "type": "number"
          },
          "open": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          },
          "close": {
            "type": "number"
          },
          "volume": {
            "type": "number",
            "description": "Optional. Required by volume studies."
          }
        },
        "required": [
          "time",
          "open",
          "high",
          "low",
          "close"
        ]
      },
      "minItems": 2,
      "maxItems": 20000
    },
    "strategy": {
      "type": "object",
      "description": "Same strategy object as the TraderAI backtester: initialCapital, indicators, entryConditions, exitCondition, positionSizing, tradingCost.",
      "additionalProperties": true
    }
  },
  "required": [
    "candles",
    "strategy"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "result": {
      "type": "object",
      "properties": {
        "metrics": {
          "type": "object",
          "properties": {
            "totalTrades": {
              "type": "number"
            },
            "winningTrades": {
              "type": "number"
            },
            "losingTrades": {
              "type": "number"
            },
            "winRate": {
              "type": "number"
            },
            "totalPnlPct": {
              "type": "number"
            },
            "totalPnlAbs": {
              "type": "number"
            },
            "profitFactor": {
              "type": "number"
            },
            "maxDrawdownPct": {
              "type": "number"
            },
            "sharpeRatio": {
              "type": "number"
            },
            "sortino": {
              "type": "number"
            },
            "avgWinPct": {
              "type": "number"
            },
            "avgLossPct": {
              "type": "number"
            },
            "avgRR": {
              "type": "number"
            },
            "expectancy": {
              "type": "number"
            },
            "initialCapital": {
              "type": "number"
            },
            "finalCapital": {
              "type": "number"
            },
            "equity": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "time": {
                    "type": "string",
                    "description": "UTC ISO 8601 timestamp."
                  },
                  "equity": {
                    "type": "number"
                  }
                },
                "required": [
                  "time",
                  "equity"
                ],
                "additionalProperties": true
              }
            },
            "monthlyPnl": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "month": {
                    "type": "string"
                  },
                  "pnl": {
                    "type": "number"
                  }
                },
                "required": [
                  "month",
                  "pnl"
                ],
                "additionalProperties": true
              }
            },
            "costs": {
              "type": "object",
              "properties": {
                "commission": {
                  "type": "number"
                },
                "slippage": {
                  "type": "number"
                },
                "funding": {
                  "type": "number"
                },
                "total": {
                  "type": "number"
                },
                "totalPctOfCapital": {
                  "type": "number"
                },
                "grossPnlAbs": {
                  "type": "number"
                }
              },
              "required": [
                "commission",
                "slippage",
                "funding",
                "total",
                "totalPctOfCapital",
                "grossPnlAbs"
              ],
              "additionalProperties": true
            },
            "costConfig": {
              "type": "object",
              "properties": {
                "commissionPct": {
                  "type": "number"
                },
                "slippagePct": {
                  "type": "number"
                },
                "fundingRatePct": {
                  "type": "number"
                },
                "fundingIntervalHours": {
                  "type": "number"
                }
              },
              "required": [
                "commissionPct",
                "slippagePct",
                "fundingRatePct",
                "fundingIntervalHours"
              ],
              "additionalProperties": true
            },
            "skippedEntries": {
              "type": "number"
            },
            "coverage": {
              "type": "object",
              "properties": {
                "continuousClosedBars": {
                  "type": "boolean"
                },
                "barsAnalyzed": {
                  "type": "number"
                },
                "barsRequested": {
                  "type": "number"
                },
                "truncated": {
                  "type": "boolean"
                },
                "actualDateFrom": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "UTC ISO 8601 timestamp."
                },
                "actualDateTo": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "UTC ISO 8601 timestamp."
                }
              },
              "required": [
                "barsAnalyzed",
                "barsRequested",
                "truncated",
                "actualDateFrom",
                "actualDateTo"
              ],
              "additionalProperties": true
            }
          },
          "required": [
            "totalTrades",
            "winningTrades",
            "losingTrades",
            "winRate",
            "totalPnlPct",
            "totalPnlAbs",
            "profitFactor",
            "maxDrawdownPct",
            "sharpeRatio",
            "sortino",
            "avgWinPct",
            "avgLossPct",
            "avgRR",
            "expectancy",
            "initialCapital",
            "finalCapital",
            "equity",
            "monthlyPnl"
          ],
          "additionalProperties": true,
          "description": "Calculated engine metrics in account currency/percent. Profit factor 999 is the existing no-loss sentinel, not an observed finite return. Optional cost/coverage blocks absent means unavailable, not zero."
        },
        "trades": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "entryTime": {
                "type": "string",
                "description": "UTC ISO 8601 timestamp."
              },
              "exitTime": {
                "type": "string",
                "description": "UTC ISO 8601 timestamp."
              },
              "direction": {
                "type": "string",
                "enum": [
                  "long",
                  "short"
                ]
              },
              "entryPrice": {
                "type": "number"
              },
              "exitPrice": {
                "type": "number"
              },
              "pnlPct": {
                "type": "number"
              },
              "pnlAbs": {
                "type": "number"
              },
              "rr": {
                "type": "number"
              },
              "grossPnlAbs": {
                "type": "number"
              },
              "exitReason": {
                "type": "string",
                "enum": [
                  "tp",
                  "sl",
                  "trailing",
                  "max_bars",
                  "eod",
                  "rule"
                ]
              },
              "costs": {
                "type": "object",
                "additionalProperties": true,
                "description": "Commission, slippage and funding breakdown in account currency."
              }
            },
            "required": [
              "entryTime",
              "exitTime",
              "direction",
              "entryPrice",
              "exitPrice",
              "pnlPct",
              "pnlAbs",
              "rr",
              "exitReason"
            ],
            "additionalProperties": true
          }
        },
        "ruleEvidence": {
          "type": "object",
          "additionalProperties": true,
          "description": "Versioned condition-tree evidence, present only when a rule was evaluated. This extension remains JSON for compatibility."
        }
      },
      "required": [
        "metrics",
        "trades"
      ],
      "additionalProperties": true
    },
    "bars": {
      "type": "integer"
    },
    "costModel": {
      "type": "object",
      "properties": {
        "commissionPct": {
          "type": "number"
        },
        "slippagePct": {
          "type": "number"
        },
        "fundingRatePct": {
          "type": "number"
        },
        "fundingIntervalHours": {
          "type": "number"
        }
      },
      "required": [
        "commissionPct",
        "slippagePct",
        "fundingRatePct",
        "fundingIntervalHours"
      ],
      "additionalProperties": true
    },
    "metadata": {
      "type": "object",
      "properties": {
        "version": {
          "type": "string"
        },
        "origin": {
          "type": "string",
          "enum": [
            "caller",
            "server"
          ]
        },
        "observedAt": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "computedAt": {
          "type": "string",
          "description": "UTC ISO 8601 timestamp."
        },
        "dataAsOf": {
          "type": [
            "string",
            "null"
          ],
          "description": "UTC ISO 8601 timestamp."
        },
        "lastClosedBar": {
          "type": [
            "number",
            "null"
          ],
          "description": "Bar OPEN time in UTC Unix seconds."
        },
        "barPolicy": {
          "type": "string",
          "enum": [
            "closed",
            "caller-supplied"
          ]
        },
        "market": {
          "type": [
            "string",
            "null"
          ]
        },
        "requestedSymbol": {
          "type": [
            "string",
            "null"
          ]
        },
        "resolvedInstrument": {
          "type": "null"
        },
        "venue": {
          "type": "null"
        },
        "currency": {
          "type": "null"
        },
        "units": {
          "type": "object",
          "properties": {
            "time": {
              "type": "string",
              "enum": [
                "unix_seconds"
              ]
            },
            "prices": {
              "type": "string"
            },
            "volume": {
              "type": "string"
            }
          },
          "required": [
            "time",
            "prices",
            "volume"
          ],
          "additionalProperties": true
        },
        "volume": {
          "type": "object",
          "properties": {
            "missingBars": {
              "type": "number"
            },
            "zeroBars": {
              "type": "number"
            }
          },
          "required": [
            "missingBars",
            "zeroBars"
          ],
          "additionalProperties": true
        },
        "gaps": {
          "type": "object",
          "properties": {
            "assessed": {
              "type": "boolean"
            },
            "missingIntervals": {
              "type": [
                "number",
                "null"
              ]
            },
            "ranges": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "after": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "before": {
                    "type": "number",
                    "description": "Bar OPEN time in UTC Unix seconds."
                  },
                  "missing": {
                    "type": "number"
                  }
                },
                "required": [
                  "after",
                  "before",
                  "missing"
                ],
                "additionalProperties": true
              }
            },
            "truncated": {
              "type": "boolean"
            }
          },
          "required": [
            "assessed",
            "missingIntervals",
            "ranges",
            "truncated"
          ],
          "additionalProperties": true
        },
        "stale": {
          "type": "null"
        },
        "delaySeconds": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "version",
        "origin",
        "observedAt",
        "computedAt",
        "dataAsOf",
        "lastClosedBar",
        "barPolicy",
        "market",
        "requestedSymbol",
        "resolvedInstrument",
        "venue",
        "currency",
        "units",
        "volume",
        "gaps",
        "stale",
        "delaySeconds"
      ],
      "additionalProperties": true,
      "description": "Unknown instrument, venue, currency and stale status remain null until the adapter supplies verified evidence. observedAt is API observation time, not a provider publication timestamp."
    }
  },
  "required": [
    "result",
    "bars",
    "costModel"
  ],
  "additionalProperties": true
}
POST /open/ai/chart-analysis每工作单位积分: 500 · 最低套餐: builder

输入结构

{
  "type": "object",
  "properties": {
    "image": {
      "type": "string",
      "description": "Base64 PNG/JPEG/WebP (data URL or raw base64), max 4 MB."
    },
    "market": {
      "type": "string",
      "enum": [
        "crypto",
        "forex",
        "stocks"
      ],
      "default": "crypto"
    },
    "timeframe": {
      "type": "string",
      "maxLength": 8
    },
    "locale": {
      "type": "string",
      "maxLength": 5,
      "default": "en"
    }
  },
  "required": [
    "image"
  ]
}

响应结构

{
  "type": "object",
  "properties": {
    "analysis": {
      "type": "object",
      "properties": {
        "patterns": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "trend": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "critique": {
          "type": "string"
        },
        "confidence": {
          "type": "string"
        },
        "marketBias": {
          "type": "string"
        },
        "recommendation": {
          "type": "string"
        },
        "reasoning": {
          "type": "string"
        },
        "ticker": {
          "type": "string"
        },
        "volumeAnalysis": {
          "type": "string"
        },
        "macroContext": {
          "type": "string"
        },
        "cautionNote": {
          "type": "string"
        },
        "direction": {
          "type": "string",
          "enum": [
            "long",
            "short",
            "none"
          ]
        },
        "entry": {
          "type": "number"
        },
        "stopLoss": {
          "type": "number"
        },
        "takeProfit": {
          "type": "number"
        },
        "riskReward": {
          "type": "number"
        },
        "keyLevels": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tradePlan": {
          "type": "object",
          "properties": {
            "entryCondition": {
              "type": "string"
            },
            "slReason": {
              "type": "string"
            },
            "tp1Note": {
              "type": "string"
            },
            "tp1Size": {
              "type": "string"
            },
            "tp2Note": {
              "type": "string"
            },
            "tp2Size": {
              "type": "string"
            },
            "breakeven": {
              "type": "string"
            },
            "invalidation": {
              "type": "string"
            },
            "takeProfit1": {
              "type": "number"
            },
            "takeProfit2": {
              "type": "number"
            }
          },
          "required": [
            "entryCondition",
            "slReason",
            "tp1Note",
            "tp1Size",
            "tp2Note",
            "tp2Size",
            "breakeven",
            "invalidation",
            "takeProfit1",
            "takeProfit2"
          ],
          "additionalProperties": true
        },
        "pricePlan": {
          "type": "object",
          "additionalProperties": true,
          "description": "Canonical validated price plan, when available; legacy scalar prices remain aliases."
        },
        "setupScore": {
          "type": "object",
          "additionalProperties": true,
          "description": "Technical quality grade. Not a probability of profit."
        },
        "leverageAnalysis": {
          "type": "object",
          "properties": {
            "leverageVerdict": {
              "type": "string"
            },
            "suggestedLeverage": {
              "type": "string"
            },
            "liquidationRisk": {
              "type": "string"
            },
            "costNote": {
              "type": "string"
            },
            "advice": {
              "type": "string"
            }
          },
          "required": [
            "leverageVerdict",
            "suggestedLeverage",
            "liquidationRisk",
            "costNote",
            "advice"
          ],
          "additionalProperties": true
        },
        "advisories": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true,
            "description": "Deterministic advisory code and supporting numeric evidence."
          }
        },
        "textEncodingIssue": {
          "type": "boolean"
        }
      },
      "required": [
        "patterns",
        "trend",
        "direction",
        "entry",
        "stopLoss",
        "takeProfit",
        "riskReward",
        "summary",
        "critique",
        "confidence"
      ],
      "additionalProperties": true
    },
    "note": {
      "type": "string"
    }
  },
  "required": [
    "analysis",
    "note"
  ],
  "additionalProperties": true,
  "description": "AI analysis may have direction=none or a cautionNote; neither constitutes an execution recommendation."
}
GET /open/track-record/patterns每工作单位积分: 1 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {}
}

响应结构

{
  "type": "object",
  "properties": {
    "patterns": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "market": {
            "type": "string"
          },
          "patternId": {
            "type": "string"
          },
          "bias": {
            "type": "string"
          },
          "firstDate": {
            "type": "string"
          },
          "lastDate": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "wins": {
            "type": "number"
          },
          "winRatePct": {
            "type": "number"
          },
          "avgEdgePct": {
            "type": "number"
          },
          "baselinePct": {
            "type": "number"
          },
          "edgeVsBaselinePct": {
            "type": "number"
          }
        },
        "required": [
          "market",
          "patternId",
          "bias",
          "firstDate",
          "lastDate",
          "total",
          "wins",
          "winRatePct",
          "avgEdgePct",
          "baselinePct",
          "edgeVsBaselinePct"
        ],
        "additionalProperties": true
      },
      "description": "Empty until recorded observations exist. Percent fields use 0..100."
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "version",
        "computedAt",
        "source",
        "status",
        "modelVersion",
        "promptVersion",
        "cohorts",
        "limitations"
      ],
      "properties": {
        "version": {
          "type": "string"
        },
        "computedAt": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "enum": [
            "recorded_pattern_outcomes",
            "recorded_volatility_forecasts"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "empty",
            "incomplete"
          ]
        },
        "modelVersion": {
          "type": "null"
        },
        "promptVersion": {
          "type": "null"
        },
        "cohorts": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "market",
              "key",
              "bias",
              "sampleSize",
              "period",
              "baseline",
              "outcomes"
            ],
            "properties": {
              "market": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "bias": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sampleSize": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "period": {
                "type": [
                  "object",
                  "null"
                ],
                "required": [
                  "firstDate",
                  "lastDate",
                  "dateBasis"
                ],
                "properties": {
                  "firstDate": {
                    "type": "string"
                  },
                  "lastDate": {
                    "type": "string"
                  },
                  "dateBasis": {
                    "type": "string",
                    "enum": [
                      "pattern_entry_date_utc",
                      "forecast_date_utc"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "baseline": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "valuePct",
                  "sampleSize",
                  "period",
                  "uncertainty"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "resolved_pattern_occurrence_pool_bias_adjusted",
                      "nominal_model_coverage"
                    ]
                  },
                  "valuePct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "sampleSize": {
                    "type": "null"
                  },
                  "period": {
                    "type": "null"
                  },
                  "uncertainty": {
                    "type": "null"
                  }
                }
              },
              "outcomes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "metric",
                    "successes",
                    "ratePct",
                    "nominalCoveragePct",
                    "uncertainty"
                  ],
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "directional_win",
                        "within_68_band",
                        "within_95_band"
                      ]
                    },
                    "successes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "ratePct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "nominalCoveragePct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "uncertainty": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "method",
                        "confidenceLevel",
                        "lowerPct",
                        "upperPct",
                        "interpretation"
                      ],
                      "properties": {
                        "method": {
                          "type": "string",
                          "enum": [
                            "wilson_score"
                          ]
                        },
                        "confidenceLevel": {
                          "type": "number"
                        },
                        "lowerPct": {
                          "type": "number"
                        },
                        "upperPct": {
                          "type": "number"
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "descriptive_binomial_interval_not_independence_adjusted"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "patterns"
  ],
  "additionalProperties": true
}
GET /open/track-record/volatility每工作单位积分: 1 · 最低套餐: free

输入结构

{
  "type": "object",
  "properties": {}
}

响应结构

{
  "type": "object",
  "properties": {
    "symbols": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "market": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "firstDate": {
            "type": "string"
          },
          "lastDate": {
            "type": "string"
          },
          "total": {
            "type": "number"
          },
          "hit68": {
            "type": "number"
          },
          "hit95": {
            "type": "number"
          },
          "hit68Pct": {
            "type": "number"
          },
          "hit95Pct": {
            "type": "number"
          },
          "avgForecastPct": {
            "type": "number"
          },
          "avgActualPct": {
            "type": "number"
          }
        },
        "required": [
          "market",
          "symbol",
          "firstDate",
          "lastDate",
          "total",
          "hit68",
          "hit95",
          "hit68Pct",
          "hit95Pct",
          "avgForecastPct",
          "avgActualPct"
        ],
        "additionalProperties": true
      },
      "description": "Recorded observations only. Empty does not imply perfect calibration."
    },
    "evidence": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "version",
        "computedAt",
        "source",
        "status",
        "modelVersion",
        "promptVersion",
        "cohorts",
        "limitations"
      ],
      "properties": {
        "version": {
          "type": "string"
        },
        "computedAt": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "enum": [
            "recorded_pattern_outcomes",
            "recorded_volatility_forecasts"
          ]
        },
        "status": {
          "type": "string",
          "enum": [
            "available",
            "empty",
            "incomplete"
          ]
        },
        "modelVersion": {
          "type": "null"
        },
        "promptVersion": {
          "type": "null"
        },
        "cohorts": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "market",
              "key",
              "bias",
              "sampleSize",
              "period",
              "baseline",
              "outcomes"
            ],
            "properties": {
              "market": {
                "type": "string"
              },
              "key": {
                "type": "string"
              },
              "bias": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sampleSize": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "period": {
                "type": [
                  "object",
                  "null"
                ],
                "required": [
                  "firstDate",
                  "lastDate",
                  "dateBasis"
                ],
                "properties": {
                  "firstDate": {
                    "type": "string"
                  },
                  "lastDate": {
                    "type": "string"
                  },
                  "dateBasis": {
                    "type": "string",
                    "enum": [
                      "pattern_entry_date_utc",
                      "forecast_date_utc"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "baseline": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "kind",
                  "valuePct",
                  "sampleSize",
                  "period",
                  "uncertainty"
                ],
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "resolved_pattern_occurrence_pool_bias_adjusted",
                      "nominal_model_coverage"
                    ]
                  },
                  "valuePct": {
                    "type": [
                      "number",
                      "null"
                    ]
                  },
                  "sampleSize": {
                    "type": "null"
                  },
                  "period": {
                    "type": "null"
                  },
                  "uncertainty": {
                    "type": "null"
                  }
                }
              },
              "outcomes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "metric",
                    "successes",
                    "ratePct",
                    "nominalCoveragePct",
                    "uncertainty"
                  ],
                  "properties": {
                    "metric": {
                      "type": "string",
                      "enum": [
                        "directional_win",
                        "within_68_band",
                        "within_95_band"
                      ]
                    },
                    "successes": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "minimum": 0
                    },
                    "ratePct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "nominalCoveragePct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "uncertainty": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "required": [
                        "method",
                        "confidenceLevel",
                        "lowerPct",
                        "upperPct",
                        "interpretation"
                      ],
                      "properties": {
                        "method": {
                          "type": "string",
                          "enum": [
                            "wilson_score"
                          ]
                        },
                        "confidenceLevel": {
                          "type": "number"
                        },
                        "lowerPct": {
                          "type": "number"
                        },
                        "upperPct": {
                          "type": "number"
                        },
                        "interpretation": {
                          "type": "string",
                          "enum": [
                            "descriptive_binomial_interval_not_independence_adjusted"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                }
              }
            }
          }
        },
        "limitations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "required": [
    "symbols"
  ],
  "additionalProperties": true
}

兼容性与更新

结构版本 devapi-2026-11-14.1 新增操作控制、响应结构和类型化 GraphQL 查询。现有 v1 字段继续可用。计算公式版本独立管理。更新生成的客户端前,请先检查已发布的结构。