passabilities / crypto-exchange

Pulls together list of crypto exchanges to interact with their API's in a uniform fashion.
MIT License
261 stars 78 forks source link

TypeError: Cannot read property 'plnx' of unde fined #10

Closed talvasconcelos closed 7 years ago

talvasconcelos commented 7 years ago

Having this issue, maybe because API's are changing?

`const crypto = require('crypto-exchange')

let pairFetch = ['BTC_USD', 'LTC_USD', 'ETH_BTC']

crypto.bitfinex.ticker(pairFetch) .then(console.log)`

"UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: Cannot read property 'bitfinex' of undefined "

At least Poloniex, Bittrex, Kraken, Bitfinex are throwing this error. Gdax is working fine.

passabilities commented 7 years ago

What version are you using? Try fetching the most recent version (v2.2.3)

passabilities commented 7 years ago

@talvasconcelos can you confirm that #11 fixes the problem for you? I have been unable to produce this error running the latest version.

kroitor commented 7 years ago

@passabilities I'm having the same issues with the latest version from npm (2.2.3)

mbp:crypto-exchange igorkroitor$ node --version
v8.0.0-nightly2017030539f7e72440
mbp:crypto-exchange igorkroitor$ npm ls crypto-exchange
/Users/igorkroitor/crypto-exchange
└── crypto-exchange@2.2.3 

mbp:crypto-exchange igorkroitor$ cat test.js 
"use strict";
const cryptoexchange = require('crypto-exchange')
let pairFetch = ['BTC_USD', 'LTC_USD', 'ETH_BTC']
cryptoexchange.bitfinex.ticker(pairFetch).then(console.log)
cryptoexchange.kraken.ticker(pairFetch).then(console.log)
cryptoexchange.poloniex.ticker(pairFetch).then(console.log)
mbp:crypto-exchange igorkroitor$ node test.js 
(node:17293) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 10): TypeError: Cannot read property 'bitfinex' of undefined
(node:17293) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:17293) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 11): TypeError: Cannot read property 'kraken' of undefined
(node:17293) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 12): TypeError: Cannot read property 'plnx' of undefined
mbp:crypto-exchange igorkroitor$ 

P.S. Don't know if that's a proper usage.

passabilities commented 7 years ago

Was able to reproduce the error after fresh install. Indeed #11 fixed the issue thanks!

kroitor commented 7 years ago

This issue is gone in 2.2.4, confirmed.

talvasconcelos commented 7 years ago

sorry haven't had time...

On Fri, Aug 11, 2017, 1:38 AM Igor Kroitor notifications@github.com wrote:

This issue is gone in 2.2.4, confirmed.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/passabilities/crypto-exchange/issues/10#issuecomment-321709117, or mute the thread https://github.com/notifications/unsubscribe-auth/ALhf8jvg9_DmLYTUkN5LRVapTatmJHVkks5sW6KjgaJpZM4OyLFb .