Comments (9)
you may subscribe to the websocket, i think all the actions are available on it
what actually you are trying to get
from kotak-neo-api.
you may subscribe to the websocket, i think all the actions are available on it what actually you are trying to get
Hi, I just want to get order status changes updated on any event from open to pending/open to completion etc, So that I can work on limit orders too.
If already available with api, please provide a sample code which I can try. Thanks.
from kotak-neo-api.
https://github.com/Kotak-Neo/kotak-neo-api/blob/main/docs/Order_report.md#order_report
from kotak-neo-api.
This is rest api call which already we use to check the order status. I am asking if there is any live order websocket which gives any order activities without having to call everytime.
from kotak-neo-api.
i think no
from kotak-neo-api.
subscribe_to_orderfeed() works very well, you just need to write as follows:
based on the order status, you can write your methods.
def on_message(message):
print(f"--live--- order -- feed ----")
message = json.loads(message)
print(message)
def on_error(error_message):
print(error_message)
def on_open(open_msg):
print(open_msg)
def on_close(close_msg):
print(close_msg)
def main():
client = stock_main.startKotakEngineCold(on_message,on_error,on_close,on_open)
client.subscribe_to_orderfeed(on_message, on_close, on_error)
from kotak-neo-api.
@rosevinod how to get ltp
only from
inst_tokens = [ {"instrument_token": "65625", "exchange_segment": "nse_fo"} ]
ltp_value = c.subscribe(instrument_tokens = inst_tokens, isIndex=False, isDepth=False)
print(ltp_value[0].get('ltp'))
returns [{'ftm0': '04/01/1970 00:00:27', 'dtm1': '29/12/1971 15:09:28', 'fdtm': '15/12/2023 11:57:47', 'ltt': '15/12/2023 09:59:59', 'v': '14014000', 'ltp': '214.0000', 'ltq': '50', 'tbq': '143900', 'tsq': '70300', 'bp': '212.1500', 'sp': '216.0000', 'bq': '50', 'bs': '50', 'ap': '145.8300', 'lo': '97.9000', 'h': '236.9000', 'lcl': '0.0500', 'ucl': '485.6500', 'yh': '21474836.4800', 'yl': '21474836.4800', 'op': '118.0000', 'c': '94.3500', 'oi': '2795400', 'mul': '1', 'prec': '2', 'cng': '119.6500', 'nc': '126.8151', 'to': '2043661620.0000', 'name': 'sf', 'tk': '65625', 'e': 'nse_fo', 'ts': 'NIFTY23DEC21500CE'}]
from kotak-neo-api.
@crypt0inf0 what do you mean?
from kotak-neo-api.
@rosevinod If I place a order and want to subscribe to that token to fetch the ltp
and calculate the P/L and once it below a desired level I wish to close this position.
from kotak-neo-api.
Related Issues (20)
- How to exit positions with order id or Exit all positions? HOT 1
- Invalid option 'LIVE' for environment, it should be 'PROD'
- Expiry format should be in YYYYMMDD, and not YYMM
- order_report() api is failing for live account HOT 2
- Time pExpiry date column in files returned by scrip_master() is off by 10 years HOT 4
- Python 3.12 Fails Installation HOT 1
- how to place a basket order & how to calculate required margin HOT 3
- place_order() not accepting MCX or mcx_fo as a segment. HOT 1
- UNABLE TO GET QUOTE OF NFO
- client.subscribe custom on_message callback HOT 2
- In kotak neo api Order is rejected due to unavailable fund but and API is responding with { "stat": "Ok", "nOrdNo": "240102000804077", "tid": "server5_11034", "stCode": 200 } , how to check if order got rejected or not due unavailable fund or any other reason. HOT 2
- Market Depth Upto 20 HOT 1
- Installation error HOT 1
- ScripSearch Downloading exchange_segment_csv everytime whenever I call scrip_search function HOT 1
- What are should be the mobile number and password/mpin to be used for uat environtment? HOT 2
- scrip_search HOT 1
- Unable To Cancel, Modify, or View Order History Via API HOT 4
- Historical Data API
- place order endpoint not working HOT 2
- MCX Trading via API
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 kotak-neo-api.