> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorage.com/llms.txt
> Use this file to discover all available pages before exploring further.

# SOL

> Stake and unstake SOL via API.

# Overview

### Key concepts

* **Minimum stake:** 2 SOL.
* **Validator selection:** provide either a validator `address` or a `providerName`.
  * Provide **one or the other**, not both.
* **Multiple stake requests:** staking multiple times to the same validator address will create multiple `stakingPositionId` values.
* **Unstake timing:** unstake requires about **one epoch (\~2–3 days)** to complete.
* **Collect timing and stake-account reserve:** to maximize rewards and avoid unexpected stake-account closure:
  * Prefer waiting **1 epoch after an unstake completes** before collecting, *or*
  * Leave a minimum reserve of **2,282,880 lamports (0.00228288 SOL)** in the `stakingPositionId` to prevent the stake account from being destroyed.

### Endpoint summary

* **[Stake](/knowledge-base/api-reference/endpoints/transactions/create-stake):** `POST /v2/transactions/stake`
* **[Unstake](/knowledge-base/api-reference/endpoints/transactions/create-unstake):** `POST /v2/transactions/unstake`
* **[Collect (SOL-specific)](/knowledge-base/api-reference/endpoints/transactions/collect):** `POST /v2/transactions/collect`
* **[Get staking positions](https://developers.anchorage.com/reference/getwalletpositions):** `GET /v2/wallets/{walletId}/staking/positions`
* **[Get staking rewards](https://developers.anchorage.com/reference/getwalletrewards):** `GET /v2/wallets/{walletId}/staking/rewards`
* **[List available validators](https://developers.anchorage.com/reference/getdelegationaddresses):** `GET /v2/delegation-addresses/{assetType}`

# Workflows

### Stake (Solana)

**Endpoint**

`POST /v2/transactions/stake`

#### Request rules

* `assetType` must be `"SOL"`.
* `amount` must be at least `"2"`.
* Include `parameters` with **either**:
  * `address` (validator public identifier), **or**
  * `providerName` (provider name)

#### Example: Stake using validator address

```json theme={null}
{
  "source": {
    "type": "WALLET",
    "id": "1c920f4241b78a1d483a29f3c24b6c4c"
  },
  "amount": "5",
  "assetType": "SOL",
  "description": "Internal 9876543210",
  "idempotentId": "9876543210",
  "parameters": {
    "address": "FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh"
  }
}
```

#### Example: Stake using provider name

```json theme={null}
{
  "source": {
    "type": "WALLET",
    "id": "1c920f4241b78a1d483a29f3c24b6c4c"
  },
  "amount": "5",
  "assetType": "SOL",
  "description": "Internal 9876543210",
  "idempotentId": "9876543211",
  "parameters": {
    "providerName": "figment"
  }
}
```

#### Response

A successful request returns **201 Created** with a transaction id.

***

### Unstake (Solana)

**Endpoint**

`POST /v2/transactions/unstake`

#### Request rules

* `stakingPositionId` and `amount` are required.
* After the unstake completes (about \~1 epoch), funds are **inactive** but not yet available for use.
* Use the **Collect** endpoint (below) to move inactive SOL back to the wallet.

#### Example: Unstake

```json theme={null}
{
  "source": {
    "type": "WALLET",
    "id": "1c920f4241b78a1d483a29f3c24b6c4c"
  },
  "amount": "5",
  "assetType": "SOL",
  "idempotentId": "123456789",
  "description": "Unstake 5 SOL",
  "stakingPositionId": "FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh"
}
```

#### Response

A successful request returns **201 Created** with a transaction id.

***

### Collect (Solana-specific)

The collect action moves **inactive** SOL from a stake account back to the wallet's **available** balance.

**Endpoint**

`POST /v2/transactions/collect`

#### Request rules

* `stakingPositionId` is required.
* `amount` is required.
* `assetType` must be `"SOL"`.

#### Example: Collect

```json theme={null}
{
  "stakingPositionId": "FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh",
  "amount": "2",
  "assetType": "SOL"
}
```

#### Possible failure reasons

* **400 Invalid request**: unsupported `assetType`, not enough available balance.
* **404 Not found**: staking position not found.

### Get staking positions

This endpoint retrieves the staking positions (stake accounts) associated with a wallet.

**Endpoint**

`GET /v2/wallets/{walletId}/staking/positions`

#### Expected behavior

* Accepts `SOL` as a valid asset type to retrieve positions.
* Returns SOL staking positions, including `stakingPositionId` values.

### Get staking rewards

This endpoint is used to query rewards generated by staking and assigned to a wallet.

**Endpoint**

`GET /v2/wallets/{walletId}/staking/rewards`

#### Expected behavior

* Accepts `SOL` as a valid asset type.
* Includes `address` as an optional filtering argument.

### List wallet balances

This endpoint retrieves wallet balances for either a single wallet or all wallets in a vault.

**Endpoints**

* [List all wallets for all vaults](https://developers.anchorage.com/reference/getwallets)

#### Expected behavior

* The response includes a list of balance types per wallet.
* `stakedBalance` reflects SOL delegated to validators.

```json theme={null}
{
  "data": {
    "walletId": "3d293c0d64c703023692216e9b4f5280",
    "walletName": "Solana Mainnet - Wallet 1",
    "depositAddress": {
      "address": "5oNDL3swdJJF1g9DzJiZ4ynHXgszjAEpUkxVYejchzrY",
      "addressId": "a33f83d96ca95cac000a344aa478a8b8",
      "addressSignaturePayload": "7b225465787441646472657373223a22356f4e444c337377644a4a46316739447a4a695a34796e485867737a6a414570556b785659656a63687a7259227d",
      "signature": "1642000aa9cca8e8610981aefbdb204b361c9dca3fa067b88fdacfba7a0f620d721378a33f4bbadad3923e633a4d712646d1e8e314e9fcb4aa4102c0581f6503"
    },
    "assets": [
      {
        "assetType": "SOL",
        "availableBalance": {
          "quantity": "100.00000000",
          "assetType": "SOL",
          "currentPrice": "150.25",
          "currentUSDValue": "15025.00"
        },
        "totalBalance": {
          "quantity": "603.00000000",
          "assetType": "SOL",
          "currentPrice": "150.25",
          "currentUSDValue": "90600.75"
        },
        "stakedBalance": {
          "quantity": "500.50000000",
          "assetType": "SOL",
          "currentPrice": "150.25",
          "currentUSDValue": "75200.13"
        },
        "unclaimedBalance": {
          "quantity": "2.50000000",
          "assetType": "SOL",
          "currentPrice": "150.25",
          "currentUSDValue": "375.63"
        }
      }
    ],
    "vaultId": "1c920f4241b78a1d483a29f3c24b6c4c",
    "vaultName": "Long Hold Vault",
    "isDefault": true,
    "isArchived": false,
    "networkId": "SOL",
    "type": "WALLET"
  }
}
```

### List available validators (delegation addresses)

A new endpoint is introduced to retrieve the list of available validators for delegation.

**Endpoint**

`GET /v2/delegation-addresses/{assetType}`

#### Request parameters

* `assetType`: must be `SOL` for Solana validators.
* `limit`: pagination size.
* `afterId`: pagination cursor.

#### Example request

`GET /v2/delegation-addresses/SOL?limit=10&afterId=XXXXXX`

#### Example response

```json theme={null}
{
  "data": [
    {
      "address": "FuS3FPfJDKSNot99ECLXtp3rueq36hMNStJkPJwWodLh",
      "ownerAddress": "",
      "destination": "",
      "name": "Delegator name",
      "description": "some description",
      "anchorageValidator": false
    }
  ],
  "page": {
    "next": "XXXXXY"
  }
}
```

### Common pitfalls

* For `POST /v2/transactions/stake`, provide **either** `parameters.address` **or** `parameters.providerName` (not both).
* Do not expect unstaked SOL to be immediately available. Plan for **epoch timing**, then call **collect**.
* If you want to keep the stake account alive (for rewards or operational reasons), leave the **minimum reserve** in the stake account when collecting.
