Rate limit is 10 reqs for second but getting ratelimit error on 6th request

@Tradehull_Imran @Hardik

def  test_rate_limit():
    wl = [('ALUMINI', 442159), ('ALUMINIUM', 442160), ('COPPER', 442161), ('COTTONCNDY', 439040), 
          ('CRUDEOIL', 441305), ('CRUDEOILM', 441306)]
    dhan_api = dhanhq(client_id,token)
    payload = {
        'security_id': '', 
        'instrument_type': 'FUTCOM',
        'from_date': '2025-03-21',
        'to_date': '2025-03-21',
        'interval': 1,
        'exchange_segment': 'MCX_COMM'
        }  
    for scrip in wl:
        payload['security_id'] = scrip[1] 
        resp = dhan_api.intraday_minute_data(**payload)
        if resp['status'] == 'failure':
            print(scrip[0] , 'failure' )
            print(resp)
            continue
        print(scrip[0] , 'suucess' )

Hi @butta12 ,

Do update to our latest codebase version 3.0.6:

  • Open Command Prompt: Press Win, type cmd, and press Enter.
  • Install Dhan-Tradehull: Run pip install Dhan-Tradehull
  • Confirm the installation by running pip show Dhan-Tradehull

Guide to use the updated codebase:
Refer the below pypi link for more details:
https://pypi.org/project/Dhan-Tradehull/

Video reference :

@Tradehull_Imran

Dhan has changed rate limits , but did not announced