☰
Login
Signup
Home
›
Python client
Howdy, Stranger!
It looks like you're new here. If you want to get involved, click one of these buttons!
Sign In
Register
Categories
Recent Discussions
Activity
Categories
13.9K
All Categories
0
Incidents
155
Node JS client
40
Go client
793
.Net API client
378
Kite Publisher
537
.Net / VBA / Excel (3rd party)
457
Algorithms and Strategies
994
Java client
1.1K
API clients
404
PHP client
4K
Python client
346
Mobile and Desktop apps
1.4K
Market data (WebSockets)
3.3K
General
In this Discussion
September 2022
sujith
September 2022
Vishnuvardhan
September 2022
SRIJAN
How to get pending orders ?
Vishnuvardhan
September 2022
edited September 2022
in
Python client
Dear Zerodha ,
May I know is there any direct function to get pending orders ? except the way to get all orders from kite.orders() and then filter ?
SRIJAN
September 2022
edited September 2022
No,you have to fetch orderbook and then filter by checking status of every order.
If status is not one of COMPLETE, CANCELLED,or REJECTED,that means it is a pending order.
Vishnuvardhan
September 2022
edited September 2022
ok thanks
@SRIJAN
Also, one more question . How to get only open positions ?
sujith
September 2022
You need to fetch positions and check the quantity field. If it is negative then it is short position, if value is 0 then it is a squared off position, if quantity is positive then it is a long position.
sujith
September 2022
Use net positions list form the positions response.
Vishnuvardhan
September 2022
ok thanks
@sujith
This discussion has been closed.
If status is not one of COMPLETE, CANCELLED,or REJECTED,that means it is a pending order.
Also, one more question . How to get only open positions ?