Staking Data

Quick Start Guide

Get up and running with the Staking Rewards API in minutes. Obtain your API key, make your first GraphQL request, and understand the response format.

Quick Start Guide

What We Offer

Our API provides access to comprehensive staking data for developers, staking enthusiasts, data analysts, and anyone interested in gaining a deeper understanding of digital assets, staking providers, validator nodes, and more.

The API requires an API Key for access and uses a GraphQL endpoint returning JSON responses. It's designed for both experienced developers and beginners.

Getting an API Key

We believe that the best tools aren't exclusive, but accessible to everyone, regardless of their circumstances.

Free Tier Available — We offer a free tier for hobbyists, enthusiasts, students, and startups.

Request your API key at: https://www.stakingrewards.com/data-api

We also offer four paid tiers: Standard, Startup, Advanced, and Professional.

Prerequisites

To use the API, you'll need:

  1. GraphQL client — Examples: Apollo Client (JavaScript), Relay (JavaScript), Graphene (Python)
  2. GraphQL knowledge — Basic understanding recommended; resources available at graphql.org/learn

API Endpoint

POST https://api.stakingrewards.com/public/query

All requests are POST requests with the following headers:

HeaderValue
Content-Typeapplication/json
X-API-KEYYOUR_API_KEY

Implementation Examples

const endpoint = "https://api.stakingrewards.com/public/query";
const query = `
  {
    assets(where: {symbols: ["ETH"]}, limit: 1) {
      name
      slug
      description
      symbol
    }
  }
`;

fetch(endpoint, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "X-API-KEY": "YOUR_API_KEY",
  },
  body: JSON.stringify({ query }),
})
  .then((response) => response.json())
  .then((data) => console.log(data.data));
import requests

endpoint = "https://api.stakingrewards.com/public/query"
query = """
query {
  assets(where: {symbols: ["ETH"]}, limit: 1) {
    name
    slug
    description
    symbol
  }
}
"""

headers = {
  "Content-Type": "application/json",
  "X-API-KEY": "YOUR_API_KEY",
}

data = {"query": query}
response = requests.post(endpoint, json=data, headers=headers)

if response.status_code == 200:
  print(response.json())
else:
  print("Error occurred:", response.status_code)

Sample Response

{
  "data": {
    "assets": [
      {
        "name": "Ethereum",
        "slug": "ethereum-2-0",
        "description": "the worlds largest and most decentralised Layer1 blockchain...",
        "symbol": "ETH"
      }
    ]
  }
}

Keep Your Key Secure

Your API key is a secret credential. Never commit it to version control, expose it in client-side code, or share it publicly. Use environment variables to manage your key securely.

Next Steps

  • Hands-On for Beginners — New to GraphQL? Walk through the fundamentals with our interactive playground.
  • API Reference — Explore the full schema, types, and available queries.

On this page