list_strategies
Discover macro-factor quantitative trading strategies with forward-tracked performance data for US and China markets. View strategy names, market coverage, total returns, drawdowns, Sharpe ratios, and recent performance metrics.
Instructions
List all macro-factor quantitative strategies on QuantToGo — a forward-tracked signal source covering US and China markets. Returns strategy name, market, total return, max drawdown, Sharpe ratio, and recent returns. All performance is tracked from live signals, not backtested.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:62-91 (handler)The async handler function that executes the list_strategies tool logic. It calls the API endpoint 'getProducts', processes the response data, maps it to strategy objects with fields like productId, name, market, totalReturn, maxDrawdown, and recent returns, then returns the formatted JSON result.
async () => { const res = (await callAPI("getProducts")) as { code: number; data: Record<string, unknown>[]; }; if (res.code !== 0 || !Array.isArray(res.data)) { return { content: [{ type: "text" as const, text: "Failed to fetch strategies" }] }; } const strategies = res.data.map((p) => ({ productId: p.productId, name: p.name, market: p.market || "—", totalReturn: p.totalReturn ?? p.totalReturn5Y ?? null, metricsYearLabel: p.metricsYearLabel || null, maxDrawdown: p.maxDrawdown ?? null, recent1dReturn: p.recent1dReturn ?? null, recent30dReturn: p.recent30dReturn ?? null, status: p.status, })); return { content: [ { type: "text" as const, text: JSON.stringify(strategies, null, 2), }, ], }; } - src/index.ts:58-92 (registration)Tool registration using server.tool() method. Registers 'list_strategies' with a description of its purpose, an empty schema {} (no input parameters required), and the handler function. This is where the tool is formally registered with the MCP server.
server.tool( "list_strategies", "List all macro-factor quantitative strategies on QuantToGo — a forward-tracked signal source covering US and China markets. Returns strategy name, market, total return, max drawdown, Sharpe ratio, and recent returns. All performance is tracked from live signals, not backtested.", {}, async () => { const res = (await callAPI("getProducts")) as { code: number; data: Record<string, unknown>[]; }; if (res.code !== 0 || !Array.isArray(res.data)) { return { content: [{ type: "text" as const, text: "Failed to fetch strategies" }] }; } const strategies = res.data.map((p) => ({ productId: p.productId, name: p.name, market: p.market || "—", totalReturn: p.totalReturn ?? p.totalReturn5Y ?? null, metricsYearLabel: p.metricsYearLabel || null, maxDrawdown: p.maxDrawdown ?? null, recent1dReturn: p.recent1dReturn ?? null, recent30dReturn: p.recent30dReturn ?? null, status: p.status, })); return { content: [ { type: "text" as const, text: JSON.stringify(strategies, null, 2), }, ], }; } ); - src/index.ts:11-19 (helper)The callAPI helper function used by the list_strategies handler to fetch data from the QuantToGo API. It constructs a POST request to the API endpoint and returns the JSON response. This utility is shared across multiple tools.
async function callAPI(fn: string, body: Record<string, unknown> = {}): Promise<unknown> { const resp = await fetch(`${API_BASE}/${fn}`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body), }); if (!resp.ok) throw new Error(`API ${fn} returned ${resp.status}`); return resp.json(); } - src/index.ts:61-61 (schema)Input schema definition for list_strategies tool - an empty object {} indicating the tool requires no input parameters.
{},