gdax-python-api icon indicating copy to clipboard operation
gdax-python-api copied to clipboard

cancel_order fails "Bad Request"

Open remarqUK opened this issue 7 years ago • 0 comments

If you try to cancel an order through this API you get a 400 Bad Request error

I managed to track it down to the payload that is being used to authenticate the request. This is used to generate headers for the request.

headers = self._auth_headers(path, method='DELETE', body=json_data)

In a delete request the variable json_data is empty. I believe this is why the headers fail. By setting the json_data value to "{}" (empty json) then it works

remarqUK avatar Jan 23 '18 11:01 remarqUK