官术网_书友最值得收藏!

The total pending buy quantity of a financial instrument

The total pending buy quantity for a financial instrument is the sum total of the quantity of all the pending buy 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 buy quantity of instrument1:

>>> total_pending_buy_quantity = \
broker_connection.get_total_pending_buy_quantity(instrument1)
>>> print(f'Total pending BUY quantity: {total_pending_buy_quantity}')

We get the following output (your output may differ):

Total pending BUY quantity: 1319590

How it works…

The get_total_pending_buy_quantity() method of the BrokerConnectionZerodha class fetches the total buy quantity for the given financial instrument at any given moment. This method takes an object of the Instrument type as a parameter. We use instrument1 as the parameter here. 

主站蜘蛛池模板: 太湖县| 贵州省| 文昌市| 凤凰县| 徐汇区| 什邡市| 林甸县| 大方县| 河津市| 浦北县| 阿尔山市| 甘孜县| 西丰县| 邹平县| 陆丰市| 高清| 伊春市| 淮阳县| 萝北县| 无为县| 东山县| 新郑市| 蓬莱市| 滕州市| 吴川市| 长宁县| 南充市| 永平县| 那曲县| 南宁市| 沅陵县| 金门县| 集安市| 衡南县| 雷波县| 封丘县| 乌兰察布市| 姜堰市| 天祝| 庆云县| 金秀|