how to get wrist rotation of vr motion controller

How can this be achieved that the value is returned from -180 to 180, regardless of the world rotation? I need only the rotation around the wrist axis, it should be consistent regardless of the current world rotation of the motion controller.

This seem to be impossible as the wrist rotation angle is changing, as soon we rotate the motion controller. IS there another way to to track this rotation?