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

TypeError: Cannot read property 'bid' of undefined - Bitfinex #339

Closed
Niller2005 opened this issue Jun 23, 2016 · 6 comments
Closed

TypeError: Cannot read property 'bid' of undefined - Bitfinex #339

Niller2005 opened this issue Jun 23, 2016 · 6 comments

Comments

@Niller2005
Copy link
Contributor

Something is wrong with bitfenix.

E:\git\gekko\exchanges\bitfinex.js:66
    callback(err, { bid: +data.bid, ask: +data.ask })
                              ^

TypeError: Cannot read property 'bid' of undefined
    at E:\git\gekko\exchanges\bitfinex.js:66:31
    at Request._callback (E:\git\gekko\node_modules\bitfinex-api-node\rest.js:82:20)
    at self.callback (E:\git\gekko\node_modules\request\request.js:198:22)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at ClientRequest.<anonymous> (E:\git\gekko\node_modules\request\request.js:781:16)
    at ClientRequest.g (events.js:286:16)
    at emitNone (events.js:86:13)
    at ClientRequest.emit (events.js:185:7)
    at TLSSocket.emitTimeout (_http_client.js:614:10)

I tried RSI and MACD and the calculations seems to be wrong too.

2016-06-23 11:52:02 (DEBUG):    calculated RSI properties for candle:
2016-06-23 11:52:02 (DEBUG):             rsi: 78.02789408

When on the website it was at 48, not 78

@askmike
Copy link
Owner

askmike commented Jun 23, 2016

Yikes, please see this discussion: #337. Closing this as a dup.

@askmike askmike closed this as completed Jun 23, 2016
@askmike
Copy link
Owner

askmike commented Jun 23, 2016

Actually it's a separate issue. Pinging @xhad. We just changed bitfinex integration. As a current workaround you can revert back to the old bitfinex code by running:

git reset --hard 81e4bbc77cd88165f827517d13e5d85ed1b168ac

@askmike askmike reopened this Jun 23, 2016
@askmike
Copy link
Owner

askmike commented Jun 23, 2016

@Niller2005 I reverted back to old but working bitfinex code until this is fixed.

Please run:

git pull
npm install

And try again!

@Niller2005
Copy link
Contributor Author

After I did that i get this now:

Error:

{ [Nonce is too small.: failed post request to url https://api.bitfinex.com/v1/balances with payload [object Object]. Message: Nonce is too small.]
  jse_shortmsg: 'failed post request to url https://api.bitfinex.com/v1/balances with payload [object Object]. Message: Nonce is too small.',
  jse_summary: 'failed post request to url https://api.bitfinex.com/v1/balances with payload [object Object]. Message: Nonce is too small.',
  message: 'failed post request to url https://api.bitfinex.com/v1/balances with payload [object Object]. Message: Nonce is too small.',
  name: 'Nonce is too small.' } '\n\n'

Meta debug info:

Gekko version: v0.2.2
Nodejs version: v4.4.4

@askmike
Copy link
Owner

askmike commented Jun 26, 2016

Strange, could you update and try again?

@xhad
Copy link
Contributor

xhad commented Jun 27, 2016

This nonce error might be caused from having two Gekkos fetching with the same api key and secret.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants