zerodha / kiteconnect-mocks

Mock responses for kiteconnect
25 stars 20 forks source link

Inconsistent last_instalment timestamp format across mf_sip_info.json and mf_sips.json #19

Closed ShabbirHasan1 closed 2 years ago

ShabbirHasan1 commented 2 years ago

While Retrieving an individual SIP, the server returns the sip details in the format mf_sip_info.json which contains the last_instalment details as the timestamp at which the last instalment was triggered. https://github.com/zerodha/kiteconnect-mocks/blob/5cbd68020068d3d12144814ebfab6db7ad79c015/mf_sip_info.json#L19

And while Retrieving all SIPs the server returns the list of all active and paused SIPs in the format mf_sips.json which contains an array of all the individual sip details in the format mf_sip_info.json with the same last_instalment details as the timestamp at which the last instalment was triggered. https://github.com/zerodha/kiteconnect-mocks/blob/5cbd68020068d3d12144814ebfab6db7ad79c015/mf_sips.json#L20

However, in both responses the last_instalment details type mismatches:

  1. The mf_sip_info.json shows the last_instalment timestamp as 2021-06-10 08:37:11.273142 with microseconds in it, Hence the effective format is %Y-%m-%d %H:%M:%S%.f
  2. The mf_sips.json shows the last_instalment timestamp as 2021-05-05 05:56:27 without the microseconds, Hence the effective format is %Y-%m-%d %H:%M:%S

Since mf_sip_info.json is a subset of mf_sips.json, both should have the same timestamp format to easily deserialize with reusable code. In addition, Kite Connect 3 / API documentation highlights the [Response attributes](Kite Connect 3 / API documentation) to be consistent in both responses.

rhnvrm commented 2 years ago

cc @vishnus @ranjanrak