UNPKG

metaapi.cloud-sdk

Version:

SDK for MetaApi, a professional cloud forex API which includes MetaTrader REST API and MetaTrader websocket API. Supports both MetaTrader 5 (MT5) and MetaTrader 4 (MT4). CopyFactory copy trading API included. (https://metaapi.cloud)

36 lines (35 loc) 1.23 kB
/** * Creates a promise that can be used as a handle. It will not raise errors when rejected until it is explicitly * awaited or catch is set. The promise additionally has following methods: * - `resolve(value)` resolves the promise with specified value * - `reject(error)` rejects the promise with specified error * - `timeout(milliseconds, errorMessage)` adds a timeout to reject the promise with `TimeoutError` * @return {Promise} Modified handle promise */ export declare function createHandlePromise(): any; /** * Waits specified delay * @param {Number} ms Milliseconds to wait * @return {Promise} Promise resolving when the delay has ended */ export declare function delay(ms: any): Promise<unknown>; /** * Assembles log4js config from logging level map * @param {Object} [config] log4js config * @param {String} [config.defaultLevel = 'INFO'] Default logging level * @param {Object} [config.levels] Logging levels * @return {Object} Log4js config */ export declare function assembleLog4jsConfig(config?: any): { appenders: { console: { type: string; }; }; categories: { default: { appenders: string[]; level: any; }; }; };