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)
17 lines (16 loc) • 506 B
TypeScript
/**
* Simplifies time amount converting large numeric values to small with larger unit, so it is easier to read
* @param amount amount of time
* @param unit time unit
* @returns simplified time amount
*/
export declare function simplifyTimeAmount(amount: number, unit: 'ms' | 's' | 'm'): TimeAmount;
/** Time amount */
export type TimeAmount = {
/** Amount */
amount: number;
/** Time unit */
unit: 'ms' | 's' | 'm';
/** Time amount text description */
description: string;
};