PI Code to get current best 5 bid and offer price with volume and number of orders

This cannot be coded… Check the condition once. and explain in brief