> For the complete documentation index, see [llms.txt](https://docs.allnodes.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.allnodes.com/eth/staking.md).

# Staking

## Get info about address

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get info about your address.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description         |
| ---------------- | ------ | ------------------- |
| `currencySymbol` | string | Must be "ETH"       |
| `action`         | string | Must be "info"      |
| `address`        | string | Your wallet address |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  eth: {
    assets: string; // staked ETH amount (in wei)
    maxUnstakeAssets: string; // max allowed amount to unstake (in wei)
  }
  osEth: {
    shares: string; // minted osETH (in wei)
    maxMintShares: string; // max allowed amount to mint (in wei)
  }
  withdraw: {
    isAvailable: boolean; // is withdraw available
    availableAt: string | null; // ISO timestamp indicating when withdraw will be available
    withdrawableAssets: string; // ETH amount available to withdraw (in wei)
    requestedAssets: string; // ETH amount requested to withdraw (in wei)
  }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "INVALID_ADDRESS"
}
```

{% endtab %}
{% endtabs %}

## Stake ETH

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get transaction params for stake ETH.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description              |
| ---------------- | ------ | ------------------------ |
| `currencySymbol` | string | Must be "ETH"            |
| `action`         | string | Must be "stake"          |
| `address`        | string | Your wallet address      |
| `amount`         | string | Amount to stake (in wei) |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  network: string; // mainnet
  toAddress: string;
  amount: string; // in wei
  gasLimit: number;
  gasPrice: string; // in wei
  data: string;
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "INVALID_AMOUNT"
}
```

{% endtab %}
{% endtabs %}

## Unstake ETH

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get transaction params for unstake ETH.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description                |
| ---------------- | ------ | -------------------------- |
| `currencySymbol` | string | Must be "ETH"              |
| `action`         | string | Must be "unstake"          |
| `address`        | string | Your wallet address        |
| `amount`         | string | Amount to unstake (in wei) |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  network: string; // mainnet
  toAddress: string;
  amount: string; // in wei
  gasLimit: number;
  gasPrice: string; // in wei
  data: string;
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "AMOUNT_EXCEEDS_MAX_UNSTAKEABLE_ASSETS"
}
```

{% endtab %}
{% endtabs %}

## Withdraw ETH (after unstaking period finished)

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get transaction params for withdraw unstaked ETH.

**Current unstaking period**: 1 - 10 days.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description         |
| ---------------- | ------ | ------------------- |
| `currencySymbol` | string | Must be "ETH"       |
| `action`         | string | Must be "withdraw"  |
| `address`        | string | Your wallet address |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  network: string; // mainnet
  toAddress: string;
  amount: string; // in wei
  gasLimit: number;
  gasPrice: string; // in wei
  data: string;
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "WITHDRAW_NOT_AVAILABLE"
}
```

{% endtab %}
{% endtabs %}

## Mint osETH token

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get transaction params for mint osETH token.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description             |
| ---------------- | ------ | ----------------------- |
| `currencySymbol` | string | Must be "ETH"           |
| `action`         | string | Must be "mint-os-eth"   |
| `address`        | string | Your wallet address     |
| `amount`         | string | Amount to mint (in wei) |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  network: string; // mainnet
  toAddress: string;
  amount: string; // in wei
  gasLimit: number;
  gasPrice: string; // in wei
  data: string;
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "AMOUNT_EXCEEDS_MAX_MINT_SHARES"
}
```

{% endtab %}
{% endtabs %}

## Burn osETH token

<mark style="color:green;">`POST`</mark> `https://www.allnodes.com/api/v1/staking`

This endpoint allows you to get transaction params for burn osETH token.

**Headers**

| Name          | Type   | Value          |
| ------------- | ------ | -------------- |
| Authorization | string | `Bearer TOKEN` |

**Body**

| Name             | Type   | Description             |
| ---------------- | ------ | ----------------------- |
| `currencySymbol` | string | Must be "ETH"           |
| `action`         | string | Must be "burn-os-eth"   |
| `address`        | string | Your wallet address     |
| `amount`         | string | Amount to burn (in wei) |

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  network: string; // mainnet
  toAddress: string;
  amount: string; // in wei
  gasLimit: number;
  gasPrice: string; // in wei
  data: string;
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "AMOUNT_EXCEEDS_OS_ETH_SHARES"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.allnodes.com/eth/staking.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
