---
title: "Discussion on \"Getting Mutual Funds Net Asset Value via Python using mftools API\" | Hashnode"
description: "Discussion on \"Getting Mutual Funds Net Asset Value via Python using mftools API\". Learn to fetch Mutual Funds Net Asset Value (NAV) using Python and mftools API. Analyze daily performance and build a database of mutual fund prices"
url: "https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Getting Mutual Funds Net Asset Value via Python using mftools API](https://tradewithpython.hashnode.dev/getting-mutual-funds-net-asset-value-via-python-using-mftools-api?utm_source=hashnode&utm_medium=feed)

Learn to fetch Mutual Funds Net Asset Value (NAV) using Python and mftools API. Analyze daily performance and build a database of mutual fund prices

May 12, 2021 · 6 min read · tradewithpython.hashnode.dev  
Updated Sep 2, 2023  
Read the article

-   [#python](https://hashnode.com/tag/python)
-   [#python3](https://hashnode.com/tag/python3)
-   [#python-beginner](https://hashnode.com/tag/python-beginner)
-   [#python-projects](https://hashnode.com/tag/python-projects)
-   [#beginners-learningtocode-100daysofcode](https://hashnode.com/tag/beginners-learningtocode-100daysofcode)

## Written by

[Shreyans Jain](https://hashnode.com/@Shreyans)

@Shreyans · India

  
[View profile](https://hashnode.com/@Shreyans)

Aspiring Data Analyst and Algo Trader

## Responses 5

Markdown supported · ⌘↵ to post

[sourav palui](https://hashnode.com/@spalui13)

[Feb 24, 2024](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/65d969eba2e0cc8b7a1d1a41)

Hi, I tried to run this code today. Due to deprecation warning, it is not able to fetch historical NAV for all schemes. If you could please help. Appreciate it.

[Daniel Webster](https://hashnode.com/@DaniWanderer)

[Nov 18, 2023](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/65590d2e2a6c065f3be4d5c8)

Amazing..!

[Tamil Mani](https://hashnode.com/@TamilMani)

[Jan 26, 2022](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/61f0e2e387fd2728e7cd4c33)

Hi, Good contribution. Btw i would like to know if holdings list of each scheme is available ? Thanks in advance

[Yash Roongta](https://hashnode.com/@yash12392)

[Jan 26, 2022](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/61f0e2e387fd2728e7cd4c33#reply-61f13d5787fd2728e7cd5815)

Hi [Tamil Mani](https://hashnode.com/@TamilMani) sorry, that data is not readily available via APIs, you can try investpy which scrapes data from Investing.com and would have this info but not all Indian Mutual Funds are available here.

[Tamil Mani](https://hashnode.com/@TamilMani)

[Jan 26, 2022](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/61f0e2e387fd2728e7cd4c33#reply-61f14de287fd2728e7cd5a50)

[Yash Roongta](https://hashnode.com/@yash12392) Thanks for your prompt reply. Let me try with the way you suggested. thanks once again !!

[fuubutsushi](https://hashnode.com/@fuubutsushi)

[Jun 25, 2021](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/60d55b765ed303057acea368)

Hi [Shreyans Jain](https://hashnode.com/@Shreyans),

Great work on the code. But getting an error while calling the function when executing the dataframe.

`Traceback (most recent call last):   File "C:/Users/am/Desktop/Python/Working/amfi.py", line 31, in <module>     values_df = HistoricalNav(scheme_code_list = scheme_code_list[0:5], start_date= '01-05-2021', end_date= '01-05-2021')   File "C:/Users/am/Desktop/Python/Working/amfi.py", line 22, in HistoricalNav     df = df.sort_values(by = 'date') # sorting the values of every Scheme code based on Date   File "C:\Users\am\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\frame.py", line 5455, in sort_values     k = self._get_label_or_level_values(by, axis=axis)   File "C:\Users\am\AppData\Local\Programs\Python\Python39\lib\site-packages\pandas\core\generic.py", line 1684, in _get_label_or_level_values     raise KeyError(key) KeyError: 'date'`

Regards, Fuubutsushi

[Shreyans Jain](https://hashnode.com/@Shreyans)

[Jun 29, 2021](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/60d55b765ed303057acea368#reply-60dac6bd703d372ea06c980f)

Hi [fuubutsushi](https://hashnode.com/@fuubutsushi) Thanks for pointing out the error. The code has been modified to solve the issue. The article will be modified soon.

For easy reference, the Colab link is attached here as well - [bit.ly/3hjWDS8](https://bit.ly/3hjWDS8)

[Yash Roongta](https://hashnode.com/@yash12392)

[May 12, 2021](https://hashnode.com/posts/getting-mutual-funds-net-asset-value-via-python-using-mftools-api/609c0760e8590d4b4460ec46/comment/609c0db1b684eb4cd52c24f8)

Amazing article [Shreyans Jain](https://hashnode.com/@Shreyans), good to have you as a contributor on Trade With Python.
