Skip to content

List account stakes

GET/accounts/{id}/stakes

Path parameters

NameTypeDescriptionRequired
id
string
Id of the target account

Query parameters

NameTypeDescriptionRequired
cursor
string
Optional cursor to get next pages (based on the next key on query response)
sortBy
"staked" | "rewards" | "total"
Sort by attribute
sortOrder
"asc" | "desc"
Sort order

Response schema

{
// Next page cursor
next: string | null;
// Array of results
results: Array<{
// Staking position ID (if applicable)
id: string;
// Validator address
validator: string;
// Stake state
state:
| "ACTIVE"
| "INACTIVE"
| "ACTIVATING"
| "DEACTIVATING"
| "UNKNOWN"
;
// Staked amount
staked: string;
rewards: {
// Total rewards
total: string;
}
;
}
>
;
}

Examples

bash
curl \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer {jwt}" \
  "$API_BASE_URL/accounts/{id}/stakes"
ts
const url = "<base-url>/accounts/{id}/stakes";

const headers = {
  "Content-Type": "application/json",
  Authorization: "Bearer <jwt>"
};

fetch(url, { headers }).then(res => {
  console.log(res)
});
python
import requests

url = "<base-url>/accounts/{id}/stakes"

headers = {
  "Content-Type": "application/json",
  "Authorization": "Bearer <jwt>"
}

print(requests.get(url, headers=headers))