Removing Current
This commit is contained in:
1 parent
d6c5e91290
commit
a4ed878fcd
4379 files changed
No files matched your search
+31
@@ -0,0 +1,31 @@
|
||||
'use strict'
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
const log = require ('ololog')
|
||||
, ansi = require ('ansicolor').nice
|
||||
, chai = require ('chai')
|
||||
, expect = chai.expect
|
||||
, assert = chai.assert
|
||||
, testOrderBook = require ('./test.orderbook.js')
|
||||
|
||||
/* ------------------------------------------------------------------------ */
|
||||
|
||||
module.exports = async (exchange, symbol) => {
|
||||
|
||||
// log (symbol.green, 'fetching order book...')
|
||||
|
||||
const method = 'fetchL2OrderBook'
|
||||
|
||||
if (exchange.has[method]) {
|
||||
|
||||
let orderbook = await exchange[method] (symbol)
|
||||
testOrderBook (exchange, orderbook, method, symbol)
|
||||
return orderbook
|
||||
|
||||
} else {
|
||||
|
||||
log (method + '() not supported')
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user