The total pending sell quantity for a financial instrument is the sum total of the quantity of all pending sell orders available at an instant. This data is dynamic in nature and may change at any moment during the live trading hours.
Getting ready
Make sure the broker_connection and instrument1 objects are available in your Python namespace. Refer to the Technical requirements section of this chapter to set up broker_connection. Refer to the Attributes of a financial instrument recipe of this chapter to set up instrument1.
How to do it…
Fetch and print the total pending sell quantity of instrument1:
>>> total_pending_sell_quantity = \
broker_connection.get_total_pending_sell_quantity(instrument1)
>>> print(f'Total pending SELL quantity: {total_pending_sell_quantity}')
We get the following output (your output may differ):
Total pending SELL quantity: 968602
How it works…
The get_total_pending_sell_quantity...