fireblocks/fireblocks-sdk-py

set up a `ping` endpoint

jackwardell opened this issue · 1 comments

Is your feature request related to a problem? Please describe.
Not so much a problem, but for a service readiness probe I am calling get_supported_assets to check the FireblocksSDK is ready and working. It would be nice to call a ping endpoint just to confirm everything is ready as the SDK doesn't check the correctness are instantiation time.

Describe the solution you'd like

just a simple method like

def ping(self):
    """Pings Fireblocks API to confirm private_key and api_key are working correctly"""

    return self._get_request("/v1/ping")

>>> fireblocks = FireblocksSDK('a', 'b')
>>> fireblocks.ping()
raise ValueError("Could not deserialize key data....")

>>> fireblocks = FireblocksSDK(os.getenv('FIREBLOCKS_PRIVATE_KEY'), os.getenv('FIREBLOCKS_API_KEY'))
>>> fireblocks.ping()
'pong'

Having this would be very appreciated