get_api_documentation_urls
Retrieve official documentation links for Vietnamese stock API providers, including guides and GitHub repositories, to facilitate integration and development.
Instructions
Get documentation URLs for API providers. Returns links to official API documentation, guides, and GitHub repositories.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| provider | Yes | Stock API provider |
Implementation Reference
- src/index.ts:340-370 (handler)The handler function that implements the core logic of the 'get_api_documentation_urls' tool. It extracts the provider from input arguments, selects the appropriate API sources, and returns a JSON-formatted list of documentation URLs and base URLs.private async getAPIDocumentationURLs(args: { provider: "vndirect" | "fireant" | "ssi" | "all"; }) { const { provider } = args; const providersToGet = provider === "all" ? (Object.keys(API_SOURCES) as Array<keyof typeof API_SOURCES>) : [provider]; const docs: any[] = []; for (const prov of providersToGet) { const source = API_SOURCES[prov]; docs.push({ provider: prov, name: source.name, documentationUrls: source.apiDocs, baseUrl: source.baseUrl, }); } return { content: [ { type: "text", text: JSON.stringify(docs, null, 2), }, ], }; }
- src/index.ts:105-119 (schema)The input schema definition and tool metadata for 'get_api_documentation_urls', including name, description, and inputSchema specifying the 'provider' parameter.name: "get_api_documentation_urls", description: "Get documentation URLs for API providers. Returns links to official API documentation, guides, and GitHub repositories.", inputSchema: { type: "object", properties: { provider: { type: "string", enum: ["vndirect", "fireant", "ssi", "all"], description: "Stock API provider", }, }, required: ["provider"], }, },
- src/index.ts:228-228 (registration)Registration of the tool handler in the switch statement within the CallToolRequestSchema handler, dispatching calls to the getAPIDocumentationURLs method.return await this.getAPIDocumentationURLs(args as any);
- src/index.ts:12-39 (helper)Constant data structure API_SOURCES containing the API documentation URLs and metadata for each provider (vndirect, fireant, ssi), directly used by the tool handler.const API_SOURCES = { vndirect: { name: "VNDirect", baseUrl: "https://www.vndirect.com.vn", apiDocs: [ "https://www.vndirect.com.vn/san-pham-to-chuc/apis-white-labeling/", "https://dstock.vndirect.com.vn/", ], description: "VNDirect Securities Corporation API", }, fireant: { name: "FireAnt", baseUrl: "https://api.fireant.vn", apiDocs: [ "https://api.fireant.vn/", ], description: "FireAnt API for Vietnam stock market", }, ssi: { name: "SSI", baseUrl: "https://fc-tradeapi.ssi.com.vn", apiDocs: [ "https://guide.ssi.com.vn/ssi-products/tieng-viet/fastconnect-trading/danh-sach-cac-api", "https://github.com/SSI-Securities-Corporation/docs", ], description: "SSI FastConnect API", }, };