ctubio / tribeca

Self-hosted crypto trading bot (automated high frequency market making) in node.js, angular, typescript and c++
https://127.0.0.1:3000
Other
95 stars 26 forks source link

BUG: Tribeca "forgets" to cancel order when pdiv + tbp is not respected #59

Closed Camille92 closed 7 years ago

Camille92 commented 7 years ago

I realized that when apr gets activated, tribeca will not cancel the already open orders on the other side. Or not directly.

I come back to you when I have more details!

And thanks for the improvements,

A big well done !

ctubio commented 7 years ago

thanks for the notice'¡ I will try to carefully look at APR functionality too

ctubio commented 7 years ago

with Coinbase i have apr=off, and im getting like 10 zombie orders every day in the exchange that doesnt exists in the app too :(

you also see zombie orders in Coinbase? (for me OkCoin seems to work as expected)

Camille92 commented 7 years ago

Well, I run a small script to cancel all orders on Coinbase every 5 minutes, so I have to be very lucky to see that.

But I have seen the issue on OkCoin yes.

What usually happens is that: Tribeca is trading both sides, then either one bullet is sold or TBP changes one of those activate the apr and tribeca stop selling.

Then a sell order stays there for a couple of minutes until it is eaten by the market (or maybe canceled by tribeca) but I'm not sure.

Camille92 commented 7 years ago

Found the perfect example from ETH/BTC (forgot to make the script work for them).

ETH/BTC capture d ecran 2017-05-04 a 11 26 44

BTC/USD: capture d ecran 2017-05-04 a 13 55 17

It's good because when I cancel them on the bot they don't reappear and when I cancel them from the exchange they don't reappear as well. Other good news when I cancel them from the exchange tribeca "sees" that they are not there anymore and don't show them on the 'order screen'.

It just looks like tribeca "forgets" to cancel them haha.

Camille92 commented 7 years ago

I dropped the cancel orders script for testing, I can confirm you that I see it in all the markets I'm trading in! And it seems to go in the direction of what it is described on #60.

So to sum up it's a bug: Tribeca doesn't cancel orders on the depleted side when tbp + pdiv conditions are not respected.

ctubio commented 7 years ago

oh ok, i was talking then about another issue xD

thanks for your explanation/screenshot, i will try to look at this, but i didnt experiencied this since long time ago :S maybe i should ~try ETH/BTC~ enable apr

Camille92 commented 7 years ago

Well, on the other hand, I haven't seen any ghost order in a long time 😝

I added a screenshot of BTC/USD as well on Coinbase, but I've seen it as well on OK

ctubio commented 7 years ago

im not able to reproduce this anymore (had apr=on for several days), let me close this unless you disagree