Based on furas answer,I discovered that not only body must be included, but also the parameters. So the create_withdrawal must be implemented like this:
def create_withdrawal(self, ccy, amount):
clientId = self.create_client_id()
endpoint = f'/api/v5/fiat/create-withdrawal?paymentAcctId=my-account?ccy={ccy}?amt={amount}?paymentMethod=PIX?clientId={clientId}'
body = {
"paymentAcctId": "my-account",
"ccy": ccy,
"amt": amount,
"paymentMethod": "PIX",
"clientId": clientId,
}
url = self.baseURL + endpoint
request = 'POST'
header = self.get_header(request, endpoint, body = json.dumps(body))
response = requests.post(url, headers = header, data = json.dumps(body))
return response.json()