DeviaVir / zenbot

Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB.
MIT License
8.23k stars 2.03k forks source link

Market order (taker) delay #319

Open tuxitor opened 7 years ago

tuxitor commented 7 years ago

Are there any reasons for this delay when using the --order_type=taker unless taking orderbook into consideration? As far as I can see it is no checking of the orderbook taking place.

2017-06-21 05:14:00  2746.49 BTC-USD   +0.2%      114      +       0.0218   0.0102   buying  0.00286 BTC  782.06 USD   -21.0%  -26.8%
2017-06-21 05:14:46  2749.02 BTC-USD   +0.1%        0      ++      0.0312   0.0109   buying  0.00286 BTC  782.06 USD   -21.0%  -26.9%
buy order completed at 2017-06-21 05:15:16:                                                                                            

0.28184250 BTC at 2748.31 USD                                                                                                          
total 774.59 USD
0.0450% slippage (orig. price 2747.07 USD)
execution: 2 minutes

2017-06-21 05:16:00  2751.57 BTC-USD   +0.2%       17      ++      0.0435   0.0114   bought  0.28376 BTC    8.13 USD   -21.1%  -27.1%
2017-06-21 05:18:00  2751.00 BTC-USD    0.0%       98      ++      0.0350   0.0178    +0.1%  0.28376 BTC    8.13 USD   -21.1%  -27.1%
dsrikanth commented 7 years ago

I was wondering the same. Is there any specific reason?

benjamincburns commented 6 years ago

At a guess, this is likely due to the same problems I discuss over in #868. In short, there are a number of bugs or otherwise reasonable-to-expect errors which can cause an order to fail to be opened within a single period, but in these cases the signal is being acknowledged via the acted_on_trend flag, anyway.