NAV Navbar
Python JavaScript

Get Started

Introduction

Welcome to the Fireblocks API! You can use our API to view your vault accounts, connected wallets and exchanges - and perform transactions through the Fireblocks' platform.

We offer SDKs in Python and JavaScript. You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right. Additionally, you can test the API directly from the browser using this online tool.

The API specification is also available in OpenAPI 3.0 (Swagger) format.

Issuing API Credentials

API User Roles

The Fireblocks API supports several user roles:

Creating a Signed Request

All API calls must be authenticated.
The base URL is: https://api.fireblocks.io

from fireblocks_sdk import FireblocksSDK, TransferPeerPath, TRANSACTION_STATUS_CONFIRMED, TRANSACTION_STATUS_CANCELLED, TRANSACTION_STATUS_REJECTED, TRANSACTION_STATUS_FAILED, VAULT_ACCOUNT, TRANSACTION_MINT, TRANSACTION_BURN

privateKey = open('api-client-key.pem', 'r').read()
apiKey = 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX'
fireblocks = FireblocksSDK(privateKey, apiKey)
import fs from "fs";
import path from "path";

this.privateKey = fs.readFileSync(path.resolve(__dirname, "./api-client-key.pem"), "utf8");
const userId = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";
fireblocks = new FireblocksSDK(this.privateKey, userId);

Make sure to replace the userId with your API key and the privateKey pem with your file.

Fireblocks uses API keys to authenticate all API calls. You can request an API key by contacting our support team.

Every request must contain the following headers:
X-API-Key - The API Key to be provided to you by Fireblocks.
Authorization - Its value should be set to Bearer: <Access Token>, where the access token is a Base64-encoded JWT.

The JWT should be structured as follows:

Authorization: Bearer <JWT>

API Co-Signer

The API Co-Signer is a component that holds the key shares of the customer's Fireblocks Vault as well as a configuration changes key, in order to securely co-sign transactions initiated through the API or additions of new unmanaged wallets. The component should be provisioned in the customer’s production environment, either in the cloud or on premise.
The Co-Signer should be provisioned together with a callback handler that will act as an HTTPS server that receives requests from the co-signer to approve the signing. The Co-Signer Callback Handler should process this POST request and respond back with either an approval or rejection response. For more details on how to handle the request and structure its response, please see the Automated Signer Callback section below. For setup instructions of the Customer Co-Signer please contact Fireblocks support.

Vault

Get All Vault Accounts


vault_accounts = fireblocks.get_vault_accounts()


const vaultAccounts = await fireblocks.getVaultAccounts();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "name": "string",
    "hiddenOnUI": false,
    "assets": [
      {
        "id": "string",
        "total": "string",
        "available": "string",
        "pending": "string",
        "lockedAmount": "string",
        "totalStakedCPU": "string",
        "totalStakedNetwork": "string",
        "selfStakedCPU": "string",
        "selfStakedNetwork": "string",
        "pendingRefundCPU": "string",
        "pendingRefundNetwork": "string"
      }
    ]
  }
]

Retrieves all vault accounts and returns an array of VaultAccount objects.

HTTP Request

GET /v1/vault/accounts

Get a Vault Account


vault_account = fireblocks.get_vault_account(vault_account_id)


const vaultAccount = await fireblocks.getVaultAccount(vault_account_id);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "hiddenOnUI": false,
  "assets": [
    {
      "id": "string",
      "total": "string",
      "available": "string",
      "pending": "string",
      "lockedAmount": "string",
      "totalStakedCPU": "string",
      "totalStakedNetwork": "string",
      "selfStakedCPU": "string",
      "selfStakedNetwork": "string",
      "pendingRefundCPU": "string",
      "pendingRefundNetwork": "string"
    }
  ]
}

Returns a vault account with requested id, a VaultAccount object.

HTTP Request

GET /v1/vault/accounts/{vaultAccountId}

URL Parameters

Parameter Description
vaultAccountId The id of the vault account beign retrieved

Create a New Vault Account


vaultAccount = fireblocks.create_vault_account(name, hiddenOnUI)


const vaultAccount = await fireblocks.createVaultAccount(name, hiddenOnUI);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "hiddenOnUI": false,
  "assets": [
    {
      "id": "string",
      "total": "string",
      "available": "string",
      "pending": "string",
      "lockedAmount": "string",
      "totalStakedCPU": "string",
      "totalStakedNetwork": "string",
      "selfStakedCPU": "string",
      "selfStakedNetwork": "string",
      "pendingRefundCPU": "string",
      "pendingRefundNetwork": "string"
    }
  ]
}

Creates a new vault account with the requested name and returns a VaultAccount object.

HTTP Request

POST /v1/vault/accounts

Body Parameters

Parameter Description
name The name of the new account (this can be renamed later)
hiddenOnUI [optional] Should be set to true if you wish this account will not appear in the web console, false by default

Rename a Vault Account


vaultAccount = fireblocks.update_vault_account(vault_account_id, name)


const vaultAccount = await fireblocks.updateVaultAccount(vautlAccountId, name);

Make sure to replace vaultAccountId and name with the correct variables.

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "hiddenOnUI": false,
  "assets": [
    {
      "id": "string",
      "total": "string",
      "available": "string",
      "pending": "string",
      "lockedAmount": "string",
      "totalStakedCPU": "string",
      "totalStakedNetwork": "string",
      "selfStakedCPU": "string",
      "selfStakedNetwork": "string",
      "pendingRefundCPU": "string",
      "pendingRefundNetwork": "string"
    }
  ]
}

Renames the requested vault account. Returns 200 on success.

HTTP Request

PUT /v1/vault/accounts/{vaultAccountId}

URL Parameters

Parameter Description
vaultAccountId The id of the vault account to return, or 'default' for the default vault account

Body Parameters

Parameter Description
name The new name of the vault account

Get the Wallet of a Specific Asset inside Fireblocks Vault Account


vaultAsset = fireblocks.get_vault_asset(vault_account_id, asset_id)


const vaultAsset = await fireblocks.getVaultAsset(aultAccountId, assetId);

The above command returns JSON structured like this:

{
  "id": "string",
  "total": "string",
  "available": "string",
  "pending": "string",
  "lockedAmount": "string",
  "totalStakedCPU": "string",
  "totalStakedNetwork": "string",
  "selfStakedCPU": "string",
  "selfStakedNetwork": "string",
  "pendingRefundCPU": "string",
  "pendingRefundNetwork": "string"
}

Returns a wallet of a specific asset under a Fireblocks Vault Account (VaultAsset object).

HTTP Request

GET /v1/vault/accounts/{vaultAccountId}/{assetId}

URL Parameters

Parameter Description
vaultAccountId The id of the vault account to return, or 'default' for the default vault account
assetId The id of the asset

Create a New Wallet under the Vault Account


vaultAsset = fireblocks.create_vault_asset(vault_account_id, asset_id)


const vaultAsset = await fireblocks.createVaultAsset(aultAccountId, assetId);

The above command returns JSON structured like this:

{
  "id": "string",
  "eosAccountName": "string"
}

Creates a new wallet of a specific asset under a Fireblocks Vault Account. Returns CreateVaultAssetResponse.

HTTP Request

POST /v1/vault/accounts/{vaultAccountId}/{assetId}

URL Parameters

Parameter Description
vaultAccountId The id of the vault account, or 'default' for the default vault account
assetId The id of the asset

Body Parameters

Parameter Description
eosAccountName [optional] EOS account address

Hide the Vault Account from the Web Console View


vaultAsset = fireblocks.hide_vault_account(vault_account_id)


const vaultAsset = await fireblocks.hideVaultAccount(aultAccountId);

Hides the Vault Account from the web console view.

HTTP Request

POST /v1/vault/accounts/{vaultAccountId}/hide

URL Parameters

Parameter Description
vaultAccountId The id of the vault account to hide from the web console

Return the Vault Account to be visible in the Web Console


vaultAsset = fireblocks.unhide_vault_account(vault_account_id)


const vaultAsset = await fireblocks.unhideVaultAccount(aultAccountId);

Returns the Vault Account to be visible in the web console.

HTTP Request

POST /v1/vault/accounts/{vaultAccountId}/unhide

URL Parameters

Parameter Description
vaultAccountId The id of the vault account to be visible in the web console

Get All Addresses Generated for a Vault Wallet


depositAddresses = fireblocks.get_deposit_addresses(vault_account_id, asset_id)


const depositAddresses = await fireblocks.getDepositAddresses(vaultAccountId, assetId);

The above command returns JSON structured like this:

[
  {
    "assetId": "string",
    "address": "string",
    "description": "string",
    "tag": "string",
    "type": "string"
  }
]

Returns all addresses of a specific asset inside a Fireblocks Vault account, an array of VaultWalletAddress objects.

HTTP Request

GET /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses

URL Parameters

Parameter Description
vaultAccountId The id of the vault account to return, or 'default' for the default vault account
assetId The id of the asset

Body Parameters

Parameter Description
eosAccountName [optional] EOS account address

Generate a New Deposit Address for a Vault Wallet


address = fireblocks.generate_new_address(vault_account_id, asset_id, description)


const address = await fireblocks.generateNewAddress(vaultAccountId, assetId, description);

The above command returns JSON structured like this:

{
  "id": "string",
  "eosAccountName": "string"
}

Generates a new deposit address for the requested asset under the specific vault account. Returns a CreateAddressResponse object.

HTTP Request

POST /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses

URL Parameters

Parameter Description
vaultAccountId The id of the vault account, or 'default' for the default vault account
assetId The id of the asset

Body Parameters

Parameter Description
description [optional] Description of the new address

Rename an Address


address = fireblocks.set_address_description(vault_account_id, asset_id, addresses, tag, description)


const address = await fireblocks.setAddressDescription(vaultAccountId, aassetId, address, tag, description);

The above command returns JSON structured like this:

{
  "id": "string",
  "eosAccountName": "string"
}

Updates the description of an existing address within a Fireblocks Vault wallet.

HTTP Request

PUT /v1/vault/accounts/{vaultAccountId}/{assetId}/addresses/{addressId}

URL Parameters

Parameter Description
vaultAccountId The id of the vault account which address should be renamed, or 'default' for the default vault account
assetId The id of the asset
addressId The address for which to add a description. For XRP/EOS/XLM, use :{tag

Body Parameters

Parameter Description
description [optional] Description of the new address

Internal Wallets

Internal Wallets are your whitelisted addresses outside of Fireblocks. You can see each wallet's balances and transfer funds here.

Get All Internal Wallets


internalWallets = fireblocks.get_internal_wallets()


const internalWallets = await fireblocks.getInternalWallets();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "name": "string",
    "assets": [
      {
        "id": "string",
        "balance": "string",
        "lockedAmount": "string",
        "status": "WAITING_FOR_APPROVAL",
        "activationTime":"string",
        "address": "string",
        "tag": "string"
      }
    ]
  }
]

Returns an array of UnmanagedWallet objects.

HTTP Request

GET /v1/internal_wallets

Create a New Internal Wallet


internalWallet = fireblocks.create_internal_wallet(name)


const internalWallet = await fireblocks.createInternalWallet(name);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "assets": [
    {
      "id": "string",
      "balance": "string",
      "lockedAmount": "string",
      "status": "WAITING_FOR_APPROVAL",
      "activationTime":"string",
      "address": "string",
      "tag": "string"
    }
  ]
}

Creates a new internal wallet container and returns an UnmanagedWallet objects.

HTTP Request

POST /v1/internal_wallets

Body Parameters

Parameter Description
name The wallet container's display name

Get an Internal Wallet


internalWallet = fireblocks.get_internal_wallet(walletId)


const result = await fireblocks.getInternalWallet(walletId);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "assets": [
    {
      "id": "string",
      "balance": "string",
      "lockedAmount": "string",
      "status": "WAITING_FOR_APPROVAL",
      "activationTime":"string",
      "address": "string",
      "tag": "string"
    }
  ]
}

Returns all assets under the internal wallet, an array of UnmanagedWallet objects.

HTTP Request

GET /v1/internal_wallets/{walletId}

URL Parameters

Parameter Description
walletId The id of the wallet to return

Delete an Internal Wallet


result = firebocks.delete_internal_wallet(walletId)


const result = await fireblocks.deleteInternalWallet(walletId);

The above command returns 200 (OK)

Deletes an Internal Wallet container.

HTTP Request

DELETE /v1/internal_wallets/{walletId}

URL Parameters

Parameter Description
walletId The id of the wallet to delete

Get an Asset from an Internal Wallet


internalWalletAsset = fireblocks.get_internal_wallet_asset(walletId, assetId)


const internalWalletAsset = fireblocks.getInternalWalletAsset(walletId, assetId);

The above command returns JSON structured like this:

{
  "id": "string",
  "balance": "string",
  "lockedAmount": "string",
  "status": "WAITING_FOR_APPROVAL",
  "activationTime":"string",
  "address": "string",
  "tag": "string"
}

Retrieves the information on a specific asset within an Internal Wallet and returns WalletAsset object.

HTTP Request

GET /v1/internal_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to return
assetId The id of the asset to return

Add an Asset to an Internal Wallet


internalWalletAsset = fireblocks.create_internal_wallet_asset(walletId, assetId, address, tag)


const internalWalletAsset = await fireblocks.createInternalWalletAsset(walletContainerId, assetId, address, tag);

The above command returns JSON structured like this:

{
  "id": "string",
  "balance": "string",
  "lockedAmount": "string",
  "status": "WAITING_FOR_APPROVAL",
  "activationTime":"string",
  "address": "string",
  "tag": "string"
}

Adds an address to an existing Internal Wallet container, returns WalletAsset object.

HTTP Request

POST /v1/internal_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to return
assetId The id of the asset to return

Body Parameters

Parameter Description
address The wallet's address or, for EOS wallets, the account name
tag For XRP wallets, the destination tag; for EOS/XLM, the memo

Delete an Asset from an Internal Wallet


result = fireblocks.delete_internal_wallet_asset(walletId, assetId)


const result = await fireblocks.deleteInternalWalletAsset(walletId, assetId);

The above command returns 200 (OK)

Deletes an asset from an Internal Wallet.

HTTP Request

DELETE /v1/internal_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to delete
assetId The id of the asset to delete

External Wallets

External Wallets are your counterparties’ wallets. These are addresses you wish to whitelist as transfer destinations.

Get All External Wallets


externalWallets = fireblocks.get_external_wallets()


const externalWallets = await fireblocks.getExternalWallets();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "name": "string",
    "assets": [
      {
        "id": "string",
        "status": "WAITING_FOR_APPROVAL",
        "activationTime":"string",
        "address": "string",
        "tag": "string"
      }
    ]
  }
]

Returns all External Wallets, an array of ExternalWallet objects.

HTTP Request

GET /v1/external_wallets

Create a New External Wallet


externalWallet = fireblocks.create_external_wallet(name)


const externalWallet = await fireblocks.createExternalWallet(name);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "assets": [
    {
      "id": "string",
      "status": "WAITING_FOR_APPROVAL",
      "activationTime":"string",
      "address": "string",
      "tag": "string"
    }
  ]
}

Creates a new External Wallet and returns an ExternalWallet object.

HTTP Request

POST /v1/external_wallets

Body Parameters

Parameter Description
name The wallet's display name

Get an External Wallet


externalWallet = fireblocks.get_extenal_wallet(walletId)


const externalWallet = await fireblocks.getExternalWallet(walletId);

The above command returns JSON structured like this:

{
  "id": "string",
  "name": "string",
  "assets": [
    {
      "id": "string",
      "status": "WAITING_FOR_APPROVAL",
      "activationTime":"string",
      "address": "string",
      "tag": "string"
    }
  ]
}

Returns an External Wallet for the request wallet id, an ExternalWallet object.

HTTP Request

GET /v1/external_wallets/{walletId}

URL Parameters

Parameter Description
walletId The id of the wallet to return

Delete an External Wallet


result = firebocks.delete_external_wallet(walletId)


const result = await fireblocks.deleteExternalWallet(walletId);

The above command returns 200 (OK)

Deletes an External Wallet.

HTTP Request

DELETE /v1/external_wallets/{walletId}

URL Parameters

Parameter Description
walletId The id of the wallet to delete

Get an Asset from an External Wallet


externalWalletAsset = fireblocks.get_external_wallet_asset(walletId, assetId)


const externalWalletAsset = fireblocks.getExternalWalletAsset(walletId, assetId)

The above command returns JSON structured like this:

{
  "id": "string",
  "status": "WAITING_FOR_APPROVAL",
  "activationTime":"string",
  "address": "string",
  "tag": "string"
}

Returns an External Wallet for the requested wallet id and asset, and returns an ExternalWalletAsset object.

HTTP Request

GET /v1/external_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to return
assetId The id of the asset to return

Add an Asset to an External Wallet


externalWalletAsset = fireblocks.create_external_wallet_asset(walletId, assetId, address, tag)


const externalWalletAsset = await fireblocks.createExternalWalletAsset(walletContainerId, assetId, address, tag);

The above command returns JSON structured like this:

{
  "id": "string",
  "status": "WAITING_FOR_APPROVAL",
  "activationTime":"string",
  "address": "string",
  "tag": "string"
}

Adds an address to an existing External Wallet, returns an ExternalWalletAsset object.

HTTP Request

POST /v1/external_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to return
assetId The id of the asset to return

Body Parameters

Parameter Description
address The wallet's address or, for EOS wallets, the account name
tag For XRP wallets, the destination tag; for EOS/XLM, the memo

Delete an Asset from an External Wallet


result = fireblocks.delete_external_wallet_asset(walletId, assetId)


const result = await fireblocks.deleteExternalWalletAsset(walletId, assetId);

The above command returns 200 (OK)

Deletes an external wallet asset.

HTTP Request

DELETE /v1/external_wallets/{walletId}/{assetId}

URL Parameters

Parameter Description
walletId The id of the wallet to delete
assetId The id of the asset to delete

Exchange Accounts

View your exchange accounts connected to the Fireblocks platform

Get All Exchange Accounts


exchangeAccounts = fireblocks.get_exchange_accounts()


const exchangeAccounts = await fireblocks.getExchangeAccounts();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "type": "BITTREX",
    "name": "string",
    "status": "string",
    "assets": [
      {
        "id": "string",
        "balance": "string",
        "lockedAmount": "string"
      }
    ],
    "isSubaccount": true
  }
]

Fetches all the exchange accounts, returns an array of ExchangeAccount objects

HTTP Request

GET /v1/exchange_accounts

Get a Specific Exchange Account


exchangeAccount = fireblocks.get_exchange_account(exchangeAccountId)


const exchnageAccount = await fireblocks.get_exchange_account(exchangeAccountId);

The above command returns JSON structured like this:

{
  "id": "string",
  "type": "BITTREX",
  "name": "string",
  "status": "string",
  "assets": [
    {
      "id": "string",
      "balance": "string",
      "lockedAmount": "string"
    }
  ],
  "isSubaccount": true
}

Retrieves the Exchange Account associated with the requested exchange account id, returns an ExchangeAccount object.

HTTP Request

GET /v1/exchange_accounts/{exchangeAccountId}

URL Parameters

Parameter Description
exchangeAccountId The id of the exchange account to return

Get a Specific Asset Within an Exchange Account


exchangeAsset = fireblocks.get_exchange_asset(exchangeAccountId, assetId)


const exchangeAsset = await fireblocks.getExchangeAsset(exchangeAccountId, assetId);

The above command returns JSON structured like this:

{
  "id": "string",
  "balance": "string",
  "lockedAmount": "string"
}

Retrieves a single asset within an Exchange Account, returns an ExchangeAsset object.

HTTP Request

GET /v1/exchange_accounts/{exchangeAccountId}/{assetId}

URL Parameters

Parameter Description
exchangeAccountId The id of the exchange account to return
assetId The id of the asset to return

Transfer to a Subaccount


transferResult = fireblocks.transfer_to_subaccount(exchangeAccountId, assetId, subaccountId, amount)


const transferResult = await fireblocks.transferToSubaccount(exchangeAccountId, assetId, subaccountId, amount);

The above command returns 200 (OK)

Transfers funds from an exchange's main account to its subaccount, allowed only on supported exchanges.

HTTP Request

POST /v1/exchange_accounts/{exchangeAccountId}/{assetId}/transfer_to_subaccount"

URL Parameters

Parameter Description
exchangeAccountId The id of the exchange account
assetId The id of the asset to transfer

Body Parameters

Parameter Description
subaccountId The id of the destined subaccount
amount The amount to transfer

Transfer from a Subaccount


transferResult = fireblocks.transfer_from_subaccount(exchangeAccountId, assetId, subaccountId, amount)


const transferResult = await fireblocks.transferFromSubaccount(exchangeAccountId, assetId, subaccountId, amount)

The above command returns 200 (OK)

Transfers funds from an exchange's subaccount to its main account. This feature is allowed only on supported exchanges.

HTTP Request

POST /v1/exchange_accounts/{exchangeAccountId}/{assetId}/transfer_from_subaccount

URL Parameters

Parameter Description
exchangeAccountId The id of the exchange account
assetId The id of the asset to transfer

Body Parameters

Parameter Description
subaccountId The id of the destined subaccount
amount The amount to transfer

Fiat Accounts

View and operate with your linked Fiat accounts

View all Fiat Accounts


transactions = fireblocks.get_fiat_accounts()


const transactions = await fireblocks.getFiatAccounts();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "type": "SIGNET",
    "name": "string",
    "address": "string",
    "assets": [
      {
        "id": "string",
        "balance": "string"
      }
    ]
  }
]

Returns an array of FiatAccount object.

HTTP Request

GET /v1/fiat_accounts

View a Specific Fiat Accounts


transactions = fireblocks.get_fiat_account_by_id(account_id)


const transactions = await fireblocks.getFiatAccountById(accountId);

The above command returns JSON structured like this:

{
  "id": "string",
  "type": "SIGNET",
  "name": "string",
  "address": "string",
  "assets": [
    {
      "id": "string",
      "balance": "string"
    }
  ]
}

Returns the requested fiat account, a FiatAccount object.

HTTP Request

GET /v1/fiat_accounts/{accountId}

URL Parameters

Parameter Description
accountId The id of the fiat account

Redeem Funds to Linked DDA


transactions = fireblocks.redeem_to_linked_dda(account_id, amount)


const transactions = await fireblocks.redeemToLinkedDDA(accountId, amount);

The above command returns 200 (OK)

Redeem funds to the connected DDA.

HTTP Request

POST /v1/fiat_accounts/{accountId}/redeem_to_linked_dda

URL Parameters

Parameter Description
accountId The id of the fiat account

Body Parameters

Parameter Description
amount The reqested amount

Deposit Funds from Linked DDA


transactions = fireblocks.deposit_from_linked_dda(account_id, amount)


const transactions = await fireblocks.depositFromLinkedDDA(accountId, amount);

The above command returns 200 (OK)

Deposit funds from the connected DDA.

HTTP Request

POST /v1/fiat_accounts/{accountId}/deposit_from_linked_dda

URL Parameters

Parameter Description
accountId The id of the fiat account

Body Parameters

Parameter Description
amount The reqested amount

Transactions

Transfer management endpoints.

Retrieve Transactions Info


transactions = fireblocks.get_transactions()

const transactions = await fireblocks.getTransactions({
        status: args.status,
        after: from
        });

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "assetId": "string",
    "source": {
      "type": "VAULT_ACCOUNT",
      "id": "string",
      "name": "string",
      "subType": "string"
    },
    "destination": {
      "type": "VAULT_ACCOUNT",
      "id": "string",
      "name": "string",
      "subType": "string"
    },
    "requestedAmount": 0,
    "amount": 0,
    "netAmount": 0,
    "amountUSD": 0,
    "serviceFee": 0,
    "networkFee": 0,
    "createdAt": "string",
    "lastUpdated": "string",
    "status": "SUBMITTED",
    "txHash": "string",
    "tag": "string",
    "subStatus": "INSUFFICIENT_FUNDS",
    "destinationAddress": "string",
    "destinationAddressDescription": "string",
    "destinationTag": "string",
    "signedBy": [
      "string"
    ],
    "createdBy": "string",
    "rejectedBy": "string",
    "addressType": "string",
    "note": "string",
    "exchangeTxId": "string",
    "feeCurrency": "string",
    "operation": "TRANSFER"
  }
]

Transactions history. This request returns an array of TransactionDetails object. This response is paginated, the default number of returned transactions is 200.

HTTP Request

GET /v1/transactions

Query Parameters

Parameter Description
before [optional] Unix timestamp in milliseconds. Returns only transactions created before the specified date
after [optional] Unix timestamp in milliseconds. Returns only transactions created after the specified date
status [optional] Comma-separated list of statuses. Returns only transactions with each of the specified statuses
orderBy [optional] The field to order the results by. Available values : createdAt (default), lastUpdated
limit [optional] Limits the number of returned transactions. If not provided, a defult of 200 will be returned. The maximum allowed limit is 500.

Create a New Transaction


tx_result = client.create_transaction(
        asset_id="BTC",
        amount=50,
        source=TransferPeerPath(VAULT_ACCOUNT, from_vault_account_id),
        destination=TransferPeerPath(VAULT_ACCOUNT, to_vault_account_id)
        )

const payload: TransactionArguments = {
    assetId: asset,
    source: {
        type: sourceType,
        id: sourceId || 0
    },
    destination: {
        type: destinationType,
        id: String(destinationId)
    },
    amount: Number(amount),
    fee: Number(fee),
    note: "Created by fireblocks SDK"
};

const result = await fireblocks.createTransaction(payload);

The above command returns JSON structured like this:

{
  "id": "string",
  "status": "string"
}

Creates a new transaction and returns a CreateTransactionResponse object.

HTTP Request

POST /v1/transactions

Body Parameters

Parameter Description
assetId The id of the asset
source TransferPeerPath json object
destination DestinationTransferPeerPath json object
amount The requested amount to transfer
fee [optional] For BTC-based assets, the fee per bytes in the asset's smallest unit (Satoshi, Latoshi, etc.)
For XRP, the fee for the transaction
gasPrice [optional] For ETH-based assets only this will be used instead of the fee property, value is in gwei
note [optional] Note to be added to the transaction log
autoStaking [optional] For EOS transfers, staking will be managed by Fireblocks
networkStaking [optional] For EOS transfers, network stake
cpuStaking [optional] For EOS transfers, cpu stake
operation [optional] TransactionOperation Transaction operation type, the default is "TRANSFER"

Get a Specific Transaction


tx = fireblocks.get_transaction_by_id(txId)


  const tx = await fireblocks.getTransactionById(txId);

The above command returns JSON structured like this:

{
  "id": "string",
  "assetId": "string",
  "source": {
    "type": "VAULT_ACCOUNT",
    "id": "string",
    "name": "string",
    "subType": "string"
  },
  "destination": {
    "type": "VAULT_ACCOUNT",
    "id": "string",
    "name": "string",
    "subType": "string"
  },
  "requestedAmount": 0,
  "amount": 0,
  "netAmount": 0,
  "amountUSD": 0,
  "serviceFee": 0,
  "networkFee": 0,
  "createdAt": "string",
  "lastUpdated": "string",
  "status": "SUBMITTED",
  "txHash": "string",
  "tag": "string",
  "subStatus": "INSUFFICIENT_FUNDS",
  "destinationAddress": "string",
  "destinationAddressDescription": "string",
  "destinationTag": "string",
  "signedBy": [
    "string"
  ],
  "createdBy": "string",
  "rejectedBy": "string",
  "addressType": "string",
  "note": "string",
  "exchangeTxId": "string",
  "feeCurrency": "string",
  "operation": "TRANSFER"
}

Retrieves a specific transaction for the requested transaction id and returns a TransactionDetails object.

HTTP Request

GET /v1/transactions/{txId}

URL Parameters

Parameter Description
txId The id of the transaction to return

Cancel Transaction


result = fireblocks.cancel_transaction_by_id(txId)


const result = await fireblocks.cancelTransactionById(txId);

The above command returns JSON structured like this:

{
  "success": true
}

Returns request status.

HTTP Request

POST /v1/transactions/{txId}/cancel

URL Parameters

Parameter Description
txId The id of the transaction to return

Network Connections

All Network Connections


network_connections = fireblocks.get_network_connections()


const networkConnections = await fireblocks.getNetworkConnections(txId);

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "localChannel": {
      "networkId": "string",
      "name": "string"
    },
    "remoteChannel": {
      "networkId": "string",
      "name": "string"
    }
  }
]

Retrieves all Fireblocks network connections and returns an array of NetworkConnection objects.

HTTP Request

GET /v1/network_connections

Get a Network Connection


network_connection = fireblocks.get_network_connection(connectionId)


const network_connection = await fireblocks.getNetworkConnection(connectionId);

The above command returns JSON structured like this:

{
  "id": "string",
  "localChannel": {
    "networkId": "string",
    "name": "string"
  },
  "remoteChannel": {
    "networkId": "string",
    "name": "string"
  }
}

Retrieves a network connection matching the requested connectionId and returns a NetworkConnection object.

HTTP Request

GET /v1/network_connections/{connectionId}

URL Parameters

Parameter Description
connectionId The id of the network connection

Supported Assets

Get All Assets Supported by Fireblocks


supportedAssets = fireblocks.get_supported_assets()


const supportedAssets = await fireblocks.getSupportedAssets();

The above command returns JSON structured like this:

[
  {
    "id": "string",
    "name": "string",
    "type": "BASE_ASSET",
    "contractAddress": "string"
  }
]

Returns all assets supported by Fireblocks, an array of AssetTypeResponse.

HTTP Request

GET /v1/supported_assets

Automated Signer Callback

Customer callback to approve or reject the signing.
Callback Handler is also available in Open API 3.0 specification format.

Transaction Signing Callback Handler

# -*- coding: utf-8 -*-
"""
App runner
"""
# Third-party imports
import falcon
import json

class TransferRequest(object):
    def on_post(self, req, resp):
        raw_json = req.bounded_stream.read()
        obj = json.loads(raw_json.decode("utf-8"))
        # Prints the received object
        print(obj)
        # In this example always approves
        resp.body = json.dumps({'action': 'APPROVE'})
        resp.status = falcon.HTTP_200


# Create falcon app
app = falcon.API()

app.add_route('/tx_sign_request', TransferRequest())

""" Useful for debugging problems in API, it works with pdb
if __name__ == '__main__':
    from wsgiref import simple_server  # NOQA
    httpd = simple_server.make_server('127.0.0.1', 8000, app)
    httpd.serve_forever()
"""

POST /tx_sign_request

Returns a CallbackResponse object.

Parameters sent

Parameter Type Description
txId string Fireblocks' internal transaction id
operation string The type of the operation
sourceType string Whether the transfer is from Fireblocks vault or exchange (VAULT or EXCHANGE)
sourceId string The id of the vault account or the exchange account UUID
destType string The destination of the transaction (VAULT or EXCHANGE or UNMANAGED)
destAddressType string WHITELISTED or ONE_TIME
destId string The id of the destination
asset string The asset symbol
amount number The amount of the transfer
destAddress string The destination address of the transfer
fee string [optional] The fee of the transaction

Configuration Approval Callback Handler

POST /config_change_sign_request

Returns a CallbackResponse object.

Parameters sent

Parameter Type Description
type string [ UNMANAGED_WALLET, EXCHANGE, FIAT_ACCOUNT ]
extraInfo JSON object Either AddressInfo or ThirdPartyInfo json object

Webhook

By providing a Webhook to Fireblocks, you could receive push notification on various events in your workspace. All events will be sent with these headers:

Webhooks are set by providing the URL to Fireblocks Support. Once the webhook will be set up, we will respond with the matching public key to verify the signature of incoming events.

Fireblocks will send a POST request to the URL(s) associated with the workspace and expect a 200 response. If no response is received, Fireblocks will resend the request several more times with an increasing delay between each attempt.

New Transaction

A TRANSACTION_CREATED event will be sent to the webhook upon a new transation identified in the workspace. The sent event will be the TransactionCreated object.

Transaction Update

A TRANSACTION_STATUS_UPDATED event will be sent upon any change in the status of the transaction. The sent event will be the TransactionStatusUpdated object.

Vault Account Added

A VAULT_ACCOUNT_ADDED event will be sent upon addition of a new vault account. The sent event will be the VaultAccountAdded object.

Asset Added

A VAULT_ACCOUNT_ASSET event will be sent upon addition of a new asset under a vault account. The sent event with the VaultAccountAssetAdded object.

Internal Wallet Added

An INTERNAL_WALLET_ASSET_ADDED event will be sent upon addition of new asset to an internal wallet. The sent event will be the InternalWalletAssetAdded object.

External Wallet Added

An EXTERNAL_WALLET_ASSET_ADDED event will be sent upon addition of new asset to an external wallet. The sent event will be the ExternalWalletAssetAdded object.

Exchange Account Added

An EXCHANGE_ACCOUNT_ADDED event will be sent upon addition of a new exchange account. The sent event will be the ExchangeAccountAdded object.

Fiat Account Added

An FIAT_ACCOUNT_ADDED event will be sent upon addition of a new fiat account. The sent event will be the FiatAccountAdded object.

Network Connection Added

An NETWORK_CONNECTION_ADDED event will be sent upon addition of a new network connection. The sent event will be the NetworkConnectionAdded object.

API objects

Here, you can find a description of all the objects returned by the various endpoints.

WalletAsset

Parameter Type Description
id string The id of the asset
balance string The balance of the wallet
lockedAmount string Locked amount in the wallet
status ConfigChangeRequestStatus Status of the Internal Wallet
activationTime string The time the wallet will be activated in case wallets activation posponed according to workspace definition
address string The address of the wallet
tag string Destination tag (for XRP, used as memo for EOS/XLM) of the wallet.

ExternalWalletAsset

Parameter Type Description
id string The id of the asset
status ConfigChangeRequestStatus Status of the External Wallet
activationTime string The time the wallet will be activated in case wallets activation posponed according to workspace definition
address string The address of the wallet
tag string Destination tag (for XRP, used as memo for EOS/XLM) of the wallet

ExchangeAsset

Parameter Type Description
id string The id of the exchange account to return
balance string Balance of the asset in the exchange account
lockedAmout string Locked amount in the account

CreateVaultAssetResponse

Parameter Type Description
id string The id of the asset
eosAccountName string Returned for EOS, the account name

VaultAsset

Parameter Type Description
id string The id of the asset
total string The total wallet balance. In EOS, this value includes the network balance, self staking, and pending refunds. For all other coins, it is the balance as it appears on the blockchain
balance string Deprecated - replaced by "total"
available string Funds available for transfer. Equals the blockchain balance minus any locked amount
pending string The cumulative balance of all transactions pending to be cleared
lockedAmount string Funds in outgoing transactions that are not yet published to the network
totalStakedCPU string [optional] Only for EOS, total CPU staked for the account
totalStakedNetwork string [optional] Only for EOS, total Network staked for the account
selfStakedCPU string [optional] Only for EOS, self CPU staked for the account
selfStakedNetwork string [optional] Only for EOS, self Network staked for the account
pendingRefundCPU string [optional] Only for EOS, pending CPU stake refund for the account
pendingRefundNetwork string [optional] Only for EOS, pending Network stake refund for the account

VaultWalletAddress

Parameter Type Description
assetId string The id of the asset
address string Address of the Vault Wallet
description string Description of the address
tag string Destination tag for XRP, used as memo for EOS/XLM
type string

CreateAddressResponse

Parameter Type Description
address string Address of the Vault Wallet
tag string Destination tag for XRP, used as memo for EOS/XLM

VaultAccount

Parameter Type Description
id string The id of the Vault Account
name string Name of the Vault Account
hiddenOnUI boolean Specifies whether this vault account is visible in the web console or not
assets array of VaultAsset List of assets under this Vault Account

UnmanagedWallet

Parameter Type Description
id string The id of the Unmanaged Wallet
name string Name of the Wallet Container
assets array of WalletAsset Array of the assets available in the unmanaged wallet

ExternalWallet

Parameter Type Description
id string The id of the Unmanaged Wallet
name string Name of the Wallet Container
assets array of ExternalWalletAsset Array of the assets available in the exteral wallet

ExchangeAccount

Parameter Type Description
id string The id of the exchange account to return
type ExchangeType
name string Display name of the exchange account
status string Status of the exchange account
assets array of ExchangeAsset Assets in the account
isSubaccount boolean True if the account is a subaccount in an exchange

ExchangeType

Parameter Type Description
type string [BITTREX, COINBASEPRO, BINANCE, BINANCEUS, BITMEX, KRAKEN, GEMINI, BITFINEX, BITSTAMP, POLONIEX, DERIBIT, LIQUID, HUOBI, BITHUMB, OKEX, OKCOIN, HITBTC, KORBIT, SEEDCX, BITSO]

OneTimeAddress

Parameter Type Description
address string Transfer destination address
tag string Transfer destination tag (for Ripple, 'memo' for EOS/XLM)

TransferPeerPath

Parameter Type Description
type string [ VAULT_ACCOUNT, EXCHANGE_ACCOUNT, INTERNAL_WALLET, EXTERNAL_WALLET, NETWORK_CONNECTION, FIAT_ACCOUNT, COMPOUND ]
id string The id of the peer

DestinationTransferPeerPath

Parameter Type Description
type string [ VAULT_ACCOUNT, EXCHANGE_ACCOUNT, INTERNAL_WALLET, EXTERNAL_WALLET, NETWORK_CONNECTION, FIAT_ACCOUNT, COMPOUND ]
id string The id of the exchange account to return
oneTimeAddress oneTimeAddress Destination address

CreateTransactionResponse

Parameter Type Description
id string The id of the transaction
status TransactionStatus Status of the transaction

CancelTransactionResponse

Parameter Type Description
success boolean True if the cancellation succeeded

TransferPeerPathResponse

Parameter Type Description
type string [ VAULT_ACCOUNT, EXCHANGE_ACCOUNT, INTERNAL_WALLET, EXTERNAL_WALLET, NETWORK_CONNECTION, FIAT_ACCOUNT, COMPOUND ]
id string The id of the exchange account to return
name string The name of the exchange account
subType string

NetworkRecords

Parameter Type Description
source TransferPeerPathResponse Source of the transaction
destination TransferPeerPathResponse Destination of the transaction
txHash string Blockchain hash of the transaction
networkFee number The fee paid to the network
assetId string Transaction asset
netAmount number The net amount of the transaction, after fee deduction
status NetworkStatus Status of the blockchain transaction
type string Type of the operation
destinationAddress string Destination address

TransactionDetails

Parameter Type Description
id string id of the transaction
assetId string Transaction asset
source TransferPeerPathResponse Source of the transaction
destination TransferPeerPathResponse Destination of the transaction
requestedAmount number The amount requested by the user
amount number If the transfer is a withdrawal from an exchange, the actual amount that was requested to be transferred. Otherwise, the requested amount
netAmount number The net amount of the transaction, after fee deduction
amountUSD number The USD value of the requested amount
serviceFee number The total fee deducted by the exchange from the actual requested amount (serviceFee = amount - netAmount)
networkFee number The fee paid to the network
createdAt string Unix timestamp
lastUpdated string Unix timestamp
status TransactionStatus The current status of the transaction
txHash string Blockchain hash of the transaction
tag string Tag of the transaction
subStatus TransactionSubStatus More detailed status of the transaction
destinationAddress string Address where the asset were transfered
destinationAddressDescription string Description of the address
destinationTag string Destination tag (for XRP and used as memo for EOS/XLM)
signedBy array of string Signers of the transaction
createdBy string Initiator of the transaction
rejectedBy string User id of the user that rejected the transaction (in case it was rejected)
addressType string [ ONE_TIME, WHITELISTED ]
note string Custome note of the transaction
exchangeTxId string If the transaction originated from an exchange, this is the exchange tx id
feeCurrency string The asset which was taken to pay the fee (ETH for ERC-20 tokens, BTC for Tether Omni)
operation TransactionOperation Default operation is "TRANSFER"
networkRecords NetworkRecords Transaction on the Fireblocks platform can aggregate several blockchain transactions, in such a case these records specify all the transactions that took place on the blockchain.

TransactionOperation

Parameter Type Description
operation string [ TRANSFER, MINT, BURN, SUPPLY_TO_COMPOUND, REDEEM_FROM_COMPOUND ]

AssetTypeResponse

Parameter Type Description
id string The id of the asset
name string The name of the asset
type string [ BASE_ASSET, ETH_CONTRACT, FIAT ]
contractAddress string Contract address for ERC-20 smart contracts

NetworkConnection

Parameter Type Description
id string The id of the Network Connection
localChannel Channel Local channel ID
remoteChannel Channel Remote channel ID

Channel

Parameter Type Description
networkId string 8 characters id of the channel
name string The name of the channel

ConfigChangeRequestStatus

Parameter Type Description
status string [ WAITING_FOR_APPROVAL, APPROVED, CANCELLED, REJECTED, FAILED ]

AddressInfo

Parameter Type Description
subType string [ INTERNAL, EXTERNAL ]
walletName string The name of the wallet as defined in the workspace
walletID string Fireblocks' internal wallet id
asset string Wallet's asset
address string The address of the asset in the wallet
tag string [optional] For assets that have tag/memo (XRP/EOS/XLM)

ThirdPartyInfo

Parameter Type Description
subType ThirdPartyType The third party
accountName string The name of the account
accountId string The id of the account
apiKey string Third party's API key
addresses string [optional] A JSON formated "key":"value" string, where the key is an asset symbol (asset symbols can be retrieved at the supported-assets and the value is its address. There can be multiple entries in the JSON.

FiatAccount

Parameter Type Description
id string The id of the account
type string [ SIGNET
name string Display name of the fiat account
address string The address of the account
assets Array of FiatAssets Array of the assets under the account

FiatAsset

Parameter Type Description
id string The id of the asset
balance string The balance of the asset

TransactionCreated

Parameter Type Description
type string TRANSACTION_CREATED
timestamp number Timestamp in milliseconds
data TransactionDetails All the transaction information

TransactionStatusUpdated

Parameter Type Description
type string TRANSACTION_STATUS_UPDATED
timestamp number Timestamp in milliseconds
data TransactionDetails All the transaction information

VaultAccountAdded

Parameter Type Description
type string VAULT_ACCOUNT_ADDED
timestamp number Timestamp in milliseconds
data VaultAccount Vault wallet details

VaultAccountAssetAdded

Parameter Type Description
type string VAULT_ACCOUNT_ASSET_ADDED
timestamp number Timestamp in milliseconds
data AssetAddedData Vault wallet details

AssetAddedData

Parameter Type Description
accountId string The id of the vault account under which the wallet was added
accountName string The nam of the vault account under which the wallet was added
assetId string Wallet's asset

InternalWalletAssetAdded

Parameter Type Description
type string INTERNAL_WALLET_ASSET_ADDED
timestamp number Timestamp in milliseconds
data WalletAssetWebhook Internal wallet details

ExternalWalletAssetAdded

Parameter Type Description
type string EXTERNAL_WALLET_ASSET_ADDED
timestamp number Timestamp in milliseconds
data WalletAssetWebhook External wallet details

WalletAssetWebhook

Parameter Type Description
assetId string The wallet's asset
id string The id of the wallet
name string The name of wallet
address string The address of the wallet
tag string Destination tag (for XRP, used as memo for EOS/XLM) of the wallet
activationTime string The time the wallet will be activated in case wallets activation posponed according to workspace definition

ExchangeAccountAdded

Parameter Type Description
type string EXCHANGE_ACCOUNT_ADDED
timestamp number Timestamp in milliseconds
data ThirdPartyWebhook Exchange accounts details

FiatAccountAdded

Parameter Type Description
type string FIAT_ACCOUNT_ADDED
timestamp number Timestamp in milliseconds
data ThirdPartyWebhook Fiat account details

ThirdPartyWebhook

Parameter Type Description
id string Id of the thirdparty account on the Fireblocks platform
subType string Subtype of the third party, ie. exchange or fiat name
name string Account name

NetworkConnectionAdded

Parameter Type Description
type string NETWORK_CONNECTION_ADDED
timestamp number Timestamp in milliseconds
data NetworkConnection Network connection details

CallbackResponse

Parameter Type Description
action string [APPROVE, REJECT]
rejectionReason string Free text of the rejection reason for logging purposes

TransactionStatus

TransactionSubStatus

NetworkStatus