# fireblocks-sdk

> [![npm version](https://badge.fury.io/js/fireblocks-sdk.svg)](https://badge.fury.io/js/fireblocks-sdk)

Latest version **5.39.1** (published 2026-07-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install fireblocks-sdk
pnpm add fireblocks-sdk
yarn add fireblocks-sdk
bun add fireblocks-sdk
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 5.39.1 |
| Published | 2026-07-19 |
| First published | 2019-09-03 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 374 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 85 |
| Maintainers | iananiev-fb, dx_fireblocks, eranabir, yoavbz-fireblocks, sweintraub, dsvartman-fb, hedi_fb |

## Links

- npm: https://www.npmjs.com/package/fireblocks-sdk
- Repository: https://github.com/fireblocks/fireblocks-sdk-js
- Homepage: https://github.com/fireblocks/fireblocks-sdk-js#readme
- Issues: https://github.com/fireblocks/fireblocks-sdk-js/issues
- npm.io page: https://npm.io/package/fireblocks-sdk

## Dependencies (7)

- [qs](https://npm.io/package/qs.md) ^6.11.0
- [uuid](https://npm.io/package/uuid.md) ^8.3.2
- [axios](https://npm.io/package/axios.md) ^1.16.0
- [platform](https://npm.io/package/platform.md) ^1.3.6
- [jsonwebtoken](https://npm.io/package/jsonwebtoken.md) ^9.0.2
- [query-string](https://npm.io/package/query-string.md) ^7.1.3
- [@notabene/pii-sdk](https://npm.io/package/@notabene/pii-sdk.md) ^1.17.1

## Recent versions

- 5.39.1 (latest) — 2026-07-19
- 5.39.0 — 2026-04-19
- 5.38.0 — 2025-06-05
- 5.37.0 — 2025-03-26
- 5.36.0 — 2025-01-26
- 5.35.0 — 2024-12-19
- 5.34.0 — 2024-12-03
- 5.33.0 — 2024-11-06
- 5.32.0 — 2024-10-28
- 5.31.2 — 2024-09-10
- 5.29.0 — 2024-08-13
- 5.28.1 — 2024-07-30
- 5.28.0 — 2024-07-15
- 5.27.2 — 2024-06-23
- 5.27.1 — 2024-06-20
- … 127 more at https://npm.io/package/fireblocks-sdk/versions

## README

## The Official Javascript & Typescript SDK for Fireblocks API
[![npm version](https://badge.fury.io/js/fireblocks-sdk.svg)](https://badge.fury.io/js/fireblocks-sdk)

> The current version of the SDK has changed the minimum supported Node.js version from v12 to v16.
> 
> Versions older than v16 are no longer maintained by the Node.js community and are considered EOL.


### About
This repository contains the official Javascript & Typescript SDK for Fireblocks API.
For the complete API reference, go to [API reference](https://developers.fireblocks.com/reference/api-overview).

## v4 Migration
Please read the [following guide](./docs/V4-MIGRATION.md) for migration.

## Usage
#### Before You Begin
Make sure you have the credentials for Fireblocks API Services. Otherwise, please contact Fireblocks support for further instructions on how to obtain your API credentials.

#### Requirements
- [Node.js](https://nodejs.org) v16 or higher.

#### Installation
`npm install fireblocks-sdk --save`

or

`yarn add fireblocks-sdk`

#### Importing Fireblocks SDK
JavaScript:
```javascript
const FireblocksSDK = require("fireblocks-sdk").FireblocksSDK;
const fireblocks = new FireblocksSDK(privateKey, apiKey);
```

TypeScript:
```typescript
import { FireblocksSDK } from "fireblocks-sdk";
const fireblocks = new FireblocksSDK(privateKey, apiKey);
```

You can also pass additional options:
```typescript
const baseUrl = "https://api.fireblocks.io";
const authProvider: IAuthProvider = { /* Custom implementation */ };
const fireblocks = new FireblocksSDK(privateKey, apiKey, baseUrl, authProvider, options);
```
The `options` argument has the following structure:
```typescript
interface SDKOptions {
    /** HTTP request timeout */
    timeoutInMs?: number;

    /** Proxy configurations */
    proxy?: AxiosProxyConfig | false;

    /** Whether to remove platform from User-Agent header */
    anonymousPlatform?: boolean;
    
    /** Additional product identifier to be prepended to the User-Agent header */
    userAgent?: string;

    /** TravelRule Provider options to initialize PII Client for PII encryption */
    travelRuleOptions?: TravelRuleOptions;
}
```

#### Axios Interceptor
You can provide the sdk options with an [axios response interceptor](https://axios-http.com/docs/interceptors):
```ts
new FireblocksSDK(privateKey, userId, serverAddress, undefined, {
    customAxiosOptions: {
        interceptors: {
            response: {
                onFulfilled: (response) => {
                    console.log(`Request ID: ${response.headers["x-request-id"]}`);
                    return response;
                },
                onRejected: (error) => {
                    console.log(`Request ID: ${error.response.headers["x-request-id"]}`);
                    throw error;
                }
            }
        }
    }
});
```

#### Error Handling
The SDK throws `AxiosError` upon http errors for API requests.

You can read more about axios error handling [here](https://axios-http.com/docs/handling_errors).

You can get more data on the Fireblocks error using the following fields:

- `error.response.data.code`: The Fireblocks error code, should be provided on support tickets
- `error.response.data.message`: Explanation of the Fireblocks error
- `error.response.headers['x-request-id']`: The request ID correlated to the API request, should be provided on support tickets / Github issues

---
_Source: https://npm.io/package/fireblocks-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
