Loan and Repay Endpoint does not deliver data

I do a REST query against /sapi/v1/margin/repay and /sapi/v1/margin/loan

I always get:

{
    "total": 0,
    "rows": []
}

In fact I checked the timestamp (December 2020) is right before my real trade, archived is set to true and the asset is correct.

I checked there are loans and repayments existing. Is there anything wrong why it doesn’t deliver my loans/repayments?

1614556800000 = Monday, 1 March 2021 00:00:00

Try setting startTime to before December 2020

I tried with a lot of timestamp. A day before the repayment, a week before, a year before. Nothing wotks.
On Koinly I can see the repayment is existing 06.12.2020.

@backoffice1 seems to have the same problem.

I encounter the same, each response is empty. But I did margin trades in the past and lend some USDT for it.

@aisling binance disabled the margin feature in my country. Could this be a reason?

Nevertheless seems koinly to be able to list my loan in there history. Could there by any other way to get access to historical loans for margin trades?

You must provide startTime and endTime.

Update the time range of the response data for the following margin account endpoints, startTime and endTime time span will not exceed 30 days, without time parameter sent the system will return the last 7 days of data by default

In the 2021-10-14 changelog.

It would be nice to add this important note in the endpoints descriptions.

2 Likes

@GG-lemon thank you very much! Saved my day. It is a shame that they are writing a changelog but not updating their documentation.