Iputit up on the left. That code is a quick nested block code, it is my version of how a trade book should be organized. Designed as a tree that is very optimum in going from root and descending, and using a selector the specific path down the tree determined en route. This is my vote for what becomes the standard trade book format, but there are likely many other useful wys to store and scan the trade book.
I should explain a bit more, but I bring it up because the ery heart of the trading pit is secure python and some fast linear format for the trade book. Outside of that, tyhe trading bots have access to the book for scan and dropping bid/ask. The pit boss is yet another trading bot, but executes the pricing function and watches bit error. Simple, obvious and the techies will all promote variations, great.
The real tricks now become enforcing the pit boss bit error declarations in the contract, and defining the limits of trading bots such that they can be verified. Then you have all the variou one and tow color pricings. Not rocket science, more like odds making.
The key element, right now, is a basic agreement on the python iterator, its general use. The iterator of the trade book will likely enforce cycle pricing. So, all the python trading bot authors need to think, what would it look like if we all agreed on a natural trade book scanner, what would the rules be? How do you want he book set up? The first group to organize the trade book forum becomes zillionares because they are first out of the gate with an auto S&L pit to match the hardware wallet vendors.