Friday, 18 June 2021
  1 Replies
  1.9K Visits
  Subscribe
Hi,

I want to set leverage before entering position. But when I call it in the code as I mentioned below, I get an error. It mentions missing parameter or empty. There doesn't seem to be any problem with timestamp taken in sgcHTP_API_Binance.pas. How can I set pre-position leverage without getting this error?

Post Code:

procedure TFRMSGCBinanceTradeFutures.Button1Click(Sender: TObject);
begin
DoBinanceAPI;

DoLog(binancefut.REST_API.ChangeInitialLeverage(txtSymbol.Text, 5));
end;


Error Msg:

HTTP/1.1 400 Bad Request. {"code":-1102,"msg":"Mandatory parameter 'timestamp' was not sent, was empty/null, or malformed."}



Thank You.