Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update connect.py #187

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions kiteconnect/connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ class KiteConnect(object):
"orders": "/orders",
"trades": "/trades",

"alerts": "/alerts",

"order.info": "/orders/{order_id}",
"order.place": "/orders/{variety}",
"order.modify": "/orders/{variety}/{order_id}",
Expand Down Expand Up @@ -216,6 +218,9 @@ def __init__(self,
# disable requests SSL warning
requests.packages.urllib3.disable_warnings()




def set_session_expiry_hook(self, method):
"""
Set a callback hook for session (`TokenError` -- timeout, expiry etc.) errors.
Expand Down Expand Up @@ -415,6 +420,10 @@ def orders(self):
"""Get list of orders."""
return self._format_response(self._get("orders"))

def get_existing_alerts(self):
"""Get list of all existing alerts."""
return self._get("alerts")

def order_history(self, order_id):
"""
Get history of individual order.
Expand Down