CASE 1:
In the first case, the bid id “1507277560876710 takes a volume of 800 from the best ask id “1207277960876310” and therefore the orderbook after this transaction becomes as follows:
Ask[5050], 426.0,
vol:800.0, [160695464670030]
Ask[5051], 425.0,
vol:8000.0, [1207277960876310]
Ask[5049], 425.0,
vol:6000.0, [1207277960876310]
Ask[5052], 423.0, vol:200.0, [1207277960879500]
<--spread=1.0-->
Bid[5047], 422.0,
vol:5000.0, [1127193705767590]
Bid[5046], 422.0,
vol:10000.0, [242062359407230]
Bid[5045], 422.0,
vol:2000.0, [657291406094408]
Bid[5044], 421.0,
vol:400.0, [889024888125048]
Bid[5048], 420.0,
vol:5000.0, [253803710837903]