### Fireblocks CLI Quick Start Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md A quick guide to get started with the Fireblocks CLI, including configuration, credential verification, and making an API request. ```bash # 1. Configure your API key and secret (from the Fireblocks Console) fireblocks configure # 2. Verify credentials fireblocks whoami # 3. Make a request fireblocks vaults get-paged-vault-accounts # 4. Discover the API fireblocks help-index ``` -------------------------------- ### Install Fireblocks CLI Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Install the Fireblocks CLI using npm, Homebrew, or a standalone installer. Verify the installation by checking the version. ```bash # npm (global) npm install -g @fireblocks/fireblocks-cli # Homebrew (macOS) brew tap fireblocks/fireblocks-cli brew install fireblocks-cli # Verify installation fireblocks --version ``` -------------------------------- ### Install Fireblocks CLI with npm Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Install the Fireblocks CLI globally using npm on macOS, Linux, or Windows. ```bash npm install -g @fireblocks/fireblocks-cli ``` -------------------------------- ### Fireblocks CLI Example Output for 'whoami' Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Example JSON output when running the 'fireblocks whoami' command, showing profile details. ```json { "defaultProfile": "default", "apiKey": "apiKey", "baseUrl": "https://api.fireblocks.io" } ``` -------------------------------- ### Install Fireblocks CLI with Homebrew Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Use this command to install the Fireblocks CLI on macOS using Homebrew. ```bash brew tap fireblocks/fireblocks-cli brew install fireblocks-cli ``` -------------------------------- ### Verify Authentication Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Verify your authentication setup by calling the `whoami` command, which checks credentials and returns masked API key and base URL. ```bash fireblocks whoami ``` -------------------------------- ### Discover Fireblocks API with help-index Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Use `help-index` to get a compact JSON manifest of all CLI resources and actions. For more specific details, use `--help` with a namespace or action. Use `--dry-run` to preview a request. ```bash fireblocks help-index # all resources and actions ``` ```bash fireblocks vaults --help # detail for one namespace ``` ```bash fireblocks vaults get-vault-account --help # detail for one action ``` ```bash fireblocks vaults get-vault-account --dry-run # preview the request ``` -------------------------------- ### Discover Commands with `fireblocks help-index` Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Get a JSON manifest of all available CLI commands, namespaces, and actions. This is useful for AI agents planning workflows. Progressive disclosure is available via `--help` flags. ```bash fireblocks help-index # Output format: # { # "commands": [ # { # "namespace": "vaults", # "action": "get-paged-vault-accounts", # "description": "Get vault accounts (Paginated)", # "method": "GET", # "path": "/v1/vault/accounts_paged", # "flags": [ # { "name": "name-prefix", "type": "string", "required": false }, # { "name": "limit", "type": "string", "required": false } # ] # }, # ... # ] # } # Progressive disclosure: fireblocks vaults --help # list actions in the vaults namespace fireblocks vaults get-paged-vault-accounts --help # show all flags for one action ``` -------------------------------- ### Configure Fireblocks Credentials Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Set up API key, RSA private key path, and base URL interactively. Supports named profiles for multi-environment setups. The configuration is saved to `~/.config/fireblocks/config.json`. ```bash # Set up the default profile fireblocks configure # Prompts: API key → RSA private key file path → base URL selection # Set up a named profile fireblocks configure --profile staging # Switch the default profile without re-entering credentials fireblocks configure --set-default staging # Resulting config file: ~/.config/fireblocks/config.json # { # "defaultProfile": "staging", # "profiles": { # "default": { "apiKey": "abc...", "privateKeyPath": "/keys/prod.pem", "baseUrl": "https://api.fireblocks.io" }, # "staging": { "apiKey": "xyz...", "privateKeyPath": "/keys/staging.pem", "baseUrl": "https://sandbox-api.fireblocks.io" } # } # } ``` -------------------------------- ### Fireblocks CLI API Operations - Writes Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Examples of how to perform write operations using the Fireblocks CLI, such as creating a transaction. Use '--no-confirm' for non-interactive execution. ```bash # Writes (include --no-confirm for non-interactive) fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.01","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --no-confirm ``` -------------------------------- ### Configure Fireblocks CLI Profiles Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Manage Fireblocks CLI credentials and profiles. Use named profiles for multi-environment setups and switch the default profile without re-entering credentials. ```bash fireblocks configure # set up the default profile fireblocks configure --profile profile-name # named profile for multi-env setups fireblocks configure --set-default=profile-name # switch the default profile without re-entering credentials ``` -------------------------------- ### Fireblocks CLI API Operations - Reads Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Examples of how to perform read operations using the Fireblocks CLI, such as retrieving paged vault accounts or a specific vault account. ```bash # Reads fireblocks vaults get-paged-vault-accounts fireblocks vaults get-vault-account --vault-account-id 0 ``` -------------------------------- ### Error Format Example Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Example of the JSON error format returned on stderr for specific error conditions, including retry information. ```json {"code": 5, "status": 429, "message": "Rate limit exceeded", "request_id": "abc-123", "retry_after": 30} ``` -------------------------------- ### Fireblocks CLI Error Output Example Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Errors are returned as structured JSON on stderr, including error codes, status, messages, request IDs, and retry information. ```json {"code": 5, "status": 429, "message": "Rate limit exceeded", "request_id": "abc-123", "retry_after": 30} ``` -------------------------------- ### Filter and Pipe Vault Accounts with Fireblocks CLI and jq Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md This example demonstrates piping the output of `fireblocks vaults get-paged-vault-accounts` to `jq` to filter accounts based on asset balance, useful for AI agent workflows. ```bash # List vault accounts, filter with jq, pipe to the next command fireblocks vaults get-paged-vault-accounts \ | jq -r '.accounts[] | select(.assets[].balance > 0) | .id' ``` -------------------------------- ### fireblocks whoami Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Verifies authentication credentials and displays masked API key, base URL, and verification status. This command internally calls the GET /v1/users/me API endpoint. ```APIDOC ## fireblocks whoami ### Description Verify credentials, calls GET /v1/users/me. Returns masked API key, base URL, and verification status. ``` -------------------------------- ### Get Specific Vault Account Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Retrieve details for a specific vault account by its ID. The --json flag ensures structured output. ```bash fireblocks vaults get-vault-account --vault-account-id 0 --json ``` -------------------------------- ### Get Transaction History with Filters Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Retrieve paginated transaction history using various filters like status, asset, source/destination type, time range, and on-chain hash. Supports pagination using next-page cursor. ```bash # All completed ETH transactions in the last day fireblocks transactions get-transactions \ --status COMPLETED \ --assets ETH \ --after "$(date -d '1 day ago' +%s)000" \ --limit 100 ``` ```bash # Transactions from a specific vault account fireblocks transactions get-transactions \ --source-type VAULT_ACCOUNT \ --source-id 0 \ --order-by createdAt \ --sort DESC \ --limit 50 ``` ```bash # Look up transaction by on-chain hash fireblocks transactions get-transactions --tx-hash "0xdeadbeef..." ``` ```bash # Paginate using next-page cursor header fireblocks transactions get-transactions --limit 20 --include-headers 2>/tmp/headers.txt NEXT=$(grep "next-page" /tmp/headers.txt | awk '{print $2}') fireblocks transactions get-transactions --limit 20 --next "$NEXT" ``` -------------------------------- ### Get Transaction Details by ID Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Retrieve the complete status and details of a transaction using its unique Fireblocks transaction ID. This is useful for monitoring transaction progress and confirming completion. ```bash fireblocks transactions get-transaction --tx-id "8f1e2a3b-4c5d-6e7f-8901-abcdef012345" ``` -------------------------------- ### Get a Specific Vault Account by ID Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Fetch details for a single vault account using its unique identifier. The `--vault-account-id` parameter corresponds to the `{vaultAccountId}` in the API path. ```bash fireblocks vaults get-vault-account --vault-account-id 0 ``` -------------------------------- ### Use Sandbox Environment Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Connect to a non-production environment like the sandbox by specifying a custom --base-url. ```bash fireblocks vaults get-paged-vault-accounts --base-url https://sandbox-api.fireblocks.io --json ``` -------------------------------- ### fireblocks --help Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Displays detailed help information, including all flags, for a specific command (namespace and action). ```APIDOC ## fireblocks --help ### Description Show all flags for one command. ``` -------------------------------- ### fireblocks help-index Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Retrieves a compact JSON index of all available commands, including their namespace, action, description, and flags. ```APIDOC ## fireblocks help-index ### Description Compact JSON index of all commands (<2K tokens). ### Returns `{commands: [{namespace, action, description, method?, path?, flags: [{name, type, required}]}]}` ``` -------------------------------- ### fireblocks --help Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Lists all available actions within a specified namespace. ```APIDOC ## fireblocks --help ### Description List actions in a namespace. ``` -------------------------------- ### Configure Fireblocks CLI Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Sets up your API key and secret for the Fireblocks CLI. It stores credentials in `~/.config/fireblocks/config.json`. You can manage multiple profiles for different environments. ```APIDOC ## `fireblocks configure` — Manage credentials Interactive setup that stores your API key ID and RSA secret in `~/.config/fireblocks/config.json`. For agents and CI, use env vars or flags instead. ### Usage ```bash fireblocks configure # set up the default profile fireblocks configure --profile profile-name # named profile for multi-env setups fireblocks configure --set-default=profile-name # switch the default profile without re-entering credentials ``` When configuring a second profile you are asked whether to make it the default. The config always stores the `baseUrl` explicitly so the file is self-describing. ``` -------------------------------- ### fireblocks --dry-run [flags] Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Previews the request (method, URL, parameters, and body) for a command without actually executing it. ```APIDOC ## fireblocks --dry-run [flags] ### Description Preview request (method, url, params, body) without executing. ``` -------------------------------- ### Preview Paginated Vault Fetch with Query Params Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Use the `--dry-run` flag to preview the API request for fetching paginated vault accounts with specific query parameters. ```bash fireblocks vaults get-paged-vault-accounts \ --asset-id BTC --limit 10 \ --dry-run ``` -------------------------------- ### Preview Transaction Creation Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Preview the details of a transaction creation request without executing it, using the --dry-run flag. ```bash fireblocks transactions create-transaction --data '{"assetId":"BTC","amount":"0.01"}' --dry-run ``` -------------------------------- ### --dry-run Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Allows previewing requests by printing the assembled request details (method, URL, body, etc.) to stdout without executing any network calls. ```APIDOC ## `--dry-run` — Preview requests without executing Prints the fully assembled request (method, URL, query params, body, headers) to stdout without making any network call. Useful for debugging and for agents verifying request construction before execution. ```bash # Preview a transaction request fireblocks transactions create-transaction \ --data '{"assetId":"ETH","amount":"0.5","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --dry-run # Output: # { # "method": "POST", ``` -------------------------------- ### Verify Credentials with `fireblocks whoami` Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Check active profile, masked API key, and base URL from local config. This command performs a local inspection and does not make an API call. ```bash fireblocks whoami # Output (stdout): # { # "defaultProfile": "default", # "apiKey": "d9cb...cba8", # "baseUrl": "https://api.fireblocks.io" # } # With explicit profile: fireblocks whoami --profile staging ``` -------------------------------- ### Preview Requests with --dry-run Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Use the `--dry-run` flag to preview the fully assembled request (method, URL, query params, body, headers) without making a network call. This is useful for debugging and verifying request construction. ```bash # Preview a transaction request fireblocks transactions create-transaction \ --data '{"assetId":"ETH","amount":"0.5","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --dry-run ``` -------------------------------- ### Create Transaction with Idempotency Key Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Create a transaction with an idempotency key for safe retries. Requires --data and --no-confirm flags. ```bash fireblocks transactions create-transaction \ --data '{"assetId":"ETH","amount":"1.0","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"ONE_TIME_ADDRESS","oneTimeAddress":{"address":"0x1234"}}}' \ --idempotency-key "$(uuidgen)" --no-confirm ``` -------------------------------- ### List Vault Accounts with Filtering and Pagination Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Retrieve a paginated list of vault accounts, supporting filters by asset, balance, and name prefix. Use `--before` and `--after` for cursor-based pagination. ```bash fireblocks vaults get-paged-vault-accounts ``` ```bash fireblocks vaults get-paged-vault-accounts \ --asset-id BTC \ --min-amount-threshold 0.01 \ --limit 50 ``` ```bash fireblocks vaults get-paged-vault-accounts \ --name-prefix "Trading-" \ --order-by ASC ``` ```bash CURSOR=$(fireblocks vaults get-paged-vault-accounts --limit 10 --include-headers 2>&1 | grep next-page | awk '{print $2}') fireblocks vaults get-paged-vault-accounts --limit 10 --after "$CURSOR" ``` ```bash fireblocks vaults get-paged-vault-accounts --asset-id BTC \ | jq -r '.accounts[] | select(.assets[]?.balance > 0) | .id' ``` -------------------------------- ### Initiate Staking Delegation Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Create a new staking delegation for supported chains. For EIP-7251 compounding validators, an existing position ID can be provided to add to it. Use `get-chains` and `get-providers` to list supported options. ```bash # Stake ETH (Ethereum) fireblocks staking stake \ --chain-descriptor ETH \ --data '{ "vaultAccountId": "0", "providerId": "kiln", "stakeAmount": "32", "txNote": "Initial validator deposit" }' \ --no-confirm ``` ```bash # Stake ATOM (Cosmos) fireblocks staking stake \ --chain-descriptor ATOM_COS \ --data '{ "vaultAccountId": "0", "providerId": "figment", "validatorAddress": "cosmosvaloper1...", "stakeAmount": "100" }' \ --idempotency-key "$(uuidgen)" \ --no-confirm ``` ```bash # List supported chains first fireblocks staking get-chains ``` ```bash # List available providers for a chain fireblocks staking get-providers --chain-descriptor ETH ``` -------------------------------- ### Show Current Profile Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Displays the currently active profile's name, masked API key, and base URL from the local configuration file. This command does not make an API call. ```APIDOC ## `fireblocks whoami` — Show current profile Prints the default profile name, masked API key, and base URL from the local config file. No API call is made. ### Usage ```bash fireblocks whoami ``` ### Example Output ```json { "defaultProfile": "default", "apiKey": "apiKey", "baseUrl": "https://api.fireblocks.io" } ``` ``` -------------------------------- ### List Vault Accounts Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Use this command to list all vault accounts. The --json flag ensures structured output. ```bash fireblocks vaults get-paged-vault-accounts --json ``` -------------------------------- ### Display Current Fireblocks CLI Profile Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Show the current default profile name, masked API key, and base URL from the local configuration file. This command does not make an API call. ```bash fireblocks whoami ``` -------------------------------- ### Create a New Vault Account Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Create a new vault account with specified details. Use `--data` for the JSON payload and `--no-confirm` for non-interactive execution. An idempotency key can be used for safe retries. ```bash fireblocks vaults create-vault-account \ --data '{"name": "Cold Storage 01", "hiddenOnUI": false, "autoFuel": false}' ``` ```bash fireblocks vaults create-vault-account \ --data '{"name": "Hot Wallet 02", "customerRefId": "client-xyz"}' \ --no-confirm ``` ```bash fireblocks vaults create-vault-account \ --data '{"name": "Treasury Vault"}' \ --idempotency-key "$(uuidgen)" \ --no-confirm ``` -------------------------------- ### Verify Downloaded File with SHA256 Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Verify the integrity of a downloaded file by comparing its SHA256 hash with the one provided on the release page. This is applicable for macOS and Linux. ```bash # macOS / Linux sha256sum # macOS alternative shasum -a 256 ``` -------------------------------- ### Submit a Vault-to-Vault BTC Transaction Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Create a vault-to-vault transfer for a specified asset and amount. The `--no-confirm` flag bypasses interactive confirmation. ```bash fireblocks transactions create-transaction \ --data '{ \ "assetId": "BTC", \ "amount": "0.01", \ "source": { "type": "VAULT_ACCOUNT", "id": "0" }, \ "destination": { "type": "VAULT_ACCOUNT", "id": "1" }, \ "note": "Monthly settlement" \ }' \ --no-confirm ``` -------------------------------- ### Fireblocks CLI Global Flags - Authentication Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Control authentication and request parameters using global flags. Credentials resolve in the order: CLI flags, environment variables, then config profile. Supports inline credentials, environment variables, and secret key as PEM string. ```bash # Inline credentials (no config file needed) fireblocks vaults get-vault-account \ --vault-account-id 0 \ --api-key "your-api-key-id" \ --secret-key "/path/to/private.pem" # Environment variable authentication (recommended for CI/CD and agents) export FIREBLOCKS_API_KEY="your-api-key-id" export FIREBLOCKS_SECRET_KEY_PATH="/path/to/private.pem" export FIREBLOCKS_BASE_URL="https://sandbox-api.fireblocks.io" # optional fireblocks vaults get-paged-vault-accounts # Secret key as inline PEM string (detected by -----BEGIN marker) export FIREBLOCKS_SECRET_KEY="-----BEGIN RSA PRIVATE KEY-----\nMIIE..." fireblocks vaults get-paged-vault-accounts # Named profile fireblocks vaults get-paged-vault-accounts --profile staging # Sandbox environment fireblocks vaults get-paged-vault-accounts --base-url https://sandbox-api.fireblocks.io # YAML output fireblocks vaults get-vault-account --vault-account-id 0 --output yaml ``` -------------------------------- ### Fireblocks API Operations Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Execute Fireblocks API operations directly from the command line. Commands are generated from the Fireblocks OpenAPI specification. Path parameters become required flags, query parameters become optional flags, and write operations accept a JSON body via the `--data` flag. ```APIDOC ## `fireblocks ` — API operations Commands are generated from the Fireblocks OpenAPI spec. OpenAPI path parameters become required flags (kebab-case); query parameters become optional flags. Write ops take the body as `--data ''. ### Usage Examples #### Reads ```bash fireblocks vaults get-paged-vault-accounts fireblocks vaults get-vault-account --vault-account-id 0 ``` #### Writes (include `--no-confirm` for non-interactive) ```bash fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.01","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --no-confirm ``` #### Idempotent Retries ```bash fireblocks transactions create-transaction \ --data '{...}' \ --idempotency-key "$(uuidgen)" --no-confirm ``` ``` -------------------------------- ### Submit an ETH Transfer to an External One-Time Address Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Initiate an ETH transfer to an external address, utilizing a one-time address type. An idempotency key ensures that the operation can be safely retried. ```bash fireblocks transactions create-transaction \ --data '{ \ "assetId": "ETH", \ "amount": "1.0", \ "source": { "type": "VAULT_ACCOUNT", "id": "0" }, \ "destination": { \ "type": "ONE_TIME_ADDRESS", \ "oneTimeAddress": { "address": "0xAbCd1234..." } \ } \ }' \ --idempotency-key "$(uuidgen)" \ --no-confirm ``` -------------------------------- ### Create Transaction Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Create a new transaction. This is a write operation and requires the --data flag for the transaction payload and --no-confirm to bypass the confirmation prompt. ```bash fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.01","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --no-confirm ``` -------------------------------- ### Fireblocks CLI API Operations - Idempotent Retries Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md Demonstrates how to use the '--idempotency-key' flag with a generated UUID to ensure safe retries of write operations. ```bash # Idempotent retries fireblocks transactions create-transaction \ --data '{...}' \ --idempotency-key "$(uuidgen)" --no-confirm ``` -------------------------------- ### Perform a Dry-Run of a Fireblocks Transaction Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt The `--dry-run` flag allows you to preview the assembled API request without actually sending it. This is helpful for verifying transaction details before submission. ```bash fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.01"}' \ --dry-run ``` -------------------------------- ### Find and Transfer BTC from Non-Zero Vaults Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt This script finds all vault accounts with a non-zero BTC balance and transfers 0.001 BTC to vault 99. It uses `jq` to parse the output and a `while` loop to iterate through the vault IDs. Ensure idempotency keys are used for safe retries. ```bash # Find all vault accounts with non-zero BTC and transfer to vault 99 fireblocks vaults get-paged-vault-accounts --asset-id BTC \ | jq -r '.accounts[] | select(.assets[]? | .id == "BTC" and (.balance | tonumber) > 0) | .id' \ | while read VAULT_ID; do fireblocks transactions create-transaction \ --data "{\"assetId\":\"BTC\",\"amount\":\"0.001\",\"source\":{\"type\":\"VAULT_ACCOUNT\",\"id\":\"${VAULT_ID}\"}",\"destination\":{\"type\":\"VAULT_ACCOUNT\",\"id\":\"99\"}}" \ --idempotency-key "sweep-${VAULT_ID}-$(date +%s)" \ --no-confirm done ``` -------------------------------- ### fireblocks transactions create-transaction --data '' --dry-run Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Previews the creation of a transaction without executing it. Useful for validating the request payload. ```APIDOC ## fireblocks transactions create-transaction --data '' --dry-run ### Description Preview transaction creation without executing. ### Flags * `--data` (string) - Required - JSON string representing the transaction details. * `--dry-run` - Preview request without executing. ``` -------------------------------- ### Retrieve Audit Logs Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Fetch workspace audit logs for the last day or week. Requires Admin or Non-Signing Admin API key permissions. Supports pagination using a cursor from the previous response body. ```bash # Fetch last day of audit logs fireblocks audit-logs get-audit-logs --time-period DAY ``` ```bash # Fetch last week with pagination fireblocks audit-logs get-audit-logs --time-period WEEK ``` ```bash # Paginate using cursor from previous response body CURSOR=$(fireblocks audit-logs get-audit-logs --time-period WEEK | jq -r '.cursor') fireblocks audit-logs get-audit-logs --time-period WEEK --cursor "$CURSOR" ``` -------------------------------- ### fireblocks audit-logs get-audit-logs Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Retrieves workspace audit logs for the last day or week, requiring specific API key permissions. ```APIDOC ## `fireblocks audit-logs get-audit-logs` — Retrieve audit logs Returns workspace audit logs for the last day or week. Requires Admin or Non-Signing Admin API key permissions. ```bash # Fetch last day of audit logs fireblocks audit-logs get-audit-logs --time-period DAY # Fetch last week with pagination fireblocks audit-logs get-audit-logs --time-period WEEK # Paginate using cursor from previous response body CURSOR=$(fireblocks audit-logs get-audit-logs --time-period WEEK | jq -r '.cursor') fireblocks audit-logs get-audit-logs --time-period WEEK --cursor "$CURSOR" # Expected output: # { # "entries": [ # { # "id": "log-001", # "timestamp": "2026-04-27T10:00:00Z", # "user": "admin@example.com", # "event": "LOGIN", # "data": {} # } # ], # "cursor": "next-page-cursor-value" # } ``` ``` -------------------------------- ### fireblocks staking stake Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Initiates a staking delegation for a supported chain, with options to add to existing positions for specific chains. ```APIDOC ## `fireblocks staking stake` — Initiate a staking position Creates a new staking delegation for a supported chain. For Ethereum EIP-7251 compounding validators, providing an existing position `id` in the body adds to that position. ```bash # Stake ETH (Ethereum) fireblocks staking stake \ --chain-descriptor ETH \ --data '{ "vaultAccountId": "0", "providerId": "kiln", "stakeAmount": "32", "txNote": "Initial validator deposit" }' \ --no-confirm # Stake ATOM (Cosmos) fireblocks staking stake \ --chain-descriptor ATOM_COS \ --data '{ "vaultAccountId": "0", "providerId": "figment", "validatorAddress": "cosmosvaloper1...", "stakeAmount": "100" }' \ --idempotency-key "$(uuidgen)" \ --no-confirm # List supported chains first fireblocks staking get-chains # Output: ["ETH", "SOL", "ATOM_COS", "MATIC", "AXL", "CELESTIA", ...] # List available providers for a chain fireblocks staking get-providers --chain-descriptor ETH ``` ``` -------------------------------- ### fireblocks vaults create-vault-account Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Creates a new vault account with a specified name. This is a write operation that can be performed interactively or non-interactively using `--no-confirm`. ```APIDOC ## `fireblocks vaults create-vault-account` — Create a new vault account Creates a vault account with the given name. Write operation — requires `--data` with a JSON body and `--no-confirm` for non-interactive use. ```bash # Create a vault account (interactive — prompts for confirmation) fireblocks vaults create-vault-account \ --data '{"name": "Cold Storage 01", "hiddenOnUI": false, "autoFuel": false}' # Non-interactive / agent use (skip confirmation) fireblocks vaults create-vault-account \ --data '{"name": "Hot Wallet 02", "customerRefId": "client-xyz"}' \ --no-confirm # Idempotent creation (safe to retry) fireblocks vaults create-vault-account \ --data '{"name": "Treasury Vault"}' \ --idempotency-key "$(uuidgen)" \ --no-confirm # Expected output: # { # "id": "42", # "name": "Treasury Vault", # "hiddenOnUI": false, # "autoFuel": false, # "assets": [] # } ``` ``` -------------------------------- ### fireblocks transactions create-transaction --data '' --idempotency-key --no-confirm Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Creates a new transaction with idempotency support. Use `--idempotency-key` to ensure safe retries for write operations. ```APIDOC ## fireblocks transactions create-transaction --data '' --idempotency-key --no-confirm ### Description Create a transaction with idempotency support. ### Method POST ### Endpoint `/v1/transactions` ### Parameters #### Request Body * `--data` (string) - Required - JSON string representing the transaction details. #### Query Parameters * `--idempotency-key` (string) - Optional - UUID for safe retries. ### Flags * `--no-confirm` - Skip write-op confirmation prompt. ``` -------------------------------- ### Global Flags Source: https://github.com/fireblocks/fireblocks-cli/blob/main/README.md These flags can be used with any Fireblocks CLI command to modify its behavior, such as specifying authentication credentials, overriding the base URL, or enabling debug output. ```APIDOC ## Global flags: | Flag | Env Var | Purpose | |---|---| --- | | `--api-key` | `FIREBLOCKS_API_KEY` | API key ID | | `--secret-key` | `FIREBLOCKS_SECRET_KEY` / `FIREBLOCKS_SECRET_KEY_PATH` | RSA private key (PEM string or path) | | `--base-url` | `FIREBLOCKS_BASE_URL` | Override endpoint (default `https://api.fireblocks.io`, sandbox `https://sandbox-api.fireblocks.io`) | | `--profile` | | Named config profile | | `--data` | | JSON body for write operations | | `--idempotency-key` | | UUID for safe retries of write operations | | `--no-confirm` | | Skip confirmation prompt on writes | | `--dry-run` | | Print the assembled request without sending | | `--debug` | | Log request/response details to stderr | | `--output` | | Output format: `json` (default) or `yaml` | ``` -------------------------------- ### fireblocks transactions create-transaction --data '' --no-confirm Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Creates a new transaction. Requires the `--data` flag for the transaction payload and `--no-confirm` to bypass the confirmation prompt for write operations. ```APIDOC ## fireblocks transactions create-transaction --data '' --no-confirm ### Description Create a transaction. ### Method POST ### Endpoint `/v1/transactions` ### Parameters #### Request Body * `--data` (string) - Required - JSON string representing the transaction details. ### Flags * `--no-confirm` - Skip write-op confirmation prompt. ``` -------------------------------- ### Error Handling and Exit Codes Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Details on Fireblocks CLI error handling, including structured JSON error output and deterministic exit codes for reliable scripting and retries. ```APIDOC ## Error Handling and Exit Codes All errors are structured JSON on stderr. Exit codes are deterministic and machine-readable, enabling reliable retry logic in scripts and agents. ```bash # Error output format (stderr): # {"code": 5, "status": 429, "message": "Rate limit exceeded", "request_id": "abc-123", "retry_after": 30} # Robust retry loop with exit code inspection attempt=0 while [ $attempt -lt 5 ]; do fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.001","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --idempotency-key "my-fixed-key-001" \ --no-confirm 2>/tmp/fb_err.txt EXIT=$? if [ $EXIT -eq 0 ]; then echo "Success" break elif [ $EXIT -eq 5 ]; then # Rate limited — read retry_after from error JSON WAIT=$(jq -r '.retry_after // 30' /tmp/fb_err.txt) echo "Rate limited. Retrying in ${WAIT}s..." sleep "$WAIT" elif [ $EXIT -eq 3 ]; then echo "Auth error. Check credentials with: fireblocks whoami" >&2 break elif [ $EXIT -eq 6 ]; then echo "Server error. Retrying in 5s..." sleep 5 else cat /tmp/fb_err.txt >&2 break fi attempt=$((attempt + 1)) done # Exit code reference: # 0 = Success # 1 = Client error (400/409/422) — fix request body/params # 2 = Usage/parse error — fix flag names or types # 3 = Auth error (401/403) — verify credentials # 4 = Not found (404) — verify resource ID # 5 = Rate limited (429) — wait retry_after seconds # 6 = Server error (500+) — retry after brief delay # 7 = Timeout (30s) — retry ``` ``` -------------------------------- ### Debug Failing Request Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Enable debug logging for a request to diagnose issues. The --debug flag outputs detailed request and response information to stderr. ```bash fireblocks vaults get-vault-account --vault-account-id 0 --debug ``` -------------------------------- ### Robust Retry Loop with Exit Code Inspection Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Implement reliable retry logic for Fireblocks CLI commands by inspecting exit codes and handling specific errors like rate limiting. Reads `retry_after` from JSON error output for dynamic waits. ```bash # Error output format (stderr): # {"code": 5, "status": 429, "message": "Rate limit exceeded", "request_id": "abc-123", "retry_after": 30} # Robust retry loop with exit code inspection attempt=0 while [ $attempt -lt 5 ]; do fireblocks transactions create-transaction \ --data '{"assetId":"BTC","amount":"0.001","source":{"type":"VAULT_ACCOUNT","id":"0"},"destination":{"type":"VAULT_ACCOUNT","id":"1"}}' \ --idempotency-key "my-fixed-key-001" \ --no-confirm 2>/tmp/fb_err.txt EXIT=$? if [ $EXIT -eq 0 ]; then echo "Success" break elif [ $EXIT -eq 5 ]; then # Rate limited — read retry_after from error JSON WAIT=$(jq -r '.retry_after // 30' /tmp/fb_err.txt) echo "Rate limited. Retrying in ${WAIT}s..." sleep "$WAIT" elif [ $EXIT -eq 3 ]; then echo "Auth error. Check credentials with: fireblocks whoami" >&2 break elif [ $EXIT -eq 6 ]; then echo "Server error. Retrying in 5s..." sleep 5 else cat /tmp/fb_err.txt >&2 break fi attempt=$((attempt + 1)) done # Exit code reference: # 0 = Success # 1 = Client error (400/409/422) — fix request body/params # 2 = Usage/parse error — fix flag names or types # 3 = Auth error (401/403) — verify credentials # 4 = Not found (404) — verify resource ID # 5 = Rate limited (429) — wait retry_after seconds # 6 = Server error (500+) — retry after brief delay # 7 = Timeout (30s) — retry ``` -------------------------------- ### fireblocks vaults get-paged-vault-accounts --json Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Lists vault accounts using pagination. The `--json` flag ensures the output is in JSON format. ```APIDOC ## fireblocks vaults get-paged-vault-accounts --json ### Description List vault accounts. ### Flags * `--json` - Force structured JSON output. ``` -------------------------------- ### fireblocks transactions get-transactions Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Retrieves paginated transaction history with filtering options for status, asset, type, time range, and on-chain hash. ```APIDOC ## `fireblocks transactions get-transactions` — Get transaction history Returns paginated transaction history with rich filtering options: by status, asset, source/destination type, time range, and on-chain hash. ```bash # All completed ETH transactions in the last day fireblocks transactions get-transactions \ --status COMPLETED \ --assets ETH \ --after "$(date -d '1 day ago' +%s)000" \ --limit 100 # Transactions from a specific vault account fireblocks transactions get-transactions \ --source-type VAULT_ACCOUNT \ --source-id 0 \ --order-by createdAt \ --sort DESC \ --limit 50 # Look up transaction by on-chain hash fireblocks transactions get-transactions --tx-hash "0xdeadbeef..." # Paginate using next-page cursor header fireblocks transactions get-transactions --limit 20 --include-headers 2>/tmp/headers.txt NEXT=$(grep "next-page" /tmp/headers.txt | awk '{print $2}') fireblocks transactions get-transactions --limit 20 --next "$NEXT" ``` ``` -------------------------------- ### fireblocks transactions get-transaction Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Fetches the full status and details of a transaction using its Fireblocks transaction ID. ```APIDOC ## `fireblocks transactions get-transaction` — Get a transaction by ID Fetches the full status and details of a transaction using its Fireblocks transaction ID. ```bash fireblocks transactions get-transaction --tx-id "8f1e2a3b-4c5d-6e7f-8901-abcdef012345" # Expected output: # { # "id": "8f1e2a3b-4c5d-6e7f-8901-abcdef012345", # "assetId": "ETH", # "status": "COMPLETED", # "amount": "1.0", # "txHash": "0xdeadbeef...", # "createdAt": 1714567890000, # "lastUpdated": 1714567920000 # } ``` ``` -------------------------------- ### Monitor Transaction Status Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt This script monitors a transaction's status, polling every 5 seconds until it is no longer in 'SUBMITTED' or 'PENDING_AML_SCREENING' status. It uses `jq` to extract the status from the transaction details. ```bash # Monitor a transaction until it leaves PENDING status TX_ID="8f1e2a3b-4c5d-6e7f-8901-abcdef012345" while true; do STATUS=$(fireblocks transactions get-transaction --tx-id "$TX_ID" | jq -r '.status') echo "Status: $STATUS" [[ "$STATUS" != "SUBMITTED" && "$STATUS" != "PENDING_AML_SCREENING" ]] && break sleep 5 done ``` -------------------------------- ### fireblocks vaults get-paged-vault-accounts --base-url --json Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Lists vault accounts, overriding the default API endpoint with a custom base URL. The output is formatted as JSON. ```APIDOC ## fireblocks vaults get-paged-vault-accounts --base-url --json ### Description List vault accounts using a custom base URL. ### Parameters #### Query Parameters * `--base-url` (string) - Override API endpoint (default: `https://api.fireblocks.io`). ### Flags * `--json` - Force structured JSON output. ``` -------------------------------- ### fireblocks vaults get-vault-account Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Fetches a specific vault account by its numeric ID. This command retrieves detailed information about a single vault account. ```APIDOC ## `fireblocks vaults get-vault-account` — Get a specific vault account Fetches a single vault account by its numeric ID. The path parameter `{vaultAccountId}` maps to `--vault-account-id`. ```bash # Get vault account with ID 0 fireblocks vaults get-vault-account --vault-account-id 0 # Expected output: # { # "id": "0", # "name": "Default", # "hiddenOnUI": false, # "assets": [ # { "id": "BTC", "total": "0.5", "balance": "0.5", "available": "0.5" }, # { "id": "ETH", "total": "2.0", "balance": "2.0", "available": "2.0" } # ], # "autoFuel": false # } ``` ``` -------------------------------- ### fireblocks transactions create-transaction Source: https://context7.com/fireblocks/fireblocks-cli/llms.txt Submits a transaction, which can be a transfer, contract call, or message signing. Supports various destination types and idempotency keys for safe retries. ```APIDOC ## `fireblocks transactions create-transaction` — Submit a transaction Creates a transfer, contract call, or raw/typed message signing operation. The Transaction Authorization Policy (TAP) governs whether the transaction requires additional approvals. ```bash # Vault-to-vault BTC transfer fireblocks transactions create-transaction \ --data '{ \ "assetId": "BTC", \ "amount": "0.01", \ "source": { "type": "VAULT_ACCOUNT", "id": "0" }, \ "destination": { "type": "VAULT_ACCOUNT", "id": "1" }, \ "note": "Monthly settlement" \ }' \ --no-confirm # ETH transfer to an external one-time address (idempotent retry) fireblocks transactions create-transaction \ --data '{ \ "assetId": "ETH", \ "amount": "1.0", \ "source": { "type": "VAULT_ACCOUNT", "id": "0" }, \ "destination": { \ "type": "ONE_TIME_ADDRESS", \ "oneTimeAddress": { "address": "0xAbCd1234..." } \ } \ }' \ --idempotency-key "$(uuidgen)" \ --no-confirm # Expected output: # { # "id": "8f1e2a3b-...", # "status": "SUBMITTED", # "assetId": "ETH", # "amount": "1.0", # "source": { "type": "VAULT_ACCOUNT", "id": "0", "name": "Default" }, # "destination": { "type": "ONE_TIME_ADDRESS", "name": "0xAbCd1234..." } # } ``` ``` -------------------------------- ### fireblocks vaults get-vault-account --vault-account-id --debug Source: https://github.com/fireblocks/fireblocks-cli/blob/main/SKILL.md Retrieves details for a specific vault account and logs detailed request/response information to stderr for debugging purposes. ```APIDOC ## fireblocks vaults get-vault-account --vault-account-id --debug ### Description Debug a request to get a specific vault account. ### Parameters #### Path Parameters * `--vault-account-id` (string) - Required - The ID of the vault account. ### Flags * `--debug` - Log request/response details to stderr. ```