Unexpected err=AssertionError(), type(err)=<class 'AssertionError'>

Created at 05 Jun 2023, 18:49
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
AN

andrew.okri@gmail.com

Joined 05.06.2023

Unexpected err=AssertionError(), type(err)=<class 'AssertionError'>
05 Jun 2023, 18:49


I get Unexpected err=AssertionError(), type(err)=<class 'AssertionError'> whenever l send a ProtoOAGetDynamicLeverageByIDReq() request to the server in python. It happens also when it is the only line of code executed. Has anyone experienced this issue? If so please could you give me some advice or comment on what to do to get round this issue. The content of function is as follows:

 

def sendProtoOAGetDynamicLeverageByIDReq(leverageId ):

    request = ProtoOAGetDynamicLeverageByIDReq()

    request.payloadType = ProtoOAPayloadType.PROTO_OA_GET_DYNAMIC_LEVERAGE_REQ.value

    request.ctidTraderAccountId = accountId

    request.leverageId = int(leverageId)

    deferred = self.client.send(request)

    deferred.addCallback(leverageResponseCallback)

    deferred.addErrback(self.onError)

    return deferred


@andrew.okri@gmail.com
Replies