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

Bitfinex Partially Executed Order Updates #779

Closed MiningInMySleep closed 6 years ago

MiningInMySleep commented 6 years ago

If an order is partially executed it causes multiple pings/pongs whenever the order is updated even if no actual trade occurs.

GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005246 BTC (value 0.00314760 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005246 BTC (value 0.00314760 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005246 BTC (value 0.00314760 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005246 BTC (value 0.00314760 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005192 BTC (value 0.00311520 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005191 BTC (value 0.00311460 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005189 BTC (value 0.00311340 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005193 BTC (value 0.00311580 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005201 BTC (value 0.00312060 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005200 BTC (value 0.00312000 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005203 BTC (value 0.00312180 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005202 BTC (value 0.00312120 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005199 BTC (value 0.00311940 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005194 BTC (value 0.00311640 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005198 BTC (value 0.00311880 BTC). GW BITFINEX PING TRADE SELL 60.00000000 XRP at price 0.00005197 BTC (value 0.00311820 BTC).

ctubio commented 6 years ago

:( thanks for the report, will review bitfinex partial orders soOn'

ctubio commented 6 years ago

maybeee can you share what commit or version are you running? (aka, happens since latest commit or happens since some old commit? thanks'¡ [just for curiosity to know since when it happens; i was testing latest mods on hitbtc and coinbase only :(])

MiningInMySleep commented 6 years ago

It's been happening ever since I started using the bot on Bitfinex maybe 3-4 months ago. I never paid too much attention to it until today.

K build x86_64-linux-gnu 2018-08-10 00:04:10. v0.4.9+18 (zip install).

ctubio commented 6 years ago

ook many thanks; i know where is the issue then; let me recover from the last fight with bitfinex and i refix the integration'

thanks for the report again''

edit: recovered! letz try it'

ctubio commented 6 years ago

im considering to send a cancel request after the first partial is received; otherwise we need to keep a list of already known partial orders and always check if the partial order notified by bitfinex is new or not new.. (bad bad solution that i will never apply noworry xD)

lemme try a few things before do the cancel request (like diferencing between a partial after a replace or a partial after a market event)

suggestions are allowed! :P (i just send an email to bitfinex asking for suggestions too; never knows what they can answer :D)

myrsnipa commented 6 years ago

fre. 10. aug. 2018 kl. 05.56 skrev Carles Tubio notifications@github.com:

maybeee can you share what commit or version are you running? (aka, happens since latest commit or happens since some old commit? thanks'¡ [just for curiosity to know since when it happens])

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ctubio/Krypto-trading-bot/issues/779#issuecomment-411968049, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ4RUdRwNT2HucK3sdk72KLGVafHYjflks5uPQRZgaJpZM4V3gGm .

--

hanne brænna

myrsnipa commented 6 years ago

tor. 16. aug. 2018 kl. 03.29 skrev myrsnipa Hanne Braenna < hannebrenna6@gmail.com>:

fre. 10. aug. 2018 kl. 05.56 skrev Carles Tubio <notifications@github.com

:

maybeee can you share what commit or version are you running? (aka, happens since latest commit or happens since some old commit? thanks'¡ [just for curiosity to know since when it happens])

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ctubio/Krypto-trading-bot/issues/779#issuecomment-411968049, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ4RUdRwNT2HucK3sdk72KLGVafHYjflks5uPQRZgaJpZM4V3gGm .

--

hanne brænna

--

hanne brænna

myrsnipa commented 6 years ago

tor. 16. aug. 2018 kl. 03.29 skrev myrsnipa Hanne Braenna < hannebrenna6@gmail.com>:

tor. 16. aug. 2018 kl. 03.29 skrev myrsnipa Hanne Braenna < hannebrenna6@gmail.com>:

fre. 10. aug. 2018 kl. 05.56 skrev Carles Tubio <notifications@github.com

:

maybeee can you share what commit or version are you running? (aka, happens since latest commit or happens since some old commit? thanks'¡ [just for curiosity to know since when it happens])

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ctubio/Krypto-trading-bot/issues/779#issuecomment-411968049, or mute the thread https://github.com/notifications/unsubscribe-auth/AQ4RUdRwNT2HucK3sdk72KLGVafHYjflks5uPQRZgaJpZM4V3gGm .

--

hanne brænna

--

hanne brænna

--

hanne brænna

ctubio commented 6 years ago

next commit just fixes partial cancels, still missing to fix partial updates