U
U
U_n_d_e_r2021-05-07 15:41:13
C++ / C#
U_n_d_e_r, 2021-05-07 15:41:13

API request error?

When sending a post request to the site (Binance), an error occurs.

{"code":-1101,"msg":"Too many parameters; expected '6' and received '9'."}


The request looks like this:

var request = new RestRequest("/api/v3/order", Method.POST);
            request.AddHeader("X-MBX-APIKEY", apikey);
            request.AddQueryParameter("symbol", "CTSIBTC");
            request.AddQueryParameter("side", "BUY");
            request.AddQueryParameter("type", "STOP_LOSS_LIMIT");
            request.AddQueryParameter("timeInForce", "GTC");
            request.AddQueryParameter("quantity", quanyty);
            request.AddQueryParameter("price", price);
            request.AddQueryParameter("timestamp", timestamp);
            request.AddQueryParameter("signature", CreateSignature(request.Parameters, secret));
            request.AddQueryParameter("stopPrice", stopPrice);
            var response = client.Get(request);

I don’t really understand what the error is, I re-read the site several times, and could not correct the error.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
antonwx, 2021-05-07
@U_n_d_e_r

They wrote to you: 6 parameters are expected from you, and you give him 9.
Either you misread the docks, or they are stupidly outdated.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question