Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Different Bittrex error (#659) #715

Merged
merged 2 commits into from
Nov 16, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion extensions/exchanges/bittrex/exchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ module.exports = function container(get, set, clear) {
}

var trades = []
if (typeof data.result !== 'undefined') {
try {
Object.keys(data.result).forEach(function (i) {
var trade = data.result[i]
trades.push({
Expand All @@ -93,6 +93,9 @@ module.exports = function container(get, set, clear) {
side: trade.OrderType == 'BUY' ? 'buy' : 'sell'
})
})
} catch (e) {
console.log('bittrex API (getmarkethistory). Retry in progress. Error:' + e);
return retry('getTrades', func_args, {message: e.toString()});
}
cb(null, trades)
})
Expand Down