Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Results not being populated for couple of MFs #37

Closed
manigandandba opened this issue Sep 26, 2022 · 4 comments
Closed

Results not being populated for couple of MFs #37

manigandandba opened this issue Sep 26, 2022 · 4 comments

Comments

@manigandandba
Copy link

Hi,
I have been using your API for the last few months and it is really fantastic as I have never got a single issue until yesterday. Appreciate your awesome work. I recently tried with couple of mutual funds but I am not getting results out of it and instead the result set is empty. Can you please check and resolve at the earliest ?

MF numbers - 119066 ('HDFC Childrens Gift Fund - Direct Plan') and 120724 ('UTI CCF Investment Plan - Direct Plan - Growth Option')

FYI : I'm using the latest version of the package.

@manigandandba
Copy link
Author

Hi,
I have gone through your code and proposing the below change in "mftool.py" to accommodate other schemes too. Please verify and release the version at the earliest.

def get_scheme_codes(self, as_json=False):
    """
    returns a dictionary with key as scheme code and value as scheme name.
    cache handled internally
    :return: dict / json
    """
    scheme_info = {}
    url = self._get_quote_url
    response = self._session.get(url)
    data = response.text.split("\n")
    **for scheme_data in data:
        scheme = scheme_data.split(";")
        if len(scheme) == 6:
            scheme_info[scheme[0]] = scheme[3]**
    return self.render_response(scheme_info, as_json)

@manigandandba
Copy link
Author

@NayakwadiS : Not sure if you get a notification for the above. Hence, added.

@NayakwadiS
Copy link
Owner

If this solution is working for all mf schemes available then you can raise pull request with valid unit test

@NayakwadiS
Copy link
Owner

#55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants