I've seen the following issue raised by others, but haven't been able to solve it. I need to replicate the following CURL in node-red. This was set up for testing in "postman" - it works (not sure if the header cookie is relevant, it only appeared after several test runs) .
curl --location -g --request POST 'https://api.3commas.io/public/api/v2/smart_trades?account_id=31430770&pair=USDT_BTC&instant=true&position[type]=buy&position[units][value]=0.01&position[order_type]=market' \ --header 'APIKEY: 6085eafd6d494d43b3aa5997d8bd2c1f3beeba7b4c2a419e8d74c7f2d3d0ebaa' \ --header 'Signature: f0d2ff4e8fdd73e193d2aa8f8e719c382b4506855dd5cbd8daf96d11ceeb98a0' \ --header 'Cookie: _mkra_stck=pg%3A1642104837.4985697' \ --data-raw ''
Tried HTTP Request, Function, Change Node configs - I keep getting "bad signature" response because likely there is some variation in the msg load (which is not matching the signature) ...
the signature is HMAC-SHA256 generated using url "/public/api/v2/smart_trades?account_id=31430770&pair=USDT_BTC&instant=true&position[type]=buy&position[units][value]=0.01&position[order_type]=market" and secret key.
So somehow the curl needs to be replicated identically.