zerodha / kiteconnect-mocks

Mock responses for kiteconnect
25 stars 20 forks source link

Inconsistent last_price_date key and value in MF Holdings response mock mf_holdings.json #20

Closed ShabbirHasan1 closed 2 years ago

ShabbirHasan1 commented 2 years ago

In Accordance with the Kite Connect 3 / API documentation, The MF Holdings Holdings contain the user's portfolio of allotted mutual fund units. response shall contains the key last_price_date key in each item of the mf holdings data array. It is mentioned in the Response attributes as last_price_date (Type: String) - Date for which last NAV is available. https://github.com/zerodha/kiteconnect-mocks/blob/f1ea75a9b44f0647cf2e862f7d74ae3adfcd1c34/mf_holdings.json#L11

However, the mock response file mf_holdings.json contains the last_price_date key and value in the first element of the mf_holdings data array of five elements, rest four array elements have the key last_price_date missing.

Which shouldn't be the case, since it has not been marked as Type: null, String in the Response attributes which would have informed the end user that the key & value of last_price_date is optional and may and may not be there in each element of the mf_holdings array.

Seeking Clarity in regards of the last_price_date key to be optional or mandatory. Thank You.

rhnvrm commented 2 years ago

cc @vishnus @ranjanrak

ranjanrak commented 2 years ago

Seeking Clarity in regards of the last_price_date key to be optional or mandatory.

It's an optional field in the MF holdings response. You need to fetch it from mf/instruments. We will update the doc accordingly.

ShabbirHasan1 commented 2 years ago

Seeking Clarity in regards of the last_price_date key to be optional or mandatory.

It's an optional field in the MF holdings response. You need to fetch it from mf/instruments. We will update the doc accordingly.

Thanks for the clarification 🙏, it surely will help us finalize the deserialization code.