- Python Algorithmic Trading Cookbook
- Pushpak Dagade
- 184字
- 2021-06-11 18:29:26
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.
- ArchiCAD 19:The Definitive Guide
- 我的J2EE成功之路
- 3D Printing with RepRap Cookbook
- Drupal 7 Multilingual Sites
- Matplotlib 3.0 Cookbook
- 機器人創(chuàng)新實訓(xùn)教程
- Ceph:Designing and Implementing Scalable Storage Systems
- MATLAB/Simulink權(quán)威指南:開發(fā)環(huán)境、程序設(shè)計、系統(tǒng)仿真與案例實戰(zhàn)
- Statistics for Data Science
- 人工智能技術(shù)入門
- 生物3D打印:從醫(yī)療輔具制造到細胞打印
- ZigBee無線通信技術(shù)應(yīng)用開發(fā)
- 設(shè)計模式
- Serverless Design Patterns and Best Practices
- Moodle 2.0 Course Conversion(Second Edition)