# Staking

## Get all delegations

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

This endpoint allows to get list of all your delegations.

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

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

```
[
  {
    id: number;
    name: string;
    currencySymbol: string;
    createdAt: string;
    apr: string | null;
    payoutFrequencySeconds: number | null;
    address: {
      ownerAddress?: string;
      stakingAddress?: string;
      lastRewardAt: string | null;
    };
    delegations: [{
      validatorId: string;
      validatorName: string;
      delegationAmount: number;
      rewardAmount: number;
    }];
    undelegations: [{
      validatorId: string;
      validatorName: string;
      amount: number;
    }];
    settings: {
      wallet: string;
    };
  }
]
```

{% endtab %}
{% endtabs %}

## Get a delegation

<mark style="color:blue;">`GET`</mark> `https://www.allnodes.com/api/v1/staking/{id}`

This endpoint allows to get info about specific delegation on your account.

#### Path Parameters

| Name                                 | Type   | Description                                                                                    |
| ------------------------------------ | ------ | ---------------------------------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark> | number | Delegation you want to get info about. ID can be extracted from the “Get all delegations” call |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | string | Bearer TOKEN |

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

```
{
  id: number;
  name: string;
  currencySymbol: string;
  createdAt: string;
  apr: string | null;
  payoutFrequencySeconds: number | null;
  address: {
    ownerAddress?: string;
    stakingAddress?: string;
    lastRewardAt: string | null;
  };
  delegations: [{
    validatorId: string;
    validatorName: string;
    delegationAmount: number;
    rewardAmount: number;
  }];
  undelegations: [{
    validatorId: string;
    validatorName: string;
    amount: number;
  }];
  settings: {
    wallet: string;
  };
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: 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/endpoints/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.
