Skip to content

Commit 0bcfe78

Browse files
authored
Merge pull request #55 from angel-one/NewAPis
New APIs
2 parents 95f998b + f96c1a4 commit 0bcfe78

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

SmartApi/smartConnect.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ class SmartConnect(object):
4949
"api.gtt.list":"/rest/secure/angelbroking/gtt/v1/ruleList",
5050

5151
"api.candle.data":"/rest/secure/angelbroking/historical/v1/getCandleData",
52+
"api.oi.data":"/rest/secure/angelbroking/historical/v1/getOIData",
5253
"api.market.data":"/rest/secure/angelbroking/market/v1/quote",
5354
"api.search.scrip": "/rest/secure/angelbroking/order/v1/searchScrip",
5455
"api.allholding": "/rest/secure/angelbroking/portfolio/v1/getAllHolding",
@@ -63,6 +64,8 @@ class SmartConnect(object):
6364
"api.gainersLosers" : 'rest/secure/angelbroking/marketData/v1/gainersLosers',
6465
"api.putCallRatio" : 'rest/secure/angelbroking/marketData/v1/putCallRatio',
6566
"api.oIBuildup" : 'rest/secure/angelbroking/marketData/v1/OIBuildup',
67+
"api.nseIntraday" : 'rest/secure/angelbroking/marketData/v1/nseIntraday',
68+
"api.bseIntraday" : 'rest/secure/angelbroking/marketData/v1/bseIntraday',
6669
}
6770

6871
try:
@@ -462,6 +465,14 @@ def getCandleData(self,historicDataParams):
462465
getCandleDataResponse=self._postRequest("api.candle.data",historicDataParams)
463466
return getCandleDataResponse
464467

468+
def getOIData(self,historicOIDataParams):
469+
params=historicOIDataParams
470+
for k in list(params.keys()):
471+
if params[k] is None:
472+
del(params[k])
473+
getOIDataResponse=self._postRequest("api.oi.data",historicOIDataParams)
474+
return getOIDataResponse
475+
465476
def getMarketData(self,mode,exchangeTokens):
466477
params={
467478
"mode":mode,
@@ -543,10 +554,19 @@ def putCallRatio(self):
543554
putCallRatioResponse=self._getRequest("api.putCallRatio")
544555
return putCallRatioResponse
545556

557+
def nseIntraday(self):
558+
nseIntraday=self._getRequest("api.nseIntraday")
559+
return nseIntraday
560+
561+
def bseIntraday(self):
562+
bseIntraday=self._getRequest("api.bseIntraday")
563+
return bseIntraday
564+
546565
def oIBuildup(self,params):
547566
oIBuildupResponse=self._postRequest("api.oIBuildup",params)
548567
return oIBuildupResponse
549568

569+
550570
def _user_agent(self):
551571
return (__title__ + "-python/").capitalize() + __version__
552572

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
setup(
1414
name="smartapi-python",
15-
version="1.5.0",
15+
version="1.5.1",
1616
author="ab-smartapi",
1717
author_email="smartapi.sdk@gmail.com",
1818
description="Angel Broking openApi integration",

0 commit comments

Comments
 (0)