Code below (from futures_types.py)
class GetFuturesPositionResponse(BaseResponse):
def init(self, response: dict):
if "position" in response:
self.position: Optional[FCMPosition] = FCMPosition(
**response.pop("position")
)
super().init(**response)
TypeError: coinbase.rest.types.futures_types.FCMPosition() argument after ** must be a mapping, not NoneType
Potential fix:
class GetFuturesPositionResponse(BaseResponse):
def init(self, response: dict):
if "position" in response and response["position"] is not None:
self.position: Optional[FCMPosition] = FCMPosition(
**response.pop("position")
)
super().init(**response)