interestHistory suggestion

Unlike the commissions for buying or selling (maker or taker) that are charged automatically when opening or closing the operation, the interest for making a loan is not automatically charged by the system when paying the loan, then there is nothing left but look for alternatives to consult and calculate the interest of a loan, the documentation allows to consult the interest history of an asset, at the time of making a loan automatically a new record is added to this history according to the asset that we borrow or in BNB if We have the option to pay commissions with this asset activated, the problem is that although this new record has a field called interests, this only reflects the interest that was charged at the time of requesting the loan, so it does not matter how many hours have passed since it was I request the loan, this field is not updated to reflect the interest generated in the hours elapsed, my suggestion is that as well as the mom In order to pay the loan, the field type changes from ON_BORROW_CONVERTED to PERIODIC_CONVERTED to possibly indicate that the loan that generated that interest is already paid, they should also update the interest field to reflect the total interest to pay

As can be seen in the image when making the query to interestHistory, this does not show me the real interest generated by the operation (0.00005557), only the interest that was charged at the time of requesting the loan (0.0000111) even when the loan has already been paid
When applying for a loan automatically, a record is added to the interest history, however there is no way to relate that record to the loan, my next suggestion is that you add the tranId field that we obtain in response to borrowing to the interest history in that way it could be identified to which loan these interests belong
In this way, through the tranId we could obtain the amount that was borrowed and at what moment by consulting the loan history and we would obtain the interest rate and the asset in which the interest is paid by consulting the interest history

thank you for your feedback, will forward to the team for review.

1 Like