Comments (3)
`def order_status(order_Id):
''' This Function Is Used To Get Order Status Like Pending Or Traded ['staus'] == TRAD OR OPN OR CAN ['statusMessage']==Open or Completely Traded Order'''
return client.order_report(order_Id)['success'][-1]['status']`
@ashwinkp
let me know if this help's you or not
from ks-orderapi-python.
even i am doing -> "order_Id= orderId ['Success']['NSE']['orderId']"
just add a try catch around it
from ks-orderapi-python.
I wrote a class KResponse. This allows me to get the orderID, Success and other info from the response string in structure format. So now I can do.
resp = client.place_order(...)
orderResp = KResponse(resp)
return str(orderResp.orderId)
class KResponse(object):
def init(self, data):
res = data
if "Success" in res:
self.dict = res['Success']['NSE']
self.Success = True
self.exchange = 'NSE'
elif 'success' in res:
self.dict = res['success']['NSE']
self.Success = True
self.exchange = 'NSE'
from ks-orderapi-python.
Related Issues (20)
- Automatic Instrument Token Fetching HOT 1
- Code for fetching access code from email automatically HOT 3
- not getting unrealised pnl which is displayed on trading console
- Getting 'NIFTY 50' LTP seems to crash (Reason: Internal Server Error
- Getting MIS Instrument List
- 2FA ISSUE - NOT WORKING - REG HOT 1
- LOGIN WITHOUT OTP
- User locked due to Bad tries HOT 1
- Order id not receving for f&o order
- facing issue with OTT session generation HOT 1
- Does Hist data api works? HOT 2
- not able to create another app
- Integration with TradingView
- Kotak
- Portfolio api issue
- AttributeError: 'numpy.int64' object has no attribute 'openapi_types' HOT 2
- get pnl function
- Bracket Order
- what is app_id and user_id here?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ks-orderapi-python.