UNPKG

binance

Version:

Professional Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.

24 lines 844 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WS_ERROR_CODE = void 0; exports.isFatalWSError = isFatalWSError; exports.WS_ERROR_CODE = { /** * { code: -1125, msg: 'This listenKey does not exist.' }, */ LISTEN_KEY_NOT_FOUND: -1125, /** * {"code":-2015,"msg":"Invalid API-key, IP, or permissions for action."} */ INVALID_API_KEY_OR_IP_OR_PERMISSIONS: -2015, }; function isFatalWSError(e) { var _a; if (typeof ((_a = e === null || e === void 0 ? void 0 : e.error) === null || _a === void 0 ? void 0 : _a.code) === 'number') { const errorCode = e.error.code; const FATAL_ERRORS = [exports.WS_ERROR_CODE.INVALID_API_KEY_OR_IP_OR_PERMISSIONS]; return FATAL_ERRORS.includes(errorCode); } return false; } //# sourceMappingURL=enum.js.map