Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set up a ping endpoint #61

Open
jackwardell opened this issue Jan 31, 2022 · 1 comment
Open

set up a ping endpoint #61

jackwardell opened this issue Jan 31, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@jackwardell
Copy link

jackwardell commented Jan 31, 2022

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 jackwardell added the enhancement New feature or request label Jan 31, 2022
@noahNewton
Copy link

Having this would be very appreciated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants