@ex-master/core
Advanced tools
Comparing version 0.1.44 to 0.1.45
@@ -0,1 +1,3 @@ | ||
/// <reference types="node" /> | ||
import { EventEmitter } from 'events'; | ||
import { Decimal } from 'decimal.js'; | ||
@@ -34,3 +36,3 @@ import { Observable, Subject } from 'rxjs'; | ||
} | ||
export declare class Exchange { | ||
export declare class Exchange extends EventEmitter { | ||
readonly client: Client; | ||
@@ -37,0 +39,0 @@ readonly dashboard: Dashboard; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const events_1 = require("events"); | ||
const Debug = require("debug"); | ||
@@ -11,4 +12,5 @@ const decimal_js_1 = require("decimal.js"); | ||
const ORDER_CANCELING_TIMEOUT = 1000; | ||
class Exchange { | ||
class Exchange extends events_1.EventEmitter { | ||
constructor(client, dashboard, { pendingUpdatesPriorityScale = 2 } = {}) { | ||
super(); | ||
this.client = client; | ||
@@ -93,3 +95,3 @@ this.dashboard = dashboard; | ||
if (ordersToReCancel.length) { | ||
await this.cancelOrders(ordersToReCancel); | ||
this.cancelOrders(ordersToReCancel).catch(error => this.emit('error', error)); | ||
} | ||
@@ -96,0 +98,0 @@ }); |
{ | ||
"name": "@ex-master/core", | ||
"version": "0.1.44", | ||
"version": "0.1.45", | ||
"main": "bld/index.js", | ||
@@ -5,0 +5,0 @@ "types": "bld/index.d.ts", |
57417
1615