Current Folder

This commit is contained in:
Luis Fernando Molina committed 2020-11-20 14:05:59 +01:00
1 parent 8b3382289b
commit cfcada880d
4379 files changed

No files matched your search

-48
View File
@@ -1,48 +0,0 @@
'use strict'
// ----------------------------------------------------------------------------
const log = require ('ololog')
, ansi = require ('ansicolor').nice
, chai = require ('chai')
, expect = chai.expect
, assert = chai.assert
, testOrder = require ('./test.order.js')
/* ------------------------------------------------------------------------ */
module.exports = async (exchange, symbol) => {
const skippedExchanges = [
'rightbtc',
]
if (skippedExchanges.includes (exchange.id)) {
log (exchange.id, 'found in ignored exchanges, skipping fetchMyTrades...')
return
}
if (exchange.has.fetchOrders) {
// log ('fetching orders...')
const orders = await exchange.fetchOrders (symbol)
log ('fetched', orders.length.toString ().green, 'orders, asserting each...')
assert (orders instanceof Array)
const now = Date.now ()
for (let i = 0; i < orders.length; i++) {
const order = orders[i]
testOrder (exchange, order, symbol, now)
}
// log (asTable (orders))
} else {
log ('fetching orders not supported')
}
}