Margin loan and repay archived parameter issue

Hello,

I’m trying to get the margin loan and repay histories with /sapi/v1/margin/loan and /sapi/v1/margin/repay.
The documentation says Set archived to true to query data from 6 months ago and that’s how we implemented our code to get historical data. Query up to 6 months ago with archived to true and switch to false for the recent data (less than 6 months).

However, we just noticed that for at least some users, some data that is more than 6 months old is not returned when archived is true but is returned when archived is false.
I don’t know if it’s for all accounts or just a subset.

Example with an account having the issue:
Query https://api.binance.com/sapi/v1/margin/loan with the following params {‘startTime’: 1621468800000, ‘endTime’: 1624060799999, ‘asset’: ‘USDT’, ‘size’: 100, ‘current’: 1, ‘archived’: ‘true’}
(May 20, 2021 0:00:00 to June 18, 2021 23:59:59.999)

The response most recent entry is 1622120641557 (May 27, 2021 13:04:01.557)

Query https://api.binance.com/sapi/v1/margin/loan with the following params {‘params’: {‘startTime’: 1621468800000, ‘endTime’: 1624060799999, ‘asset’: ‘USDT’, ‘size’: 100, ‘current’: 1, ‘archived’: False} (May 20, 2021 0:00:00 to June 18, 2021 23:59:59.999) - same date range more than 6 months ago
The response contains entries from 1622280126449 (May 29, 2021 9:22:06.449) to 1623366958537 (June 10, 2021 23:15:58.537)

A quick fix would be appreciated. In the meantime, we have no choice but query with archived set to both true and false for all time ranges.

For when archived= true, have you requested with current= 2 to see if it contains more records (more recent than May 27, 2021)?

Thank you for taking the time to check and answer.
There were less than 100 rows in the response, so I believe current=2 would not give more records.
Furthermore, if I changed the time range to be June 1 to June 30 for example, I would get 0 record with archived=true but records with archived=false.

OK, since we don’t have another reported case, your account ID will be needed to further check this situation.
As next step, can you please contact your account manager and let him redirect to the right team to check this issue further please? I don’t have access to more data than the public ones, so I won’t be able to help further.
Apologies for this back and forth.