I'm getting an error when running the sample code. Specifically, I get an error in the hmac-sha512.js file, when calling getticker (the first API call, getmarketsummaries, works well):
C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\hmac-sha512.js:24
(function(){var a=CryptoJS,j=a.enc.Utf8;a.algo.HMAC=a.lib.Base.extend({init:function(a,b){a=this._hasher=new a.init;"string"==typeof b&&(b=j.parse(b));var f=a.blockSize,l=4*f;b.sigBytes>l&&(b=a.finalize(b));b.clamp();for(var u=this._oKey=b.clone(),k=this._iKey=b.clone(),m=u.words,y=k.words,z=0;z<f;z++)m[z]^=1549556828,y[z]^=909522486;u.sigBytes=k.sigBytes=l;this.reset()},reset:function(){var a=this._hasher;a.reset();a.update(this._iKey)},update:function(a){this._hasher.update(a);return this},finalize:function(a){var b=
^
TypeError: Cannot read property 'sigBytes' of undefined
at new init (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\hmac-sha512.js:24:178)
at Object.HmacSHA512 (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\hmac-sha512.js:12:488) at setRequestUriGetParams (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\node.bittrex.api.js:97:38)
at publicApiCall (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\node.bittrex.api.js:154:53)
at Object.getticker (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\node.bittrex.api.js:343:7)
at bittrex.getmarketsummaries (C:\Users\User\Code\bittrex\index.js:16:13)
at Request._callback (C:\Users\User\Code\bittrex\node_modules\node-bittrex-api\node.bittrex.api.js:144:11)
at Request.self.callback (C:\Users\User\Code\bittrex\node_modules\request\request.js:186:22)
at Request.emit (events.js:159:13)
at Request.<anonymous> (C:\Users\User\Code\bittrex\node_modules\request\request.js:1163:10)
I'm running the code on a Windows 10 machine. With minor changes, it's exactly the same as the sample:
I'm getting an error when running the sample code. Specifically, I get an error in the
hmac-sha512.js
file, when callinggetticker
(the first API call,getmarketsummaries
, works well):I'm running the code on a Windows 10 machine. With minor changes, it's exactly the same as the sample:
What am I doing wrong?
PS: just verified I'm getting the exact same error when calling
getbalance
or any other method that requires authentication.