In class com.zerodhatech.models.Position, all the Quantity fields are Integers (int), other than dayBuyQuantity and daySellQuantity, which are double. Why? This does not make sense at all. How can a Quantity be a fractional?
@SerializedName("day_buy_quantity") public double dayBuyQuantity; @SerializedName("day_sell_quantity") public double daySellQuantity;
It was a legacy decision. Back in v1 of Kite Connect APIs, buy value and sell value wasn't there. It was calculated in the front end. Now that API is sending those values, it makes sense to change it to quantity. We will change it in next release.
Okay. If I understand your comment correctly, the decision to have these values as double is a legacy decision and they will be changed to int in a future release. Is that correct or have I misunderstood your comment?
We will change it in next release.