Variable in post cause signature error

Hi there,

I am trying to set a value dynamically in the params tab

If i have nothing in prescript, it runs fine. However if I try to to change the value of quantity (4, this would be dynamic but for test purpose its static…)

Added to prescript> {
if (param.key == ‘quantity’ ) {
Object.assign (param,{“value”:“4”})

The value is set correctly you can see in the url, “&quantity=4” :heavy_check_mark: but a signature error appears. :exclamation:

found this post, request error with variable in POSTMAN
but i could not go any further

any ideas? does timestamp and signature need to be recalculated (i dont know how to do this :frowning: )


Are you sure your used api key pair belongs to SPOT testnet account?

More: FAQ: Signature for this request is not valid.


If i take the prescript code out. its works.

Any more ideas?


Here is a simpler example with “allOrders”. Static (works) and dynamic (error)

What am i missing :frowning:

I have same problem : :sweat:

Hi. This is because while you were editing the url, that parameter switches to the last of the query string sent out to the server. (You can open the console to see the final request.) The server may fetch the wrong query parameters to verify the signature. As long as you shift the “signature” parameter to the last, it will work.

Thank you. I forgot other param to gen a signature.
Screenshot 2564-06-11 at 14.18.41