UNPKG

@gviper/alphavantage-api

Version:

TypeScript SDK for Alpha Vantage API with comprehensive type safety and all endpoint support

36 lines 1.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Options = void 0; class Options { constructor(client) { this.client = client; } /** * Returns the real-time options chain for a given equity. * * @param params - Parameters including symbol * @returns Promise resolving to real-time options chain data * @example https://www.alphavantage.co/query?function=REALTIME_OPTIONS&symbol=IBM&apikey=demo */ async realtime(params) { return this.client.request({ function: 'REALTIME_OPTIONS', ...params, }); } /** * Returns historical options data for a given equity. * * @param params - Parameters including symbol and date * @returns Promise resolving to historical options data * @example https://www.alphavantage.co/query?function=HISTORICAL_OPTIONS&symbol=IBM&apikey=demo */ async historical(params) { return this.client.request({ function: 'HISTORICAL_OPTIONS', ...params, }); } } exports.Options = Options; //# sourceMappingURL=options.js.map