Error with dhanhq API

Hi,
I am getting below error with dhanhq. It used to work before.

Dhan = dhanhq(client_code, token_id)
TypeError: dhanhq.init() takes 2 positional arguments but 3 were given

Hey @Rohit_Tikekar ,

Hope you are using the latest version 2.1.0 , if not please switch to the same. Below given are steps is the steps to integrate the library.

pip install dhanhq==2.1.0

from dhanhq import DhanContext, dhanhq

dhan_context = DhanContext("client_id","access_token")

dhan = dhanhq(dhan_context)

To know more refer : https://github.com/dhan-oss/DhanHQ-py

Hi,

I was using the latest version but not using dhan_context. It is working now.

Thank you for your help.

Is 2.1.0 stable? Yanked?

Dont be surprised , You wont be getting an official update one this

Hey @Arun86 @VijayNair

We have kept Python v2.1.0 as yanked for now, given it changes the library with some breaking points including dhan_context. This will be updated in the next release, wherein we will make the latest version as default.

Since 2.1.0 is yanked 2.0.2 is stable version.