OTC Dataset Statistics
otc_statsRetrieve statistics for OTC company datasets including total companies, financial data availability, shell risk scores, and update timestamps to analyze market data.
Instructions
Get statistics about the OTC company dataset: total companies, companies with financials, average shell risk score, last updated timestamp, and data source information. Free endpoint.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/otc.ts:156-186 (handler)Implementation of the "otc_stats" tool handler in src/tools/otc.ts.
server.registerTool( "otc_stats", { title: "OTC Dataset Statistics", description: "Get statistics about the OTC company dataset: total companies, companies with financials, " + "average shell risk score, last updated timestamp, and data source information. Free endpoint.", inputSchema: {}, }, async () => { const res = await apiGet<OtcStatsResponse>("/api/v1/otc/stats"); if (!res.ok) { return { content: [ { type: "text" as const, text: `API error (${res.status}): ${JSON.stringify(res.data)}`, }, ], isError: true, }; } return { content: [ { type: "text" as const, text: JSON.stringify(res.data, null, 2) }, ], }; }, ); - src/tools/otc.ts:21-26 (schema)Type definition for the otc_stats response.
interface OtcStatsResponse { dataset: string; source: string; update_frequency: string; stats: Record<string, unknown>; }