Skip to content

Commit

Permalink
Merge pull request #16095 from origccxt/bitmart_orderbook_fix
Browse files Browse the repository at this point in the history
fix/bitmart order book depth
  • Loading branch information
kroitor committed Dec 15, 2022
2 parents f3418c3 + 30bea17 commit c1a1aca
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions js/pro/bitmart.js
Expand Up @@ -30,7 +30,7 @@ module.exports = class bitmart extends bitmartRest {
'options': {
'defaultType': 'spot',
'watchOrderBook': {
'depth': 'depth5', // depth5, depth400
'depth': 'depth5', // depth5, depth20, depth50
},
'ws': {
'inflate': true,
Expand Down Expand Up @@ -399,7 +399,7 @@ module.exports = class bitmart extends bitmartRest {
* @returns {object} A dictionary of [order book structures]{@link https://docs.ccxt.com/en/latest/manual.html#order-book-structure} indexed by market symbols
*/
const options = this.safeValue (this.options, 'watchOrderBook', {});
const depth = this.safeString (options, 'depth', 'depth400');
const depth = this.safeString (options, 'depth', 'depth50');
const orderbook = await this.subscribe (depth, symbol, params);
return orderbook.limit ();
}
Expand Down Expand Up @@ -620,7 +620,8 @@ module.exports = class bitmart extends bitmartRest {
const methods = {
'depth': this.handleOrderBook,
'depth5': this.handleOrderBook,
'depth400': this.handleOrderBook,
'depth20': this.handleOrderBook,
'depth50': this.handleOrderBook,
'ticker': this.handleTicker,
'trade': this.handleTrade,
// ...
Expand Down

0 comments on commit c1a1aca

Please sign in to comment.