fireblocks-sdk-py icon indicating copy to clipboard operation
fireblocks-sdk-py copied to clipboard

set up a `ping` endpoint

Open jackwardell opened this issue 3 years ago • 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'

jackwardell avatar Jan 31 '22 12:01 jackwardell

Having this would be very appreciated

noahNewton avatar Mar 27 '24 20:03 noahNewton