All URIs are relative to https://developers.fireblocks.com/reference/
Method | HTTP request | Description |
---|---|---|
addAssetToExternalWallet | POST /external_wallets/{walletId}/{assetId} | Add an asset to an external wallet. |
createExternalWallet | POST /external_wallets | Create an external wallet |
deleteExternalWallet | DELETE /external_wallets/{walletId} | Delete an external wallet |
getExternalWallet | GET /external_wallets/{walletId} | Find an external wallet |
getExternalWalletAsset | GET /external_wallets/{walletId}/{assetId} | Get an asset from an external wallet |
getExternalWallets | GET /external_wallets | List external wallets |
removeAssetFromExternalWallet | DELETE /external_wallets/{walletId}/{assetId} | Delete an asset from an external wallet |
setExternalWalletCustomerRefId | POST /external_wallets/{walletId}/set_customer_ref_id | Set an AML customer reference ID for an external wallet |
ExternalWalletAsset addAssetToExternalWallet()
Adds an asset to an existing external wallet.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiAddAssetToExternalWalletRequest, ExternalWalletAsset } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiAddAssetToExternalWalletRequest = {
// string | The ID of the wallet
walletId: walletId_example,
// string | The ID of the asset to add
assetId: assetId_example,
// AddAssetToExternalWalletRequest (optional)
addAssetToExternalWalletRequest: param_value,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.externalWallets.addAssetToExternalWallet(body).then((res: FireblocksResponse<ExternalWalletAsset>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
addAssetToExternalWalletRequest | AddAssetToExternalWalletRequest | ||
walletId | [string] | The ID of the wallet | defaults to undefined |
assetId | [string] | The ID of the asset to add | defaults to undefined |
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A Wallet Asset object | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UnmanagedWallet createExternalWallet()
Creates a new external wallet with the requested name.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiCreateExternalWalletRequest, UnmanagedWallet } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiCreateExternalWalletRequest = {
// CreateWalletRequest (optional)
createWalletRequest: param_value,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.externalWallets.createExternalWallet(body).then((res: FireblocksResponse<UnmanagedWallet>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
createWalletRequest | CreateWalletRequest | ||
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A Wallet object | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteExternalWallet()
Deletes an external wallet by ID.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiDeleteExternalWalletRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiDeleteExternalWalletRequest = {
// string | The ID of the wallet to delete
walletId: walletId_example,
};
fireblocks.externalWallets.deleteExternalWallet(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
walletId | [string] | The ID of the wallet to delete | defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | OK | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UnmanagedWallet getExternalWallet()
Returns an external wallet by ID.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiGetExternalWalletRequest, UnmanagedWallet } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiGetExternalWalletRequest = {
// string | The ID of the wallet to return
walletId: walletId_example,
};
fireblocks.externalWallets.getExternalWallet(body).then((res: FireblocksResponse<UnmanagedWallet>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
walletId | [string] | The ID of the wallet to return | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A Wallet object | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExternalWalletAsset getExternalWalletAsset()
Returns an external wallet by wallet ID and asset ID.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiGetExternalWalletAssetRequest, ExternalWalletAsset } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiGetExternalWalletAssetRequest = {
// string | The ID of the wallet
walletId: walletId_example,
// string | The ID of the asset to return
assetId: assetId_example,
};
fireblocks.externalWallets.getExternalWalletAsset(body).then((res: FireblocksResponse<ExternalWalletAsset>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
walletId | [string] | The ID of the wallet | defaults to undefined |
assetId | [string] | The ID of the asset to return | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A Wallet Asset object | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetExternalWalletsResponse getExternalWallets()
Gets a list of external wallets under the workspace.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, GetExternalWalletsResponse } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body:any = {};
fireblocks.externalWallets.getExternalWallets(body).then((res: FireblocksResponse<GetExternalWalletsResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
This endpoint does not need any parameter.
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A list of external wallets | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
removeAssetFromExternalWallet()
Deletes an external wallet asset by ID.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiRemoveAssetFromExternalWalletRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiRemoveAssetFromExternalWalletRequest = {
// string | The ID of the wallet
walletId: walletId_example,
// string | The ID of the asset to delete
assetId: assetId_example,
};
fireblocks.externalWallets.removeAssetFromExternalWallet(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
walletId | [string] | The ID of the wallet | defaults to undefined |
assetId | [string] | The ID of the asset to delete | defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | OK | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
setExternalWalletCustomerRefId(setCustomerRefIdRequest, )
Sets an AML/KYT customer reference ID for the specific external wallet.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, ExternalWalletsApiSetExternalWalletCustomerRefIdRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: ExternalWalletsApiSetExternalWalletCustomerRefIdRequest = {
// SetCustomerRefIdRequest
setCustomerRefIdRequest: param_value,
// string | The wallet ID
walletId: walletId_example,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.externalWallets.setExternalWalletCustomerRefId(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
setCustomerRefIdRequest | SetCustomerRefIdRequest | ||
walletId | [string] | The wallet ID | defaults to undefined |
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | OK | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]