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

Raspberry Bitfinex: Bot cannot cancel orders from Orderbook? #527

Closed zmbbmz closed 6 years ago

zmbbmz commented 6 years ago

It seems that the bot cannot cancel orders from the order book. It tries to place f.e. new buy orders, but cannot delete the old (in a bull run) and vice versa. In the BF webui, there are error messages like "cannot find order" and "cannot place buy order xxxxxx, not enough funds" (because the funds are locked in old orders).

also the checkbox "clx?" should do a order book reset after 5min, as if im understand that correctly? actually it does not.

does anybody have the same behaviors? the api key has all necessary rights, though.

greetz zmb

ctubio commented 6 years ago

it works fine bitfinex as of today here; can you share some --debug lines? thanks''

ctubio commented 6 years ago

closing cos i can really not reproduce this issue, but please feel free to share your --debug logs here if you still are facing this

zmbbmz commented 6 years ago

Hi! Thx for the quick answer. i will do that and make screenshots of it. hold on...

zmbbmz commented 6 years ago

bf_1 bf_2

I uploaded 2 screenshots with error messages in bitfinex UI. There you can see, that the bot cannot update/cancel orders. the old ones remains in the order book. on the second screenshot you'll the buy orders, every update is a new order but the old one is still there.

only if i am manually cancel orders, the bot keep working. on hitbtc it just works fine.

zmbbmz commented 6 years ago

debug.txt

ctubio commented 6 years ago

ok many thanks, lines like the following looks suspicious:

20:04:02.795336 DEBUG OG cancel BID id 66708133::-1849035180.

(both should be unsigned numbers)

do you have same issue in all currencies on bitfinex or is only at SNT/USD?

will investigate soOn'' many thanks for the report''

ctubio commented 6 years ago

mm.. i see it happens each 5min, must be because of cxl; meanwhile is not fixed, disabling on bitfinex cxl may help

btw im still not able to reproduce this, for me canceled orders have correct ids at all times at SNT/USD (each 5 min by cxl and also normal cancels)

zmbbmz commented 6 years ago

yes, with btc/usd, xrp/usd and snt/usd so far. all have the similar problem with not canceling orders. maybe the msg "order not found" from the web ui give us a hint.

clx? have no effect, as i can say, he dont cancel anything after 5min. additionally the bot should cancel all orders, when you manually stop him, but nothing happens, too

zmbbmz commented 6 years ago

ok, so after some research, maybe the problem could be only 1gig ram / raspberry pi 3. i give you some feedback, after setting up an fresh icore5 / 8gb ram / clean ubuntu in virtualbox on win10.

serzhiio commented 6 years ago

That is strange but i'm observing same situation on one of my HitBTC instances.

ctubio commented 6 years ago

@serzhiio i dont think hitbtc have same situation just because hitbtc order ids are not numeric, so they can not have a negative sign; can you show some --debug-orders of your failing to be canceled hitbtc orders¿

ctubio commented 6 years ago

@zmbbmz maybe the problem is only in the 32bits version of the raspberry build; i will run my raspberry too soOn (i was testing the x86_64 version)

zmbbmz commented 6 years ago

yepp, running on the new machine works fine.

ctubio commented 6 years ago

many thanks for the info''

5ymph0en1x commented 6 years ago

Hi everyone ! I'm running into the same issue with my raspberry pi 3... I think there is something to find here.