@Moderator_2 : Hi historical api for nifty50 doesn't work.
Please let me know which token should be used ? or the api is down?
i tried 2 and 26000 both , but doesn't work.
I will have to shift to another platform for algo trading if it doesn't work, since it is super important for me for options backtesting
coolankurmahe
@coolankurmahe
Best posts made by coolankurmahe
-
RE: How do I get historical Index Data for NIFTY/SENSEX?
-
OpenAPIScripMaster.json is down and shows null .Also at what rate it gets refreshed ?
Hi,
I wanted to let the team know that OpenAPIScripMaster.json is down and retuning null.
Also, wanted to know for much time I can cache the OpenAPIScripMaster.json in my local system ? I have seen generally tokens are not changing on daily basis.
I am mostly dealing with options. Nifty etc.
Latest posts made by coolankurmahe
-
Do the current month nifty future data/chart provide historical data for expired future contracts as well
I can see the data for NIFTY30MAY24FUT symboltoken = 46930 (which is future contract for current month).
But it also shows in charts and data pulled by getCandleData API the data for previous months, past years though the future contract lasts for only 3 months.Does this mean current month future contract data shows historical data of expired future contracts for each month ?
example: currently NIFTY30MAY24FUT (future contract for May expiry Nifty) shows data for :
May - current month expiry
April- April month expired future data
March - March month expired future data
etc etc ?
Is the above assessment correct ?
If yes, does this also hold for stock futures ? -
Do the current month nifty future data/chart provide historical data for expired future contracts as well
I can see the data for NIFTY30MAY24FUT symboltoken = 46930 (which is future contract for current month).
But it also shows in charts and data pulled by getCandleData API the data for previous months, past years though the future contract lasts for only 3 months.Does this mean current month future contract data shows historical data of expired future contracts for each month ?
example: currently NIFTY30MAY24FUT (future contract for May expiry Nifty) shows data for :
May - current month expiry
April- April month expired future data
March - March month expired future data
etc etc ?If yes, does this also hold for stock futures ?
-
RE: Option Actual Buy Price is not the same(way more than) as returned averageprice from individual_order_details API
@Moderator_1
Hi, But in my case it is reverse , right.
Can you go through above post carefully ?
Average price that was returned was 170.7 as shown in response also.
The buy price was at 183 . It should had never happened because even a lot of next minutes candles at and after 12:01 PM on 15th May, 2024 for above mentioned option never crossed 174 ish.
So, I am not sure where this 183 came from which shows in my order history as buy price on Angel One UI. -
Option Actual Buy Price is not the same(way more than) as returned averageprice from individual_order_details API
@administrators
Please reply this to the earliest as this is related to in-consistency of order's price.
Please take it is urgency as I won't trust if the reasoning of this is not known.The order was placed yesterday (15th May, 2024) through my algo at 12:30:01 for OptionSymbol NIFTY23MAY2422250CE OptionToken 38748
Soon after order was successfully placed, I am fetching order details through individual_order_details API and it returned as following .orderResponse : {'status': True, 'message': 'SUCCESS', 'errorcode': '', 'data': {'variety': 'NORMAL', 'ordertype': 'MARKET', 'producttype': 'CARRYFORWARD', 'duration': 'DAY', 'price': 0.0, 'triggerprice': 0.0, 'quantity': '50', 'disclosedquantity': '0', 'squareoff': 0.0, 'stoploss': 0.0, 'trailingstoploss': 0.0, 'tradingsymbol': 'NIFTY23MAY2422250CE', 'transactiontype': 'BUY', 'exchange': 'NFO', 'symboltoken': '38748', 'instrumenttype': 'OPTIDX', 'strikeprice': 22250.0, 'optiontype': 'CE', 'expirydate': '23MAY2024', 'lotsize': '25', 'cancelsize': '0', 'averageprice': 170.7, 'filledshares': '50', 'unfilledshares': '0', 'orderid': '240515000931623', 'text': '', 'status': 'complete', 'orderstatus': 'complete', 'updatetime': '15-May-2024 12:30:01', 'exchtime': '15-May-2024 12:30:01', 'exchorderupdatetime': '15-May-2024 12:30:01', 'fillid': '', 'filltime': '', 'parentorderid': '', 'ordertag': '', 'uniqueorderid': 'd482ecee-05ef-47c2-afcc-0795978a6bf6'}}
The averageprice is 170.7 in above response and also I can see max 172 in the many next few seconds candle(you can check the candles on angel one UI).
Then, why Angel One UI shows 183 as buy price in my order history and even the loss is also calculated based on that ?
How can this data be so in-consistent when it doesn't match with returned response and candle data of Angel One UI.
Do the return response of individual_order_details API don't give correct averageprice for the order ?
How to make sure we get right buy price ? limit order rather than market order ?
or any other solution you have ? -
RE: logzero not working with smartapi-python==1.4.8 and latest smartapi-python sdk
@Moderator_3 @astrokabir : I figured out the bug at https://github.com/angel-one/smartapi-python/blob/main/SmartApi/smartConnect.py#L131. This bug was introduced in this commit
The loglevel should be logging.INFO rather than logging.ERROR.
It works fine on Linux after making just above correction.
But it still doesn't work on Mac.
@Moderator_3 : Can you get it replicated on Mac and see if it works ? -
logzero not working with smartapi-python==1.4.8 and latest smartapi-python sdk
I downloaded the latest smartapi-python code on github and updated smartapi-python==1.4.8 by pip3 install smartapi-python==1.4.8 and can see the same in pip3 list.
But I can see consistently that logzero logger isn't logging anymore.
If I revert to earlier versions like 1.4.5 and smartapi-python code of that time, it works.I figured it out that a bug was introduced by your team at commit
The loglevel should be logging.INFO rather than logging.ERROR at
https://github.com/angel-one/smartapi-python/blob/main/SmartApi/smartConnect.py#L131Please correct the same.
But this works on Linux but not on Mac. Can you replicate and figure out why ?
Earlier smart api python sdk and installed version 1.4.5 used to work on Mac as well. -
RE: OpenAPIScripMaster.json is down and shows null .Also at what rate it gets refreshed ?
@jaideep-siddula Yes It was. Thanks.
Can you please reply on the second ques.
I have seen generally tokens are not changing on daily basis.
I am mostly dealing with options. Nifty etc.
Wanted to know for much time I can cache the OpenAPIScripMaster.json in my local system ? example like a week ? -
OpenAPIScripMaster.json is down and shows null .Also at what rate it gets refreshed ?
Hi,
I wanted to let the team know that OpenAPIScripMaster.json is down and retuning null.
Also, wanted to know for much time I can cache the OpenAPIScripMaster.json in my local system ? I have seen generally tokens are not changing on daily basis.
I am mostly dealing with options. Nifty etc. -
Attempting to resubscribe/reconnect Websocket2
I have used the code mentioned in git repo https://github.com/angel-one/smartapi-python
I initially did get the ticks for 8 stocks/options for about a 1 min.
I launched my program 4-5 times since wanted to log and test ticks I received.
Then, started getting "Attempting to resubscribe/reconnect Websocket2" again and again.
everytime with no code change.
Is there a rate limit of the amount of tick data we can received in a day or so ?
I only subscribed 7-8 stock/options . But relaunched my program 8-10 times before receiving above error. -
RE: For 15min candle (close, open etc), is there any websocket(not streaming) but on 15 min interval
@Moderator_1 I think Market Data API(though websockets are good) but we will need to write quite some logic to refine the data into candles(15 mins, 5 mins).
Also, it might suffer inaccuracies if even few ticks are missed.Either of APIs suffer lag or downtime.
So, when I tried historical APIs to query , it gave results for current stock price with 1-2 seconds .
I would be happy to use historical APIs if there is no major disadvantage using them ?
Wanted to understand if historical APIs are down sometime during the working hours of stock market ?
Even if few seconds or 60 seconds or so delay in historical APIs to get current price of stock is fine with my algo strategy.
Can you throw light on above please ?