# `FireblocksSdk.Api.Staking`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L1)

# `accept_provider_term_of_service`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L80)

Approve staking terms of service.

Approve the terms of service of the staking provider. This must be called before performing a staking action for the first time with this provider.

# `claim_reawards`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L182)

Execute a Claim Rewards operation.

```
FireblocksSdk.Api.Staking.claim_reawards([
  id: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d",
  chainDescriptor: "SOL",
  txNote: "claim rewards request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d",
  feeLevel: :medium
])
```

Options:
* `:id` (`t:String.t/0`) - Required. id of position to unstake

* `:chainDescriptor` (`t:String.t/0`) - Required.

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`)

# `get_chain_info`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L23)

Get chain-specific staking summary.

Return chain-specific, staking-related information summary (e.g. epoch details, lockup durations, estimated rewards, etc.)

Options:

  - `chain_descriptor`: The protocol identifier (e.g. "ETH"/"SOL"/"MATIC"/"STETH_ETH") to use

# `get_position`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L39)

Get staking position details.

Return detailed information on a staking position, including the staked amount, rewards, status and more.

# `get_positions`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L53)

List staking positions details

```
FireblocksSdk.Api.Staking.positions("SOL")
```
Options:

 - `chainDescriptor`: Use "ETH" / "SOL" / "MATIC" / "STETH_ETH" in order to obtain information related to the specific blockchain network or retrieve information about all chains that have data available by providing no argument.

# `get_positions_summary`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L62)

Get staking summary details.

Return a summary of all vaults, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain.

# `get_positions_summary_by_vault`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L71)

Get staking summary details by vault

Return a summary for each vault, categorized by their status (active, inactive), the total amounts staked and total rewards per-chain.

# `get_providers`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L30)

List staking providers details

# `merge`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L237)

Perform a Solana Merge of two active stake accounts into one.

```
FireblocksSdk.Api.Staking.merge([
  chainDescriptor: "SOL",
  sourceId: "b70701f4-d7b1-4795-a8ee-b09cdb5b850f",
  destinationId: "f3432f4-34d1-43495-a8ee-jfdjnfj34i3",
  feeLevel: :medium
])
```

Options:
* `:chainDescriptor` - Required.

* `:sourceId` (`t:String.t/0`) - Required. Id of the source position to merge from

* `:destinationId` (`t:String.t/0`) - Required. Id of the destination position to merge into

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`) - The note to associate with the transactions.

# `split`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L210)

Execute a Split operation on SOL/SOL_TEST stake account.

```
FireblocksSdk.Api.Staking.split([
  id: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d",
  chainDescriptor: "SOL",
  amount: "20",
  txNote: "split 20 SOL out of 100 SOL, created on 02.04.23",
  feeLevel: :medium
])
```

Options:
* `:id` (`t:String.t/0`) - Required. id of position to unstake

* `:chainDescriptor` - Required.

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`) - The note to associate with the transactions.

* `:amount` (`t:String.t/0`) - Required. Amount of tokens to be transferred to the new stake account.

# `stake`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L101)

Init Stake operation - Perform a chain-specific Stake.

```
FireblocksSdk.Api.Staking.stake([
  vaultAccountId: "22",
  providerId: "kiln",
  chainDescriptor: "SOL",
  stakeAmount: "100",
  txNote: "stake request id CcaHc2L43ZWjwCHART3oZoJvHLAe9hzT2DJNUpBzoTN1 of 100 SOL created on 02.04.23",
  feeLevel: :medium
])
```

Options:
* `:vaultAccountId` (`t:String.t/0`) - Required. The source vault account to stake from

* `:chainDescriptor` (`t:String.t/0`) - Required.

* `:providerId` (`t:String.t/0`) - Required. The unique identifier of the staking provider

* `:stakeAmount` (`t:String.t/0`) - Required. Amount of tokens to stake

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`)

# `supported_chains`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L10)

List staking supported chains

# `unstake`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L128)

Execute an unstake operation.

```
FireblocksSdk.Api.Staking.unstake([
  id: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d",
  chainDescriptor: "SOL",
  txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #SOL",
  feeLevel: :medium
])
```

Options:
* `:id` (`t:String.t/0`) - Required. id of position to unstake

* `:chainDescriptor` (`t:String.t/0`) - Required.

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`)

* `:amount` (`t:String.t/0`) - The number of tokens to unstake. This optional field is applicable only for liquid staking and allows for a partial unstake of the position. If not provided, the entire position will be unstaked by default.

# `withdraw`
[🔗](https://github.com/csokun/fireblocks_sdk/blob/v0.2.0/lib/fireblocks_sdk/api/staking.ex#L155)

Execute a Withdraw operation.

```
FireblocksSdk.Api.Staking.withdraw([
  id: "b70701f4-d7b1-4795-a8ee-b09cdb5b850d",
  chainDescriptor: "SOL",
  txNote: "unstake request id b70701f4-d7b1-4795-a8ee-b09cdb5b850d #SOL",
  feeLevel: :medium
])
```

Options:
* `:id` (`t:String.t/0`) - Required. id of position to unstake

* `:chainDescriptor` (`t:String.t/0`) - Required.

* `:fee` (`t:String.t/0`)

* `:feeLevel`

* `:txNote` (`t:String.t/0`)

---

*Consult [api-reference.md](api-reference.md) for complete listing*
