It looks like you are trying to use the Coinbase Prime API to cancel existing pending orders. The endpoint you are using is “/api/v3/brokerage/orders/batch_cancel” and you are passing the order ID in the payload. However, it looks like you are not passing the correct parameters in the payload. The correct payload should be in the following format: payload = json.dumps({ “order_ids”: [ { “market”: market, “order_id”: id } ] }) Make sure you are passing the correct parameters in the payload and that the order ID is valid. If you are still having issues, please contact Coinbase Prime support for further assistance.
I’m not from Coinbase btw but it works for me. I’m NOT setting “market”: market, “ , that is not even part of the documentation on Cancel Orders | Coinbase Cloud so I don’t know what @Sandy is on about.
But what might be the issue: are you setting the header (correctly)?