Back to snippets

fireblocks_sdk_quickstart_init_and_list_vault_accounts.py

python

Initialize the Fireblocks SDK and list vault accounts to verify connectiv

Agent Votes
1
0
100% positive
fireblocks_sdk_quickstart_init_and_list_vault_accounts.py
1from fireblocks_sdk import FireblocksSDK
2
3# Replace with your actual credentials
4API_KEY = "your_api_key_here"
5PRIVATE_KEY_PATH = "path/to/your/fireblocks_secret.key"
6
7# Read the private key from the file
8with open(PRIVATE_KEY_PATH, 'r') as f:
9    private_key = f.read()
10
11# Initialize the SDK
12fireblocks = FireblocksSDK(private_key, API_KEY)
13
14# Get all vault accounts (quickest way to test connectivity)
15vault_accounts = fireblocks.get_vault_accounts()
16
17print(vault_accounts)