UNPKG

@sharplygroup/xtb-api-js

Version:

A module for interacting with the XTB API

38 lines (37 loc) 1.67 kB
import { WebSocketManager } from "../utils/WebSocketManager"; import { IChartResponse, ITickPricesResponse, ITradingHoursResponse } from "../interfaces"; export declare class MarketDataOperations { private readonly wsManager; constructor(wsManager: WebSocketManager); /** * Returns calendar with market events. * @returns {Promise<any>} // TODO: Create ICalendarResponse interface */ getCalendar(): Promise<any>; /** * Returns chart info, from start date to the current time. * @param {any} info - CHART_LAST_INFO_RECORD * @returns {Promise<IChartResponse>} */ getChartLastRequest(info: any): Promise<IChartResponse>; /** * Returns chart info with data between given start and end dates. * @param {any} info - CHART_RANGE_INFO_RECORD * @returns {Promise<IChartResponse>} */ getChartRangeRequest(info: any): Promise<IChartResponse>; /** * Returns array of current quotations for given symbols, only quotations that changed from given timestamp are returned. * @param {number} level - price level * @param {string[]} symbols - Array of symbol names (Strings) * @param {number} timestamp - The time from which the most recent tick should be looked for. * @returns {Promise<ITickPricesResponse>} */ getTickPrices(level: number, symbols: string[], timestamp: number): Promise<ITickPricesResponse>; /** * Returns quotes and trading times. * @param {string[]} symbols - Array of symbol names (Strings) * @returns {Promise<ITradingHoursResponse>} */ getTradingHours(symbols: string[]): Promise<ITradingHoursResponse>; }