petr-fedorov / oberon

Order Book Events ReconstructiON from empirical data
https://petr-fedorov.github.io/oberon/
GNU General Public License v2.0
9 stars 4 forks source link

An order at Bitstamp is deleted from order book too early #13

Open petr-fedorov opened 3 years ago

petr-fedorov commented 3 years ago

For example order 1324-380540973056:

00000000-0000-0000-1324-380540973056,1,,668000,1,34590.25,-2,,,,47906, 00000000-0000-0000-1324-380533678080,2,,690000,,34546.7,1.1,,,,40021, 00000000-0000-0000-1324-380540325888,2,,700000,,34595.25,-0.16534727,,,,49031, 00000000-0000-0000-1324-380540395521,2,,705000,,34551.79,0.52,,,,53182, 00000000-0000-0000-1324-380540235780,2,,706000,,34603.51,-0.008,,,,52437, 00000000-0000-0000-1324-380541157376,1,,713000,1,34637.55,-0.08084,,,,45681, 00000000-0000-0000-1324-380540342274,2,,715000,,34657.74,-0.07139901,,,,44786, 00000000-0000-0000-1324-380532396033,2,,722000,,34571.13,0.5717827,,,,51968, 00000000-0000-0000-1324-380541247488,1,,736000,1,34685.74,-1.78,,,,38984, 00000000-0000-0000-1324-380532756481,2,,738000,,34571.13,0.62053078,,,,47858, 00000000-0000-0000-1324-380541296640,1,,747000,1,34621.61,-0.57988122,,,,51968, 00000000-0000-0000-1324-380532551680,2,,800000,,34553.01,0.08039,,,,50692, 00000000-0000-0000-1324-380541521920,1,,802000,1,34561.21,0.36,,,,49015, 00000000-0000-0000-1324-380541530112,1,,804000,1,34567.86,0.1442,,,,47291, 00000000-0000-0000-1324-380541554689,1,,810000,1,34540.15,0.89,,,,52563, 00000000-0000-0000-1324-380535062528,2,,816000,,34598.27,-0.08749858,,,,46836, 00000000-0000-0000-1324-380477399041,2,,820000,,34627.69,-0.08683516,,,,69482, 00000000-0000-0000-1324-380531933184,2,,851000,,34616.9,-0.08664553,,,,55506, 00000000-0000-0000-1324-380541759492,1,,861000,1,34595.69,0.28609561,,,,58205, 00000000-0000-0000-1324-380541759492,2,,861000,,34590.25,,-0.28609561,,,58464, 00000000-0000-0000-1324-380540973056,2,,861000,1,34590.25,-1.71390439,0.28609561,,,58742, 00000000-0000-0000-1324-380541771778,1,,865000,1,34619.48,-0.61784901,,,,54982, 00000000-0000-0000-1324-380541796355,1,,869000,1,34590.27,0.02895021,,,,77019, 00000000-0000-0000-1324-380541796355,2,,869000,,34590.25,,-0.02895021,,,77311, 00000000-0000-0000-1324-380540973056,3,,869000,1,34590.25,-1.68495418,0.02895021,,,77526, 00000000-0000-0000-1324-380541845504,1,,886000,1,37389.69,-0.1,,,,61847, 00000000-0000-0000-1324-380541521920,2,,892000,,34561.21,0.36,,,,56080, 00000000-0000-0000-1324-380541530112,2,,901000,,34567.86,0.1442,,,,55041, 00000000-0000-0000-1324-380541927425,1,,901000,1,34552.95,0.11630104,,,,55343, 00000000-0000-0000-1324-380542046211,1,,931000,1,34595.69,0.08579115,,,,54590, 00000000-0000-0000-1324-380542046211,2,,931000,,34590.25,,-0.08579115,,,54848, 00000000-0000-0000-1324-380540973056,4,,931000,1,34590.25,-1.59916303,0.08579115,,,55088, 00000000-0000-0000-1324-380542087168,1,,941000,1,34590.27,0.01150008,,,,52338, 00000000-0000-0000-1324-380542087168,2,,941000,,34590.25,,-0.01150008,,,52619, 00000000-0000-0000-1324-380540973056,5,,941000,1,34590.25,-1.58766295,0.01150008,,,52889, 00000000-0000-0000-1324-380542160896,1,,959000,1,34657.74,-0.06496842,,,,40596, 00000000-0000-0000-1324-380542189570,1,,966000,1,34547.86,0.52,,,,42383, 00000000-0000-0000-1324-380542296065,1,,991000,1,34561.22,0.64410352,,,,42413, 00000000-0000-0000-1324-380542308352,1,,994000,1,34590.25,0.01297531,,,,46520, 00000000-0000-0000-1324-380542308352,2,,994000,,34590.25,,-0.01297531,,,46872, 00000000-0000-0000-1324-380540973056,6,,994000,1,34590.25,-1.57468764,0.01297531,,,47514, 00000000-0000-0000-1324-380541157376,2,2021-02-01T09:01:08Z,13000,,34637.55,-0.08084,,,,44215, 00000000-0000-0000-1324-380542435328,1,,25000,1,34538.89,0.08039,,,,47779, 00000000-0000-0000-1324-380542480392,1,,36000,1,34561.22,0.57821747,,,,46041, 00000000-0000-0000-1324-380542590976,1,,63000,1,34590.25,0.0288322,,,,46937, 00000000-0000-0000-1324-380542590976,2,,63000,,34590.25,,-0.0288322,,,47564, 00000000-0000-0000-1324-380540973056,7,,63000,1,34590.25,-1.54585544,0.0288322,,,47835, 00000000-0000-0000-1324-380541927425,2,,128000,,34552.95,0.11630104,,,,51684, 00000000-0000-0000-1324-380540723202,2,,132000,,34554.41,0.1,,,,48095, 00000000-0000-0000-1324-380540596224,2,,142000,,34640.07,-0.89,,,,47928, 00000000-0000-0000-1324-380540579841,2,,143000,,34625.79,-0.1,,,,47200, 00000000-0000-0000-1324-380541554689,2,,156000,,34540.15,0.89,,,,52350, 00000000-0000-0000-1324-380542980096,1,,158000,1,34590.25,0.02963312,,,,50864, 00000000-0000-0000-1324-380542980096,2,,158000,,34590.25,,-0.02963312,,,51102, 00000000-0000-0000-1324-380540973056,8,,158000,1,34590.25,-1.51622232,0.02963312,,,51383, 00000000-0000-0000-1324-380542980097,1,,159000,1,34590.25,0.00823886,,,,50595, 00000000-0000-0000-1324-380542980097,2,,159000,,34590.25,,-0.00823886,,,50802, 00000000-0000-0000-1324-380540973056,9,,159000,1,34590.25,-1.50798346,0.00823886,,,51019, 00000000-0000-0000-1324-380542160896,2,,173000,,34657.74,-0.06496842,,,,150875, 00000000-0000-0000-1324-380543131649,1,,195000,1,34660.75,-0.08084,,,,130085, 00000000-0000-0000-1324-380543168514,1,,204000,1,34755.26,-0.434,,,,121393, 00000000-0000-0000-1324-380542435328,2,,215000,,34538.89,0.08039,,,,110650, 00000000-0000-0000-1324-380543217664,1,,216000,1,34561.23,0.36,,,,109875, 00000000-0000-0000-1324-380543238144,1,,221000,1,34592.91,-0.1441,,,,105104, 00000000-0000-0000-1324-380543242240,1,,222000,1,34563.89,0.03803469,,,,104370, 00000000-0000-0000-1324-380543315968,1,,241000,1,34571.22,0.1441,,,,85610, 00000000-0000-0000-1324-380542189570,2,,244000,,34547.86,0.52,,,,82834, 00000000-0000-0000-1324-380470050817,2,,247000,,33850.38,4.33,,,,80123, 00000000-0000-0000-1324-380543397891,1,,261000,1,34646.37,-0.89,,,,68338, 00000000-0000-0000-1324-380543434757,1,,269000,1,34632.1,-0.1,,,,60608, 00000000-0000-0000-1324-380543471617,1,,279000,1,34560.68,0.1,,,,50842, 00000000-0000-0000-1324-380540973056,10,,861000,1,34590.25,-1.22188785,0.28609561,147314126,00000000-0000-0000-1324-380541759492,1504628, 00000000-0000-0000-1324-380543569924,1,,302000,1,34546.42,0.89,,,,52104, 00000000-0000-0000-1324-380543586305,1,,306000,1,34590.25,0.07174146,,,,58012, 00000000-0000-0000-1324-380543586305,2,,306000,,34590.25,,-0.07174146,,,58312, 00000000-0000-0000-1324-380540973056,11,,306000,1,34590.25,-1.436242,-0.21435415,,,58537, 00000000-0000-0000-1324-380537413632,4,,316000,,34595.69,-0.36918634,-0.12001288,,,48847, 00000000-0000-0000-1324-380541771778,2,,341000,,34619.48,-0.61784901,,,,76315, 00000000-0000-0000-1324-380543217664,2,,345000,,34561.23,0.36,,,,72711, 00000000-0000-0000-1324-380512837634,2,,352000,,34619.49,-0.09,,,,75406, 00000000-0000-0000-1324-380543918082,1,,387000,1,34518.32,0.08039,,,,50306, 00000000-0000-0000-1324-380543971329,1,,400000,1,34657.74,-0.08988964,,,,48074, 00000000-0000-0000-1324-380544036865,1,,416000,1,34552.95,0.11074358,,,,51492, 00000000-0000-0000-1324-380544073728,1,,426000,1,34590.25,0.01441617,,,,50884, 00000000-0000-0000-1324-380544073728,2,,426000,,34590.25,,-0.01441617,,,51163, 00000000-0000-0000-1324-380540973056,12,,426000,1,34590.25,-1.42182583,0.01441617,,,51392, 00000000-0000-0000-1324-380543238144,2,,432000,,34592.91,-0.1441,,,,59947, 00000000-0000-0000-1324-380540973056,13,,434000,,34590.25,-1.42182583,,,,58342, 00000000-0000-0000-1324-380541296640,2,,441000,,34621.61,-0.57988122,,,,55806, 00000000-0000-0000-1324-380544155651,1,,445000,1,34562.94,0.36,,,,55713, 00000000-0000-0000-1324-380540973056,NA,,869000,1,34590.25,-1.39287562,0.02895021,147314127,00000000-0000-0000-1324-380541796355,1649917,1 00000000-0000-0000-1324-380540973056,NA,,931000,1,34590.25,-1.30708447,0.08579115,147314130,00000000-0000-0000-1324-380542046211,1592488,1 00000000-0000-0000-1324-380540973056,NA,,941000,1,34590.25,-1.29558439,0.01150008,147314131,00000000-0000-0000-1324-380542087168,1585769,1 00000000-0000-0000-1324-380544221187,1,,462000,1,34631.14,-0.09,,,,50484, 00000000-0000-0000-1324-380544376832,1,,499000,1,34623.81,-0.1,,,,49375, 00000000-0000-0000-1324-380544507905,1,,533000,1,34627.67,-0.62536656,,,,48103, 00000000-0000-0000-1324-380544561152,1,,544000,1,34590.25,0.03211868,,,,53834, 00000000-0000-0000-1324-380544561152,2,,544000,,34590.25,0.03211868,,,,54145, 00000000-0000-0000-1324-380543918082,2,,559000,,34518.32,0.08039,,,,59772, 00000000-0000-0000-1324-380544155651,2,,594000,,34562.94,0.36,,,,50134, 00000000-0000-0000-1324-380543315968,2,,604000,,34571.22,0.1441,,,,74835, 00000000-0000-0000-1324-380544946178,1,,638000,1,34590.25,0.00504076,,,,70736, 00000000-0000-0000-1324-380544946178,2,,638000,,34590.25,0.00504076,,,,71065, 00000000-0000-0000-1324-380544954369,1,,640000,1,34547.38,1.1,,,,69338, 00000000-0000-0000-1324-380545040385,1,,661000,1,34627.66,-0.57284348,,,,54038, 00000000-0000-0000-1324-380543971329,2,,666000,,34657.74,-0.08988964,,,,49325, 00000000-0000-0000-1324-380543242240,2,,667000,,34563.89,0.03803469,,,,48557, 00000000-0000-0000-1324-380544036865,2,,668000,,34552.95,0.11074358,,,,52473, 00000000-0000-0000-1324-380540973056,NA,,994000,1,34590.25,-1.28260908,0.01297531,147314141,00000000-0000-0000-1324-380542308352,1748354,1 00000000-0000-0000-1324-380545118214,1,,680000,1,34566.14,0.36,,,,55167, 00000000-0000-0000-1324-380545130506,1,,684000,1,34598,0.04109393,,,,52460, 00000000-0000-0000-1324-380545130506,2,,684000,,34598,,-0.04109393,,,52672, 00000000-0000-0000-1324-380536721409,4,,684000,1,34598,-1.95453381,0.03672167,,,52886, 00000000-0000-0000-1324-380545216512,1,,704000,1,34598.75,-0.08200008,,,,56057, 00000000-0000-0000-1324-380545216513,1,,704000,1,34534.77,0.08039,,,,56337, 00000000-0000-0000-1324-380545220608,1,,705000,1,34556.94,0.52,,,,55571, 00000000-0000-0000-1324-380540973056,NA,,63000,1,34590.25,-1.25377688,0.0288322,147314146,00000000-0000-0000-1324-380542590976,1746265,1 00000000-0000-0000-1324-380545417216,1,,753000,1,34598,0.03214717,,,,47016, 00000000-0000-0000-1324-380545417216,2,,753000,,34598,,-0.03214717,,,47338, 00000000-0000-0000-1324-380536721409,5,,753000,1,34598,-1.92238664,0.03214717,,,47558, 00000000-0000-0000-1324-380545519618,1,,779000,1,34579.09,0.08736229,,,,54957, 00000000-0000-0000-1324-380545118214,2,,780000,,34566.14,0.36,,,,54283, 00000000-0000-0000-1324-380545695755,1,,821000,1,34577.45,0.1441,,,,52076, 00000000-0000-0000-1324-380545216512,2,,828000,,34598.75,-0.08200008,,,,47855, 00000000-0000-0000-1324-380545748993,1,,834000,1,34657.74,-0.08229514,,,,51375, 00000000-0000-0000-1324-380545769473,1,,839000,1,34552.95,0.05962288,,,,57257, 00000000-0000-0000-1324-380545806336,1,,848000,1,34566.15,0.36,,,,48632, 00000000-0000-0000-1324-380545220608,2,,878000,,34556.94,0.52,,,,107174, 00000000-0000-0000-1324-380546043904,1,,906000,1,34598,0.00503807,,,,81755, 00000000-0000-0000-1324-380546043904,2,,906000,,34598,,-0.00503807,,,82194, 00000000-0000-0000-1324-380536721409,6,,906000,1,34598,-1.91734857,0.00503807,,,82493, 00000000-0000-0000-1324-380546068480,1,,912000,1,34598,0.02939003,,,,97542, 00000000-0000-0000-1324-380546068480,2,,912000,,34598,,-0.02939003,,,98027, 00000000-0000-0000-1324-380536721409,7,,912000,1,34598,-1.88795854,0.02939003,,,98329, 00000000-0000-0000-1324-380545806336,2,,913000,,34566.15,0.36,,,,97617, 00000000-0000-0000-1324-380546232328,1,,953000,1,34598,0.05218149,,,,85394, 00000000-0000-0000-1324-380546232328,2,,953000,,34598,,-0.05218149,,,85639, 00000000-0000-0000-1324-380536721409,8,,953000,1,34598,-1.83577705,0.05218149,,,85861, 00000000-0000-0000-1324-380546252804,1,,957000,1,34598,0.05993688,,,,82121, 00000000-0000-0000-1324-380546252804,2,,957000,,34598,,-0.05993688,,,82327, 00000000-0000-0000-1324-380536721409,9,,957000,1,34598,-1.77584017,0.05993688,,,82566, 00000000-0000-0000-1324-380536721409,10,,959000,,34598,-1.77584017,,,,80801, 00000000-0000-0000-1324-380545695755,2,,960000,,34577.45,0.1441,,,,80010, 00000000-0000-0000-1324-380546273283,1,,962000,1,34598,0.00721828,,,,78256, 00000000-0000-0000-1324-380546273283,2,,962000,,34598,0.00721828,,,,78452, 00000000-0000-0000-1324-380546301952,1,,969000,1,34566.14,0.36,,,,71683, 00000000-0000-0000-1324-380545748993,2,,976000,,34657.74,-0.08229514,,,,76465, 00000000-0000-0000-1324-380546396161,1,,992000,1,34597.99,-0.08800221,,,,61894, 00000000-0000-0000-1324-380546408448,1,,995000,1,34598,0.05188242,,,,77060, 00000000-0000-0000-1324-380546408448,2,,995000,,34597.99,,-0.05188242,,,77809, 00000000-0000-0000-1324-380546396161,2,,995000,1,34597.99,-0.03611979,0.05188242,,,78012, 00000000-0000-0000-1324-380546408453,1,,996000,1,34627.69,-0.08651605,,,,77225, 00000000-0000-0000-1324-380546428928,1,2021-02-01T09:01:09Z,0,1,34544.63,0.06642882,,,,73723, 00000000-0000-0000-1324-380546465792,1,,9000,1,34667.43,-0.66403,,,,64950, 00000000-0000-0000-1324-380546473984,1,,11000,1,34617.62,-0.08592983,,,,63416, 00000000-0000-0000-1324-380546490369,1,,16000,1,34598,0.0567747,,,,58827, 00000000-0000-0000-1324-380546490369,2,,16000,1,34597.99,0.02065491,-0.03611979,,,59363, 00000000-0000-0000-1324-380546396161,3,,16000,,34597.99,,0.03611979,,,59564, 00000000-0000-0000-1324-380546490369,3,,16000,,34598,0.02065491,,,,59760, 00000000-0000-0000-1324-380540973056,NA,,158000,1,34590.25,-1.22414376,0.02963312,147314153,00000000-0000-0000-1324-380542980096,1919185,1 00000000-0000-0000-1324-380540973056,NA,,159000,1,34590.25,-1.2159049,0.00823886,147314154,00000000-0000-0000-1324-380542980097,1921489,1 00000000-0000-0000-1324-380542480392,2,,29000,,34561.22,0.57821747,,,,51115, 00000000-0000-0000-1324-380542296065,2,,32000,,34561.22,0.64410352,,,,63626, 00000000-0000-0000-1324-380546301952,2,,41000,,34566.14,0.36,,,,54876, 00000000-0000-0000-1324-380545216513,2,,55000,,34534.77,0.08039,,,,46166, 00000000-0000-0000-1324-380546752518,1,,79000,1,34611.4,-0.008,,,,51289, 00000000-0000-0000-1324-380546752517,1,,79000,1,34556.93,0.52,,,,51560, 00000000-0000-0000-1324-380543471617,2,,82000,,34560.68,0.1,,,,48769, 00000000-0000-0000-1324-380546768897,1,,83000,1,34598.75,0.05846505,,,,47994, 00000000-0000-0000-1324-380546768897,2,,83000,,34598.75,0.05846505,,,,48209, 00000000-0000-0000-1324-380543434757,2,,83000,,34632.1,-0.1,,,,48423, 00000000-0000-0000-1324-380541247488,2,,85000,,34685.74,-1.78,,,,56760, 00000000-0000-0000-1324-380543569924,2,,87000,,34546.42,0.89,,,,55026, 00000000-0000-0000-1324-380546793475,1,,90000,1,34598.75,0.20333075,,,,52642, 00000000-0000-0000-1324-380546793475,2,,90000,,34598.75,0.20333075,,,,52909, 00000000-0000-0000-1324-380546801668,1,,91000,1,34598,0.02899111,,,,52775, 00000000-0000-0000-1324-380546801668,2,,91000,,34598,0.02899111,,,,52999, 00000000-0000-0000-1324-380546813953,1,,94000,1,34566.15,0.36,,,,50213, 00000000-0000-0000-1324-380544376832,2,,99000,,34623.81,-0.1,,,,57425, 00000000-0000-0000-1324-380546473984,2,,99000,,34617.62,-0.08592983,,,,57637, 00000000-0000-0000-1324-380546465792,2,,107000,,34667.43,-0.66403,,,,49872, 00000000-0000-0000-1324-380546887681,1,,112000,1,34598,0.04368784,,,,51790, 00000000-0000-0000-1324-380546887681,2,,112000,,34598,0.04368784,,,,52139, 00000000-0000-0000-1324-380546920450,1,,120000,1,34573.46,0.1444,,,,62230, 00000000-0000-0000-1324-380543397891,2,,122000,,34646.37,-0.89,,,,61351, 00000000-0000-0000-1324-380545769473,2,,124000,,34552.95,0.05962288,,,,59575, 00000000-0000-0000-1324-380532482048,2,,134000,,34566.13,0.60081856,,,,68394, 00000000-0000-0000-1324-380531982337,2,,136000,,34571.12,0.62729599,,,,66607, 00000000-0000-0000-1324-380547039232,1,,149000,1,34596.02,-0.48919922,,,,54160, 00000000-0000-0000-1324-380547043329,1,,150000,1,34718.52,-0.09380943,,,,53516, 00000000-0000-0000-1324-380546752517,2,,152000,,34556.93,0.52,,,,51749, 00000000-0000-0000-1324-380547084288,1,,160000,1,34597.9,-0.1443,,,,52461, 00000000-0000-0000-1324-380547117056,1,,168000,1,34597.99,-0.02065,,,,54048, 00000000-0000-0000-1324-380547117056,2,,168000,,34597.99,-0.02065,,,,54355, 00000000-0000-0000-1324-380547121152,1,,169000,1,34700.83,-1.78,,,,53578, 00000000-0000-0000-1324-380547170306,1,,181000,1,34551.02,0.08039,,,,53206, 00000000-0000-0000-1324-380543131649,2,,186000,,34660.75,-0.08084,,,,48463, 00000000-0000-0000-1324-380547190785,1,,186000,1,34569.05,0.1,,,,48672, 00000000-0000-0000-1324-380546752518,2,,201000,,34611.4,-0.008,,,,55608, 00000000-0000-0000-1324-380546813953,2,,202000,,34566.15,0.36,,,,54846, 00000000-0000-0000-1324-380547272704,1,,206000,1,33836.89,5.32,,,,51814, 00000000-0000-0000-1324-380546920450,2,,210000,,34573.46,0.1444,,,,60763, 00000000-0000-0000-1324-380547293185,1,,211000,1,34640.86,-0.1,,,,60030, 00000000-0000-0000-1324-380547321856,1,,218000,1,34554.78,0.89,,,,53293, 00000000-0000-0000-1324-380547403779,1,,238000,1,34571.13,0.60277276,,,,46795, 00000000-0000-0000-1324-380547043329,2,,248000,,34718.52,-0.09380943,,,,54022, 00000000-0000-0000-1324-380547444737,1,,248000,1,34655.14,-0.89,,,,54285, 00000000-0000-0000-1324-380547543040,1,,272000,1,34566.02,0.36,,,,45039, 00000000-0000-0000-1324-380547039232,2,,281000,,34596.02,-0.48919922,,,,43794, 00000000-0000-0000-1324-380547084288,2,,281000,,34597.9,-0.1443,,,,44041, 00000000-0000-0000-1324-380547600384,1,,286000,1,34597.9,0.04365157,,,,49412, 00000000-0000-0000-1324-380547600384,2,,286000,,34597.9,0.04365157,,,,49669, 00000000-0000-0000-1324-380547633152,1,,294000,1,34553.5,0.07573625,,,,52524, 00000000-0000-0000-1324-380547698690,1,,310000,1,34551.91,0.52,,,,58804, 00000000-0000-0000-1324-380547702784,1,,311000,1,34641.18,-0.08084,,,,58047, 00000000-0000-0000-1324-380547710976,1,,313000,1,34598.75,-0.03781,,,,56270, 00000000-0000-0000-1324-380547710976,2,,313000,,34598.75,-0.03781,,,,56519, 00000000-0000-0000-1324-380547715072,1,,314000,1,34566.16,0.57057723,,,,55718, 00000000-0000-0000-1324-380547719169,1,,315000,1,34564.1,0.65127609,,,,55316, 00000000-0000-0000-1324-380547543040,2,,336000,,34566.02,0.36,,,,55886, 00000000-0000-0000-1324-380540973056,NA,,306000,1,34590.25,-1.14416344,0.07174146,147314172,00000000-0000-0000-1324-380543586305,2100122,1 00000000-0000-0000-1324-380547817472,1,,339000,1,34598,0.08726684,,,,61068, 00000000-0000-0000-1324-380547817472,2,,339000,,34598,0.08726684,,,,61350, 00000000-0000-0000-1324-380547874816,1,,353000,1,34571.14,0.60715399,,,,47597, 00000000-0000-0000-1324-380547698690,2,,355000,,34551.91,0.52,,,,64409, 00000000-0000-0000-1324-380547997696,1,,383000,1,34571.14,0.36,,,,50486, 00000000-0000-0000-1324-380547702784,2,,385000,,34641.18,-0.08084,,,,48736, 00000000-0000-0000-1324-380547719169,2,,389000,,34564.1,0.65127609,,,,85085, 00000000-0000-0000-1324-380547715072,2,,390000,,34566.16,0.57057723,,,,84441, 00000000-0000-0000-1324-380546428928,2,,392000,,34544.63,0.06642882,,,,82707, 00000000-0000-0000-1324-380548149251,1,,421000,1,34730.02,-0.10109208,,,,67092, 00000000-0000-0000-1324-380532604928,2,,458000,,34603.22,-0.217,,,,49546, 00000000-0000-0000-1324-380532580353,2,,461000,,34603.52,-0.29,,,,47748, 00000000-0000-0000-1324-380547997696,2,,484000,,34571.14,0.36,,,,56785, 00000000-0000-0000-1324-380548431872,1,,489000,1,34556.94,0.52,,,,52097, 00000000-0000-0000-1324-380548575233,1,,525000,1,34597.9,0.2046916,,,,44976, 00000000-0000-0000-1324-380548575233,2,,525000,,34597.9,0.2046916,,,,45255, 00000000-0000-0000-1324-380548431872,2,,531000,,34556.94,0.52,,,,47752, 00000000-0000-0000-1324-380540973056,NA,,426000,1,34590.25,-1.12974727,0.01441617,147314184,00000000-0000-0000-1324-380544073728,2194773,1

petr-fedorov commented 3 years ago

The issue is due to an excessive delay in Bitstamp's _livetrades channel. For example, two trades for maker 1326-571363098625 arrived respectively 2.197096 and 2.189380 seconds later than they were executed at the exchange:

1326-571328233472,2,,625000,,38654.7,-0.01875,,,,76543, 1326-571368353793,1,,634000,1,37728.95,3.9,,,,83147, 1326-571363098625,,2021-02-07T13:35:36Z,520000,NA,38624.02,NA,-0.00257641,149005436,1326-571363786753,2197096,1 1326-571368427520,1,2021-02-07T13:35:37Z,652000,1,38640.63,-0.52,,,,212703, 1326-571363098625,,2021-02-07T13:35:36Z,598000,NA,38624.02,NA,-0.00001265,149005437,1326-571364110338,2189380,1 1326-571364106242,2,2021-02-07T13:35:37Z,682000,,38640.71,-1,,,,182971, 1326-571368673282,1,,713000,1,38663.96,-0.01875,,,,152223,

Such delayed trades are simply deleted by OBERON and orders where incorrectly shown as cancelled/changed.

petr-fedorov commented 3 years ago

Another reason for the error message: Bitstamp's live_trades channel delivered trade 2 seconds before order_created event:

1329-585047236608,,2021-02-16T01:58:27Z,761000,NA,48267.64,NA,-0.17,151561782,1329-585082793986,18170751,1 1329-585084370946,,2021-02-16T01:58:28Z,613000,NA,48267.65,NA,-0.01,151561783,1329-585086283777,17322195,1 1329-585047175169,1,2021-02-16T01:58:19Z,65000,1,48502.5,-0.0020617,,,,28589488, 1329-585047228417,1,,79000,1,48249.14,0.0291,,,,28577323, 1329-585047236608,1,,80000,1,48267.64,0.17,,,,28577595,

Sources:

{"data": {"buy_order_id": 1329585047236608, "amount_str": "0.17000000", "timestamp": "1613440707", "microtimestamp": "1613440707761000", "id": 151561782, "amount": 0.17, "sell_order_id": 1329585082793986, "price_str": "48267.64", "type": 1, "price": 48267.64}, "event": "trade", "channel": "live_trades_btcusd"} {"data": {"buy_order_id": 1329585084370946, "amount_str": "0.01000000", "timestamp": "1613440708", "microtimestamp": "1613440708613000", "id": 151561783, "amount": 0.01, "sell_order_id": 1329585086283777, "price_str": "48267.65", "type": 1, "price": 48267.65}, "event": "trade", "channel": "live_trades_btcusd"} {"data":{"id":1329585047175169,"id_str":"1329585047175169","order_type":1,"datetime":"1613440699","microtimestamp":"1613440699065000","amount":0.0020617,"amount_str":"0.00206170","price":48502.5,"price_str":"48502.50"},"channel":"live_orders_btcusd","event":"order_created"} {"data":{"id":1329585047228417,"id_str":"1329585047228417","order_type":0,"datetime":"1613440699","microtimestamp":"1613440699079000","amount":0.0291,"amount_str":"0.02910000","price":48249.14,"price_str":"48249.14"},"channel":"live_orders_btcusd","event":"order_created"} {"data":{"id":1329585047236608,"id_str":"1329585047236608","order_type":0,"datetime":"1613440699","microtimestamp":"1613440699080000","amount":0.17,"amount_str":"0.17000000","price":48267.64,"price_str":"48267.64"},"channel":"live_orders_btcusd","event":"order_created"}