How to use "startTime" parameter with the "aggTrades" endpoint?

I am trying to run “aggTrades” with “startTime”:

curl https://api.binance.com/api/v3/aggTrades\?symbol\=BNBBTC\&startTime\=1514764800000 

but getting the error:

{"code":-1128,"msg":"Combination of optional parameters invalid."}%

The “startTime” parameter is listed as valid in the Doc:
https://github.com/binance/binance-spot-api-docs/blob/master/rest-api.md#compressedaggregate-trades-list

How can I run this query correctly?

It would indeed help to clarify the usage. If there is a hard rule for some endpoints that only combined properties are accepted, that would be great to mention. Especially when this is different for other endpoints.

How can I run this query correctly?

The startTime parameter is only accepted in combination with endTime parameter.

Thank you, just tried with both startTime and endTime and it works indeed!
Which seems counterintuitive given how the Doc is phrased:

  • If both startTime and endTime are sent, time between startTime and endTime must be less than 1 hour.

The “If” seems to suggest using only startTime would work. It also works with the “klines” endpoint.

This is incorrect.

The above statement does not imply that either of the two endpoints can be sent separately.

With that said, thank you for the feedback, the endpoint’s notes can be better clarified.