how to get order history

How do i use the api/v3/allOrders ?
I created the hmac signature and made a request with the signature in the params i get this

data: {
  code: -1104,
  msg: "Not all sent parameters were read; read '2' parameter(s) but was sent '3'."
}

there is one parameter not required sent to sever, pls share the original parameters for debug. No signature.

var query = {
symbol,
timestamp: from,
};
query = qs.stringify(query);
const sign = crypto
  .createHmac("sha256", api_secret)
  .update(query)
  .digest("hex");
const response = await axios({
  url: "/api/v3/allOrders",
method: "GET",
baseURL: "https://api.binance.com",
headers: {
  "X-MBX-APIKEY":
    "VTRydFVYKEOlzXCmvg1LLZKkGcx6IaO5egtPG24ro170XXXXXXXXXXXX",
},
params: {
  symbol,
  timestamp: from,
  singature: sign,
},
}).catch((err) => {
console.error(err);
});

here us the snippet im using. Thanks in advance !
This code is receiving the SYMBOL and FROM param from a function call

have a try by adding all parameters in the url, like


GET https://api.binance.com/api/v3/allOrders?symbol=BTCUSDT&timestamp=1592303537329&signature=4e48387a5a0f708b67776d8cbaea55

I’m getting this new error for whatever timestamp iinput. Even the current timestamp

{
"code": -1021,
"msg": "Timestamp for this request is outside of the recvWindow."
}

your local time is out of sync, please try to sync to standard time.
set recvWindow = 60000 may reduce the chance of this error, but not recommend for production.

Standard time as in UTC?

I like this site to check if my time is synced.

https://time.is/

I managed to figure out the timestamp but i’m still stuck with the original issue

/api/v3/allOrders?symbol=BTCUSDT&timestamp=1592388274003000&recvWindow=60000&singature=66e09f9bd353f736ffbeeb9b246ba55ef69b78e6e06e5c19358xxxxxxxxxx

This gives me

data: {
  code: -1104,
  msg: "Not all sent parameters were read; read '3' parameter(s) but was sent '4'."
}

timestamp is 13 number, in milliseconds

@kautilyak

Hey, how did you solve the time stamp issue?

singature???
what parameter is that?