Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot crash each time an order is closed #32

Closed
Camille92 opened this issue Jun 29, 2017 · 1 comment
Closed

Bot crash each time an order is closed #32

Camille92 opened this issue Jun 29, 2017 · 1 comment

Comments

@Camille92
Copy link
Contributor

Hi Carles,

Thank you for changing MongoDB for SQLite, I've already seen improvements in the CPU usage :)

However, I noticed a (bit annoying) bug with the current version. Each time an order is "closed" (K) the bot crashes.

Here is the log I got about it!

09:43:40.828 bitfinex TypeError: x.time.getTime is not a function
    at cleanTrades.tradesMemory.filter (/K/app/server/broker.js:243:102)
    at Array.filter (native)
    at Evt.OrderBroker.updateOrderState [as _singleCallback] (/K/app/server/broker.js:243:57)
    at Evt.trigger (/K/app/server/utils.js:28:22)
    at orders.forEach.order (/K/app/server/gateways/bitfinex.js:257:34)
    at Array.forEach (native)
    at BitfinexOrderEntryGateway.onOrderAck (/K/app/server/gateways/bitfinex.js:256:20)
    at BitfinexOrderEntryGateway._socket.setHandler (/K/app/server/gateways/bitfinex.js:292:22)
    at WebSocketClient.BitfinexWebsocket.onMessage [as internalOnMessage] (/K/app/server/gateways/bitfinex.js:116:21)
    at native.client.group.onMessage (/K/node_modules/uws/uws.js:57:15) Error parsing msg [0,"oc",[2916630745,0,729420161,"tBTCUSD",1498729420306,1498729420736,0,0.03639052,"EXCHANGE LIMIT",null,null,null,0,"EXECUTED @ 2505.9(0.04)",null,null,2505.9,2505.9,0,0,null,null,null,0,0,0]]
09:43:40.829 main Unhandled exception! TypeError: x.time.getTime is not a function
    at cleanTrades.tradesMemory.filter (/K/app/server/broker.js:243:102)
    at Array.filter (native)
    at Evt.OrderBroker.updateOrderState [as _singleCallback] (/K/app/server/broker.js:243:57)
    at Evt.trigger (/K/app/server/utils.js:28:22)
    at orders.forEach.order (/K/app/server/gateways/bitfinex.js:257:34)
    at Array.forEach (native)
    at BitfinexOrderEntryGateway.onOrderAck (/K/app/server/gateways/bitfinex.js:256:20)
    at BitfinexOrderEntryGateway._socket.setHandler (/K/app/server/gateways/bitfinex.js:292:22)
    at WebSocketClient.BitfinexWebsocket.onMessage [as internalOnMessage] (/K/app/server/gateways/bitfinex.js:116:21)
    at native.client.group.onMessage (/K/node_modules/uws/uws.js:57:15)
09:43:40.830 main Attempting to cancel all open orders, please wait..
09:43:42.830 main Exit code 0

@ctubio
Copy link
Owner

ctubio commented Jun 29, 2017

umf i didnt noticed that, let me fix it soOn''

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

No branches or pull requests

2 participants