Closed charly37 closed 6 years ago
fwiw I rolled my own that you're welcome to try (and test ;)) https://github.com/victor-stone/bittrex-promise
Just use bluebird, or alternatively use async await with bluebird so you don't get promise hell.
EG
` let Promise = require('bluebird') Promise.promisifyAll(bittrex)
async checkOrderCompletedAsync (marketWatch) { try { let query = { 'market': marketWatch.market } let allCompletedOrders = await bittrex.getorderhistorycustomAsync(query, marketWatch.apikey, marketWatch.apisecret) for (let completedOrder of allCompletedOrders.result) { if (marketWatch.orderUUID === completedOrder.OrderUuid) { return true } } return false } catch (error) { console.log('Error while attempting to check completed order ' + JSON.stringify(error)) throw error } }`
Correct, it's not - those that need promises enable them by using bluebird or similar. There is a setting to invert the response param order to accommodate.
Thx guys for the info. Will try to to enable them with external libs (and maybe play with await async).
Hi,
Thx for the library and the good work. I wanted to check if it is possible to have promise instead of pushing callback function ? I check the readme and issues (in particular): https://github.com/dparlevliet/node.bittrex.api/issues/77 https://github.com/dparlevliet/node.bittrex.api/pull/7 I think it is not supported but would like confirmation. It would be nice to have that in the future. Thx