ctubio / Krypto-trading-bot

Self-hosted crypto trading bot (automated high frequency market making) written in C++
https://127.0.0.1:3000
Other
3.37k stars 823 forks source link

DisabledQuotes ? Bitfinex #29

Closed Camille92 closed 7 years ago

Camille92 commented 7 years ago

Hi Carles,

After sometime trading on Bitfinex I get that:

capture d ecran 2017-06-28 a 17 46 31

And it stops trading. Any idea why?

Am I hitting the limit on Bitfinex? (I trade on al markets)

And can K do something about ? Like trying to reconnect :)

Best Camille

Camille92 commented 7 years ago

Ok apparently K does reconnect automatically after some time.

I guess I get "punished" by Bitfinex :/

Camille92 commented 7 years ago

Ok I come back, no finally I think it stays disconnected :s

CarlitoGrey commented 7 years ago

Camille,

Have you tried putting "auto" before the bot identifier in the config file? This should tell K to auto connect when starting?

"BotIdentifier": "autobot",

Camille92 commented 7 years ago

Hi @CarlitoGrey thank you for your help but the problem is not that K is off, the problem is that K doesn't trade after some time.

ctubio commented 7 years ago

DisabledQuotes is supposed to mean that big green button is red, or that the broker class is disconnected from the exchange; also in the log is supposed that some lines similar to the following are printed when the Quoting state change:

Changed quoting mode to true
...
Changed quoting mode to false

was the button green or red? :P

ctubio commented 7 years ago

since looks like there was no market data, the issue may be that broker class was disconnected from the exchange

Camille92 commented 7 years ago

I don't remember the color, but I would say yes disconnected from the exchange (probably because I'm hitting the API limit I guess).

But then it doesn't reconnect itself. It's fixed by a simple npm run restartall.

It happens on all markets more or less at the same time!

Next time I'll look at the color to tell you.

ctubio commented 7 years ago

if is because a limit is reached, im not sure how to fix this yet meanwhile we have multiple independent instances running against the same resources.

the fix i believe is to unify them all, but this is not like a quick fix :dancer: let me close this meanwhile we dont get to the point that is feasible.

Camille92 commented 7 years ago

Hey Carles,

Thanks for the answer! When you say resources, do you speak about 1) CPU/ram of the server, 2) quantity of cash/ crypto or 3) number of requests that can be sent to the exchange? I can try to adjust my settings accordingly.

And is it possible to, not fix the issue, but exit the app if it's in DisabledMode for more than a few minutes, so it doesn't affect the trading for too long if that happens :)

ctubio commented 7 years ago

sorry i mean the problem currently is because saturated external resources, like API endpoints (im not sure how to fix this with the current app; all running gateways need to be unified but currently are not)

Camille92 commented 7 years ago

I got it again so I hope it gives you more info with this screenshot!

Ps: It is possible to have a way to restart K automatically if that happens?

ctubio commented 7 years ago

umf it have a bunch of open New orders; i think this is becuase the connection failed and they are accumulating (so thats another issue xD)

about the connectivity, if is lost; currently the app tries to reconnect, so you should see some msg in the log like: bifinex Heartbeat lost, reconnecting..

thats why the application doesn't restarts, because it is supposed that it tries to reconnect

can you see what are the logs saying at that moment?

Camille92 commented 7 years ago

Well thing is that I start it with npm (no logs) and then some hours later I find out that happens.

If I find a more efficient way of doing it, I'll take a loook at the logs

blackivory commented 7 years ago

hi Camille92 , would you be able to solve the issues at the end , with Bitfinex ? pretty annoying that I have to manually click the button n reconnect .