nicehash/rest-clients-demo

NHOS POST Malformed request 60 with /main/api/v2/mining/rigs/status2

liamcole45 opened this issue · 3 comments

Hi, GET API examples work fine, keep getting a malformed request with POST. Is anyone able to tell me what this error code is related too?

python3 nicehash.py -b https://api2.nicehash.com -o orgid -k key -s secret -m POST -p /main/api/v2/mining/rigs/status2 -d '{"rigId": "rigidhere", "deviceId": "2-4", "action": "STOP"}'

Unexpected error: 400: Bad Request: b'{"error_id":"b8220586-b6b5-4cf6-a793-aaf8fde97432","errors":[{"code":60,"message":"Malformed request"}]}'

My rig is running NHOS

scripts run

Please can someone help me in doing that

bl4z commented

the easies way by far would be to make test request with help of docs ..
https://www.nicehash.com/docs/rest/-miner-private // login to NH and use .. Fill logged-in user credentials
from there u can test api call and see params and responses

Screenshot 2023-10-24 at 08 46 21