Skip to main content
Glama
Long0308

VN Stock API MCP Server

by Long0308

search_vn_stock_api

Search API documentation and endpoints for Vietnamese stock market data providers VNDirect, FireAnt, and SSI to find available APIs, endpoints, and documentation URLs.

Instructions

Search for API documentation and endpoints from VNDirect, FireAnt, or SSI. Returns information about available APIs, endpoints, and documentation URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesStock API provider to search. Use 'all' to get information from all providers.
queryNoOptional search query to filter results (e.g., 'trading', 'market data', 'authentication')

Implementation Reference

  • The main handler function that implements the logic for the 'search_vn_stock_api' tool. It searches for API information from specified providers (vndirect, fireant, ssi, or all), optionally filters by query, and returns structured results including endpoints.
    private async searchVNStockAPI(args: { provider: "vndirect" | "fireant" | "ssi" | "all"; query?: string; }) { const { provider, query } = args; const results: any[] = []; const providersToSearch = provider === "all" ? (Object.keys(API_SOURCES) as Array<keyof typeof API_SOURCES>) : [provider]; for (const prov of providersToSearch) { const source = API_SOURCES[prov]; const info: any = { provider: prov, name: source.name, description: source.description, baseUrl: source.baseUrl, documentationUrls: source.apiDocs, endpoints: this.getEndpointsForProvider(prov), }; if (query) { const lowerQuery = query.toLowerCase(); const matches = source.name.toLowerCase().includes(lowerQuery) || source.description.toLowerCase().includes(lowerQuery) || info.endpoints.some((ep: any) => ep.name?.toLowerCase().includes(lowerQuery) || ep.description?.toLowerCase().includes(lowerQuery) ); if (matches) { results.push(info); } } else { results.push(info); } } return { content: [ { type: "text", text: JSON.stringify(results, null, 2), }, ], }; }
  • src/index.ts:64-83 (registration)
    Tool registration in the tools array, including name, description, and input schema for 'search_vn_stock_api'.
    { name: "search_vn_stock_api", description: "Search for API documentation and endpoints from VNDirect, FireAnt, or SSI. Returns information about available APIs, endpoints, and documentation URLs.", inputSchema: { type: "object", properties: { provider: { type: "string", enum: ["vndirect", "fireant", "ssi", "all"], description: "Stock API provider to search. Use 'all' to get information from all providers.", }, query: { type: "string", description: "Optional search query to filter results (e.g., 'trading', 'market data', 'authentication')", }, }, required: ["provider"], }, },
  • Input schema definition for the 'search_vn_stock_api' tool, specifying parameters provider (required, enum) and optional query.
    inputSchema: { type: "object", properties: { provider: { type: "string", enum: ["vndirect", "fireant", "ssi", "all"], description: "Stock API provider to search. Use 'all' to get information from all providers.", }, query: { type: "string", description: "Optional search query to filter results (e.g., 'trading', 'market data', 'authentication')", }, }, required: ["provider"], },
  • Dispatch in the CallToolRequestSchema handler that routes calls to the searchVNStockAPI method.
    case "search_vn_stock_api": return await this.searchVNStockAPI(args as any); case "get_api_endpoints":
  • Data structure providing API source information for vndirect, fireant, and ssi providers, used by the search_vn_stock_api 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", }, };

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Long0308/vn-stock-api-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server