Docs has following advice on "/parameters": "The API has several parameters whose values are sets of enums, from exchange names, order types, to margin and product types. Although these change rarely, it’s best not to hardcode their string values in your implementation. You should create a mutable map of these values that can be updated programmatically. The /parameters call gives you a complete list of such parameters with their enum values."
Can you please explain whats meaning of this ?
Consider: "transaction_type": [ "BUY", "SELL" ],
So programmatically I am storing map: Enum_BUY -> "BUY" Enum_SELL -> "SELL"
If after some days, values change to "transaction_type": [ "BS11", "BS22" ],
How would my program know if Enum_BUY corresponds to BS11 or BS22 ? For this I have to manually consult kite.trade on changes
I did not understand your advice. How can program work without manual consultation on parameter value changes ? Can you please explain ?
@sameer It is extremely unlikely that these values will change. It's meant to be an easy way to check new additions, like a new order type (even that is going to be exceptionally rare).
Agree Kailash, but I dont know how even in that extreme case how "/parameters" will solve it programatically ? Programmer has to manually resolve those changes
Better be update change log and alert mail to existing clients... Also check documentation and actual response structure both are diffrent for example quotes .....
@gautam_s60 This'll be done for sure. Major changes will be communicated beforehand. Will check the docs.
@sameer If you're concerned about changes, you can always fetch the /params values every day (morning or multiple times), store it in a config file or DB and load the constant values from there.
Programmer has to manually resolve those changes
@sameer If you're concerned about changes, you can always fetch the /params values every day (morning or multiple times), store it in a config file or DB and load the constant values from there.