Parameter issues with /vapi/v1/bill

Hello, I’ve been trying to use Binance API Documentation

First of all, I find it strange and inconsistent with the other endpoints that this endpoint is a “POST” and not a “GET”.

Then, I have issues with several parameters.

  1. recordId

I cannot find the correct format to pass to the API. Using an id from the API response doesn’t work.
Here is an example of call and response:

https://vapi.binance.com/vapi/v1/bill?recordId=1125899906844498152&currency=USDT&limit=10&recvWindow=5000&timestamp=1647910640484
-1102 Mandatory parameter 'recordId' was not sent, was empty/null, or malformed.

Passing a small int doesn’t return an error but obviously doesn’t filter properly.

  1. startTime

I cannot find the correct format to pass to the API. Using a millisecond timestamp from the API response doesn’t work.
Here is an example of call and response:

https://vapi.binance.com/vapi/v1/bill?startTime=1647561600000&currency=USDT&limit=10&recvWindow=5000&timestamp=1647910698107
-1102 "Mandatory parameter 'startTime' was not sent, was empty/null, or malformed."

Passing endTime only or both startTime and endTime gives the same issue.

  1. limit

The limit parameter seems to be ignored: the response has more items than limit.
Here is an example of parameters sent:

https://vapi.binance.com/vapi/v1/bill?currency=USDT&limit=3&recvWindow=5000&timestamp=1647910735344

I receive a full response with 80+ items.

If you know about workarounds or could fix these issues, it would be appreciated.

Could you kindly include the raw query string sent to the server instead of a json object. Omit any sensitive information.

Hello @tantialex , I updated the original post to replace the parameters by the full query string (without signature).

Hello, any chance of an update please?

should be fixed. Please check again.

@dino Thank you for the update, I gave it a try.

  1. recordId

It now applies a filter but doesn’t change the endpoint behaviour so kind of useless. The current behaviour is to add an additional filter on top of the N most recent records. It does not allow pagination.

Example:
https://vapi.binance.com/vapi/v1/bill?recordId=1&limit=2&currency=USDT returns the 2 most recent records (recordId has no effect).
It is the same with an actual recordId.

Expected behavior would be to return records immediately at or after recordId (recordId > value order by recordId ASC), similar to other endpoints.

  1. startTime and endTime

It now applies a strict filter. Would it be possible to change it to a non-strict filter in order to be similar to other endpoints with startTime and endTime filters?

Example:
https://vapi.binance.com/vapi/v1/bill?startTime=1648183102000&endTime=1648183202000&limit=2&currency=USDT will not return the records where createdDate=1648183102000 and createdDate=1648183202000.

  1. limit

Seems to work correctly.

Thank you for the update. A follow-up would be appreciated, thanks!