bitmex-orderbook
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "bitmex-orderbook", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "BitMEX WebSocket-driven Orderbook", | ||
@@ -5,0 +5,0 @@ "main": "src/OrderBook.js", |
@@ -23,3 +23,3 @@ # BitMEX OrderBook | ||
// Top 5 bid prices, starting at third best (index: 2). | ||
// Top 5 bid prices, skipping the first 2. | ||
const [thirdBestBid] = orderBookL2.getBidprices(5, 2); | ||
@@ -26,0 +26,0 @@ |
@@ -184,7 +184,7 @@ const debug = require("debug")("bitmex-orderbook"); | ||
getAskPrices(count = 0, skip = 0) { | ||
return [...this._asks.values()].slice(skip, Math.min(count || this.depth, this.depth)); | ||
return [...this._asks.values()].slice(skip, skip + Math.min(count || this.depth, this.depth)); | ||
} | ||
getBidPrices(count = 0, skip = 0) { | ||
return [...this._bids.values()].slice(skip, Math.min(count || this.depth, this.depth)); | ||
return [...this._bids.values()].slice(skip, skip + Math.min(count || this.depth, this.depth)); | ||
} | ||
@@ -191,0 +191,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76441