I can successfully submit a POST spot order test with test parameters:
https/api3.binance.com/api/v3/order/test?quantity=1.1&side=SELL&signature=xxxx&symbol=ETHBTC×tamp=1662624739027&type=MARKET
But, when I add a value for newClientOrderId in the API call (and in the signature creation), the POST api action fails with 502 Bad Gateway. I have tried many different values for newClientOrderId (noting that none of these values have been posted to the production system previously) and ensure this is a string value.
https/api3.binance.com/api/v3/order/test?newClientOrderId=order8855577942&quantity=1.1&side=SELL&signature=xxxx&symbol=ETHBTC×tamp=1662622049482&type=MARKET
I am using the Swagger API definitions and they seem to work fine.
The strange thing is that it works if newClientOrderId is the first parameter in the string input to the signature function … but not if newClientOrderId is the second or later parameter in the string input to the signature function.
I thought the parameters input to the signature function didn’t have to be in a particular sequence, and actually it works if the other fields are in whatever sequence. But newClientOrderId must be the first parameter, and then it works! Any conclusions? Thanks.
POST https://testnet.binance.vision/api/v3/order/test?symbol=ETHBTC&side=SELL&type=MARKET&quantity=1.1&newClientOrderId=order885557794×tamp=1662654343023&signature=signature