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)

25 lines (20 loc) 538 B
'use strict'; /** * Error which indicates that a trade have failed */ export default class TradeError extends Error { public numericCode: any; public stringCode: any; /** * Constructs the error * @param {String} message error message * @param {Number} numericCode numeric error code * @param {String} stringCode string error code */ constructor(message, numericCode, stringCode) { super(message); this.name = 'TradeError'; this.numericCode = numericCode; this.stringCode = stringCode; } }