I know that the rate limit of historic API is 3 requests per second. However today I am getting error b'Access denied because of exceeding access rate' randomly. sometime just after 1st request, sometimes after 2nd request.
@admin @admin123 is there any problem with the API today? Please confirm.
whemant
@whemant
Best posts made by whemant
-
Historic API not working
Latest posts made by whemant
-
RE: Attempting to resubscribe/reconnect
@0xc0de Yes, I managed to fix it. There was a small error in my code. Strangely the previous version of smartapi-python did not have any issues with this error, but the new version did. As soon as I installed the new version, the problem started appearing.
It is easy to check if your code also has some existing issues. In the smartWebSocketV2, in the _on_error function, print the error message, and it will show what is wrong with your code:
def _on_error(self, wsapp, error):
print(f'error: {error}') -
Attempting to resubscribe/reconnect
Hello,
I have been using WebSocket in my Python code for a while. Today, I had to reinstall smartapi-python and websocket-client because my virtual environment's library got deleted by mistake. I didn't make any changes to my Python code. After reinstalling these libraries, I started encountering the error message 'Attempting to resubscribe/reconnect'. The code was working fine until yesterday.
Why is this error appearing now?
I am using Python 3.10.7.
-
Websocket to fetch options data
Hello,
I am using Websocket to fetch live data for stocks. I have a requirrement to fetch index options data. Please can somebody confirm what value I need to pass to exchangeType? I tried using various values as mentioned in the code:
exchangeType: integer possible values -> 1 -> nse_cm 2 -> nse_fo 3 -> bse_cm 4 -> bse_fo 5 -> mcx_fo 7 -> ncx_fo 13 -> cde_fo
But none of these are producing the results.
Is there any other change I need to do to get index option data?
Thanks in advance
-
Historic API not working
I know that the rate limit of historic API is 3 requests per second. However today I am getting error b'Access denied because of exceeding access rate' randomly. sometime just after 1st request, sometimes after 2nd request.
@admin @admin123 is there any problem with the API today? Please confirm. -
RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language
Hi @asho and @vrkhyd if anyone of you can provide any help on this? Thanks.
-
RE: User Feedback - WebSocket 2.0 Beta Rollout – Python Language
Hi @vrkhyd,
I am getting data in below format:
{'subscription_mode': 3, 'exchange_type': 5, 'token': '246083', 'sequence_number': 2414112, 'exchange_timestamp': 1674818721000, 'last_traded_price': 672400, 'subscription_mode_val': 'SNAP_QUOTE', 'last_traded_quantity': 1, 'average_traded_price': 667360, 'volume_trade_for_the_day': 8589, 'total_buy_quantity': 644.0, 'total_sell_quantity': 384.0, 'open_price_of_the_day': 661700, 'high_price_of_the_day': 672700, 'low_price_of_the_day': 661700, 'closed_price': 653300, 'last_traded_timestamp': 1674818717, 'open_interest': 535600, 'open_interest_change_percentage': -4627489742054556454, 'upper_circuit_limit': 679400, 'lower_circuit_limit': 627200, '52_week_high_price': 678100, '52_week_low_price': 599400, 'best_5_buy_data': [{'flag': 0, 'quantity': 7, 'price': 672600, 'no of orders': 6}, {'flag': 0, 'quantity': 14, 'price': 672700, 'no of orders': 12}, {'flag': 0, 'quantity': 10, 'price': 672800, 'no of orders': 10}, {'flag': 0, 'quantity': 7, 'price': 672900, 'no of orders': 6}, {'flag': 0, 'quantity': 29, 'price': 673000, 'no of orders': 21}], 'best_5_sell_data': [{'flag': 1, 'quantity': 35, 'price': 672400, 'no of orders': 11}, {'flag': 1, 'quantity': 23, 'price': 672300, 'no of orders': 3}, {'flag': 1, 'quantity': 1, 'price': 672200, 'no of orders': 1}, {'flag': 1, 'quantity': 2, 'price': 672100, 'no of orders': 2}, {'flag': 1, 'quantity': 12, 'price': 672000, 'no of orders': 4}]}
Please could explain how you are converting this data in to get 1 min candlestick data? If you could share your code that will be of great help. Thanks.
-
FINNIFTY token not available
@admin FINNIFTY index token not available in https://margincalculator.angelbroking.com/OpenAPI_File/files/OpenAPIScripMaster.json
when this will be available?
-
RE: FINNIFTY TOKEN NOT PRESENT
@admin any updates on this? When this will be available?
-
RE: Automate totp login using python module - pyotp
@SSumit That great. Thanks for this.
I am getting another errorTypeError: SmartConnect.generateSession() takes 3 positional arguments but 4 were given
Any idea how to fix this?