All URIs are relative to https://developers.fireblocks.com/reference/
| Method | HTTP request | Description |
|---|---|---|
| approveTermsOfServiceByProviderId | POST /staking/providers/{providerId}/approveTermsOfService | Approve provider terms of service |
| claimRewards | POST /staking/chains/{chainDescriptor}/claim_rewards | Claim accrued rewards |
| consolidate | POST /staking/chains/{chainDescriptor}/consolidate | Consolidate staking positions (ETH validator consolidation) |
| getAllDelegations | GET /staking/positions | List staking positions |
| getChainInfo | GET /staking/chains/{chainDescriptor}/chainInfo | Get chain-level staking parameters |
| getChains | GET /staking/chains | List supported staking chains |
| getDelegationById | GET /staking/positions/{id} | Get position details |
| getPositions | GET /staking/positions_paginated | List staking positions (Paginated) |
| getProviders | GET /staking/providers | List staking providers |
| getSummary | GET /staking/positions/summary | Get positions summary |
| getSummaryByVault | GET /staking/positions/summary/vaults | Get positions summary by vault |
| mergeStakeAccounts | POST /staking/chains/{chainDescriptor}/merge | Merge staking positions |
| split | POST /staking/chains/{chainDescriptor}/split | Split a staking position |
| stake | POST /staking/chains/{chainDescriptor}/stake | Initiate or add to existing stake |
| unstake | POST /staking/chains/{chainDescriptor}/unstake | Initiate unstake |
| withdraw | POST /staking/chains/{chainDescriptor}/withdraw | Withdraw staked funds |
approveTermsOfServiceByProviderId()
Approves the provider's terms of service. Must be called once before performing any staking operation with this provider.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiApproveTermsOfServiceByProviderIdRequest } 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: StakingApiApproveTermsOfServiceByProviderIdRequest = {
// StakingProvider | Unique identifier of the staking provider.
providerId: 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.staking.approveTermsOfServiceByProviderId(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 |
|---|---|---|---|
| providerId | StakingProvider | Unique identifier of the staking provider. | 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: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Terms of service accepted. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
claimRewards(claimRewardsRequest, )
Claims available staking rewards for the specified chain and vault. Supported chains: Solana and Polygon (Matic). Behavior depends on protocol reward distribution.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiClaimRewardsRequest } 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: StakingApiClaimRewardsRequest = {
// ClaimRewardsRequest
claimRewardsRequest: param_value,
// 'SOL' | 'SOL_TEST' | 'MATIC' | Protocol identifier for the claim rewards staking operation (e.g., MATIC/SOL).
chainDescriptor: SOL,
// 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.staking.claimRewards(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 |
|---|---|---|---|
| claimRewardsRequest | ClaimRewardsRequest | ||
| chainDescriptor | [**'SOL' | 'SOL_TEST' | 'MATIC'**]Array<'SOL' | 'SOL_TEST' | 'MATIC'> |
| 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 | Claim-rewards request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MergeStakeAccountsResponse consolidate(mergeStakeAccountsRequest, )
Consolidates the source staking position into the destination, merging the balance into the destination and closing the source position once complete. Both positions must be from the same funding vaults account (i.e. same withdrawals credentials). On chain, this translates into a consolidation transaction, where the source validator is consolidated into the destination validator. Supported chains: Ethereum (ETH) only.
Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor. Note: This endpoint is currently in beta and might be subject to changes.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiConsolidateRequest, MergeStakeAccountsResponse } 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: StakingApiConsolidateRequest = {
// MergeStakeAccountsRequest
mergeStakeAccountsRequest: param_value,
// 'ETH' | 'ETH_TEST6' | 'ETH_TEST_HOODI' | Protocol identifier for the staking operation (e.g., ETH).
chainDescriptor: ETH,
// 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.staking.consolidate(body).then((res: FireblocksResponse<MergeStakeAccountsResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| mergeStakeAccountsRequest | MergeStakeAccountsRequest | ||
| chainDescriptor | [**'ETH' | 'ETH_TEST6' | 'ETH_TEST_HOODI'**]Array<'ETH' | 'ETH_TEST6' | 'ETH_TEST_HOODI'> |
| 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 |
|---|---|---|
| 201 | Merge request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakingGetAllDelegationsResponse getAllDelegations()
Returns all staking positions with core details: amounts, rewards, status, chain, and vault.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiGetAllDelegationsRequest, StakingGetAllDelegationsResponse } 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: StakingApiGetAllDelegationsRequest = {
// ChainDescriptor | Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}). If omitted, positions across all supported chains are returned. (optional)
chainDescriptor: param_value,
// string | Filter positions by vault account ID. (optional)
vaultAccountId: 1,
};
fireblocks.staking.getAllDelegations(body).then((res: FireblocksResponse<StakingGetAllDelegationsResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| chainDescriptor | ChainDescriptor | Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}). If omitted, positions across all supported chains are returned. | (optional) defaults to undefined |
| vaultAccountId | [string] | Filter positions by vault account ID. | (optional) defaults to undefined |
StakingGetAllDelegationsResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Positions retrieved successfully. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChainInfoResponse getChainInfo()
Returns chain-specific staking information such as epoch/slot cadence, lockup or unbonding periods, fee/reward mechanics, and other operational constraints.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiGetChainInfoRequest, ChainInfoResponse } 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: StakingApiGetChainInfoRequest = {
// ChainDescriptor | Protocol identifier for the chain info staking operation (e.g., ETH/MATIC/SOL).
chainDescriptor: param_value,
};
fireblocks.staking.getChainInfo(body).then((res: FireblocksResponse<ChainInfoResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| chainDescriptor | ChainDescriptor | Protocol identifier for the chain info staking operation (e.g., ETH/MATIC/SOL). | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Chain-specific staking information returned successfully. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakingGetChainsResponse getChains()
Returns an alphabetical list of blockchains supported for staking by the current workspace context.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingGetChainsResponse } 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.staking.getChains(body).then((res: FireblocksResponse<StakingGetChainsResponse>) => {
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 | An array of supported chains was returned successfully. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Delegation getDelegationById()
Returns full details for a single staking position: amounts, rewards, status, chain, and vault.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiGetDelegationByIdRequest, Delegation } 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: StakingApiGetDelegationByIdRequest = {
// string | Unique identifier of the staking position.
id: id_example,
};
fireblocks.staking.getDelegationById(body).then((res: FireblocksResponse<Delegation>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| id | [string] | Unique identifier of the staking position. | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Position retrieved successfully. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakingPositionsPaginatedResponse getPositions()
Returns staking positions with core details: amounts, rewards, status, chain, and vault. It supports cursor-based pagination for efficient data retrieval. This endpoint always returns a paginated response with {data, next} structure.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiGetPositionsRequest, StakingPositionsPaginatedResponse } 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: StakingApiGetPositionsRequest = {
// number | Number of results per page. When provided, the response returns a paginated object with {data, next}. If omitted, all results are returned as an array.
pageSize: 10,
// ChainDescriptor | Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}). If omitted, positions across all supported chains are returned. (optional)
chainDescriptor: param_value,
// string | Filter positions by Fireblocks vault account ID. If omitted, positions across all vault accounts are returned. (optional)
vaultAccountId: 10,
// string | Cursor for the next page of results. Use the value from the \'next\' field in the previous response. (optional)
pageCursor: eJ0eXAiOiJKV1QiLCJhbGcOiJIUzI1NiJ9,
// 'ASC' | 'DESC' | ASC / DESC ordering (default DESC) (optional)
order: ASC,
};
fireblocks.staking.getPositions(body).then((res: FireblocksResponse<StakingPositionsPaginatedResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| pageSize | [number] | Number of results per page. When provided, the response returns a paginated object with {data, next}. If omitted, all results are returned as an array. | defaults to 10 |
| chainDescriptor | ChainDescriptor | Protocol identifier to filter positions (e.g., ATOM_COS/AXL/CELESTIA}). If omitted, positions across all supported chains are returned. | (optional) defaults to undefined |
| vaultAccountId | [string] | Filter positions by Fireblocks vault account ID. If omitted, positions across all vault accounts are returned. | (optional) defaults to undefined |
| pageCursor | [string] | Cursor for the next page of results. Use the value from the 'next' field in the previous response. | (optional) defaults to undefined |
| order | [**'ASC' | 'DESC'**]Array<'ASC' | 'DESC'> | ASC / DESC ordering (default DESC) |
StakingPositionsPaginatedResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Positions retrieved successfully with pagination. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakingGetProvidersResponse getProviders()
Returns all available staking providers with metadata such as name, ID, and supported chains.
Endpoint Permission: Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingGetProvidersResponse } 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.staking.getProviders(body).then((res: FireblocksResponse<StakingGetProvidersResponse>) => {
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 | Supported providers retrieved successfully. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DelegationSummary getSummary()
Returns an aggregated cross-vault summary: active/inactive counts, total staked, and total rewards per chain.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, DelegationSummary } 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.staking.getSummary(body).then((res: FireblocksResponse<DelegationSummary>) => {
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 | Summary across all vaults returned successfully. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakingGetSummaryByVaultResponse getSummaryByVault()
Returns per-vault aggregates: status breakdown, total staked, and total rewards per chain.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingGetSummaryByVaultResponse } 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.staking.getSummaryByVault(body).then((res: FireblocksResponse<StakingGetSummaryByVaultResponse>) => {
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.
StakingGetSummaryByVaultResponse
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Per-vault summary returned successfully. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MergeStakeAccountsResponse mergeStakeAccounts(mergeStakeAccountsRequest, )
Merges the source stake account into the destination, consolidating the balance into the destination and closing the source account once complete. Both accounts must be from the same validator provider and of same vault account.. Supported chains: Solana (SOL).
Endpoint Permission: Owner, Admin, Non-Signing Admin, Signer, Approver, Editor.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiMergeStakeAccountsRequest, MergeStakeAccountsResponse } 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: StakingApiMergeStakeAccountsRequest = {
// MergeStakeAccountsRequest
mergeStakeAccountsRequest: param_value,
// 'SOL' | 'SOL_TEST' | Protocol identifier for the merge staking operation (e.g., SOL).
chainDescriptor: SOL,
// 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.staking.mergeStakeAccounts(body).then((res: FireblocksResponse<MergeStakeAccountsResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| mergeStakeAccountsRequest | MergeStakeAccountsRequest | ||
| chainDescriptor | [**'SOL' | 'SOL_TEST'**]Array<'SOL' | 'SOL_TEST'> | Protocol identifier for the merge staking operation (e.g., SOL). |
| 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 |
|---|---|---|
| 201 | Merge request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SplitResponse split(splitRequest, )
Splits a staking position by creating a new stake account with the requested amount, while keeping the original account with the remaining balance. Supported chains: Solana (SOL).
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiSplitRequest, SplitResponse } 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: StakingApiSplitRequest = {
// SplitRequest
splitRequest: param_value,
// 'SOL' | 'SOL_TEST' | Protocol identifier for the staking operation (e.g., SOL).
chainDescriptor: SOL,
// 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.staking.split(body).then((res: FireblocksResponse<SplitResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| splitRequest | SplitRequest | ||
| chainDescriptor | [**'SOL' | 'SOL_TEST'**]Array<'SOL' | 'SOL_TEST'> | Protocol identifier for the staking operation (e.g., SOL). |
| 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 |
|---|---|---|
| 201 | Split request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StakeResponse stake(stakeRequest, )
Creates a new staking position and returns its unique ID. For Ethereum compounding validator (EIP-7251): when the 'id' of an existing compounding validator position is provided, adds to that position; otherwise creates a new position. For Ethereum legacy validator: creates a new position regardless of existing delegations. For Cosmos chains and Ethereum liquid staking (Lido): automatically add to existing positions for the same validator provider and same vault account if one exists, otherwise create a new position. For Solana and Polygon: always create new positions regardless of existing delegations.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiStakeRequest, StakeResponse } 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: StakingApiStakeRequest = {
// StakeRequest
stakeRequest: param_value,
// ChainDescriptor | Protocol identifier for the stake staking operation (e.g., ATOM_COS/AXL/CELESTIA).
chainDescriptor: 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.staking.stake(body).then((res: FireblocksResponse<StakeResponse>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| stakeRequest | StakeRequest | ||
| chainDescriptor | ChainDescriptor | Protocol identifier for the stake staking operation (e.g., ATOM_COS/AXL/CELESTIA). | 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 |
|---|---|---|
| 201 | Stake request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
unstake(unstakeRequest, )
Submits a chain-specific unstake request.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiUnstakeRequest } 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: StakingApiUnstakeRequest = {
// UnstakeRequest
unstakeRequest: param_value,
// ChainDescriptor | Protocol identifier for the unstake staking operation (e.g., SOL/SOL_TEST/MATIC).
chainDescriptor: 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.staking.unstake(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 |
|---|---|---|---|
| unstakeRequest | UnstakeRequest | ||
| chainDescriptor | ChainDescriptor | Protocol identifier for the unstake staking operation (e.g., SOL/SOL_TEST/MATIC). | 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 | Unstake request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
withdraw(withdrawRequest, )
Withdraws funds that have completed the unbonding period. Typically requires the position to be deactivated first (unstake → unbond → withdraw). Amount and timing vary by chain protocol.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, StakingApiWithdrawRequest } 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: StakingApiWithdrawRequest = {
// WithdrawRequest
withdrawRequest: param_value,
// ChainDescriptor | Protocol identifier for the withdraw staking operation (e.g., ATOM_COS/ETH/STETH_ETH).
chainDescriptor: 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.staking.withdraw(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 |
|---|---|---|---|
| withdrawRequest | WithdrawRequest | ||
| chainDescriptor | ChainDescriptor | Protocol identifier for the withdraw staking operation (e.g., ATOM_COS/ETH/STETH_ETH). | 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 | Withdraw request accepted and created. | * X-Request-ID - |
| 400 | Bad request: missing/invalid fields, unsupported amount, or malformed payload. | * X-Request-ID - |
| 403 | Forbidden: insufficient permissions, disabled feature, or restricted provider/validator. | * X-Request-ID - |
| 404 | Not found: requested resource does not exist (e.g., position, validator, provider, or wallet). | * X-Request-ID - |
| 429 | Rate limit exceeded: slow down and retry later. | * X-Request-ID - |
| 500 | Internal error while processing the request. | * X-Request-ID - |
| 0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]