### Paginated Validator Overview (Bash) Source: https://docs.beaconcha.in/api/dashboard Fetches a paginated overview of validators using the /api/v2/ethereum/validators endpoint. This example demonstrates how to set the page size and filter by dashboard ID. Subsequent requests should include the 'next_cursor' from the previous response for pagination. ```bash curl --request POST \ --url https://beaconcha.in/api/v2/ethereum/validators \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data ' { "chain": "mainnet", "page_size": 10, "validator": { "dashboard_id": 123 } }' ``` -------------------------------- ### Checking Rate Limits Example Source: https://docs.beaconcha.in/api/rate-limits To check your current rate limits, simply make any API request and inspect the response headers. The example below shows how to do this using `curl`. ```APIDOC ## Checking Your Rate Limits Make any API request and inspect the response headers to see your current limits: ```bash curl -s -D - -o /dev/null --request POST \ --url https://beaconcha.in/api/v2/ethereum/validators/rewards-aggregate \ --header 'Authorization: Bearer ' --header 'Content-Type: application/json' \ --data '{ "chain": "mainnet", "validator": { "validator_identifiers": [1] }, "range": { "evaluation_window": "24h" } }' ``` **Example Response Headers:** ``` ratelimit-limit: 1 ratelimit-remaining: 0 ratelimit-reset: 1 ratelimit-window: second ratelimit-validapikey: true x-ratelimit-limit-second: 1 x-ratelimit-limit-minute: 1000 x-ratelimit-limit-hour: 1000 x-ratelimit-limit-day: 1000 x-ratelimit-limit-month: 1000 x-ratelimit-remaining-second: 0 x-ratelimit-remaining-minute: 972 x-ratelimit-remaining-hour: 972 x-ratelimit-remaining-day: 972 x-ratelimit-remaining-month: 972 ``` ``` -------------------------------- ### API Error Response Examples Source: https://docs.beaconcha.in/api-reference/addresses/erc-20-token-balances-for-an-address Demonstrates common error responses from the API, including invalid address parameters and invalid pagination parameters. These examples illustrate the structure of error messages returned by the API. ```json { "status": "ERROR: invalid address parameter", "data": null } ``` ```json { "status": "ERROR: invalid pagination parameters", "data": null } ``` ```json { "status": "ERROR: internal server error", "data": null } ``` -------------------------------- ### API Authentication Examples (Bash) Source: https://docs.beaconcha.in/api-reference/ens/resolve-ens-name-or-address Demonstrates how to authenticate API requests to beaconcha.in using an API key. Two methods are shown: passing the API key as a query string parameter or as a request header. This is crucial for accessing higher usage plans or authenticated endpoints. ```bash curl https://beaconcha.in/api/v1/slot/1?apikey= ``` ```bash curl -H 'apikey: ' https://beaconcha.in/api/v1/slot/1 ``` -------------------------------- ### Get Validator Deposits Source: https://docs.beaconcha.in/api-reference/validators/validator-deposits-execution-layer Retrieves validator deposit information, including execution-layer metadata and deposit data. This endpoint is useful for tracking validator setup and initial deposits. ```APIDOC ## GET /api/v1/validator/{identifier}/deposits ### Description Retrieves validator deposit information, including execution-layer metadata and deposit data. This endpoint is useful for tracking validator setup and initial deposits. ### Method GET ### Endpoint /api/v1/validator/{identifier}/deposits ### Parameters #### Path Parameters - **identifier** (string) - Required - A validator index or BLS public key. #### Query Parameters - **limit** (integer) - Optional - Maximum number of results to return. Defaults to 100. - **cursor** (string) - Optional - Cursor for pagination. ### Request Example ```json { "example": "GET /api/v1/validator/12345/deposits?limit=10" } ``` ### Response #### Success Response (200) - **status** (string) - Status of the API operation ('OK'). - **data** (object) - Response payload specific to the endpoint. - **amount** (integer) - Deposited amount in gwei. - **block_number** (integer) - Execution-layer block number. - **block_ts** (integer) - Block timestamp as Unix time. - **from_address** (string) - Sender address funding the deposit. - **merkletree_index** (string) - Merkle tree index of the deposit. - **publickey** (string) - BLS12-381 validator public key. - **removed** (boolean) - True if the associated log was removed. - **signature** (string) - BLS signature over the deposit message. - **tx_hash** (string) - Hash of the execution transaction. - **tx_index** (integer) - Index of the transaction within its block. - **tx_input** (string) - Raw calldata of the transaction. - **valid_signature** (boolean) - Indicates if the deposit signature is valid. - **withdrawal_credentials** (string) - Withdrawal credentials. #### Response Example ```json { "status": "OK", "data": [ { "amount": 32000000000, "block_number": 17111875, "block_ts": 1682287571, "from_address": "0xd3db01ad737f2b41676e96ad75a6368cfe7a878e", "merkletree_index": "0xd660090000000000", "publickey": "0x96dcc8a539e26dba7604356711abde2c2f1cd0f59a3405d11d1f029bd7e89062a09c5a7a47f9095f428fc1aff092871e", "removed": false, "signature": "0x8a186b85f9afd69c5d256c8364577a797b38e7d2f8f4ede4c570343c28427e8795fd4a940cdbacbaef8d1a22f1ecb1501824dcb791def49938b213827f5a65e58bf531174da556410e3d6480f8d129795eb8c0c3e31f8b6b7ce679d32cca1431", "tx_hash": "0x3b1ba13da5892cfeb80f1f1ccf09505214d5564a65b9d3fd413181348dfafdde", "tx_index": 199, "tx_input": "0x00", "valid_signature": true, "withdrawal_credentials": "0x0123456789abcdef0123456789abcdef0123456789" } ] } ``` ### Error Handling - **400 Bad Request**: Invalid validator argument or identifier format. - **500 Internal Server Error**: An unexpected server error occurred. ``` -------------------------------- ### Example API Request with API Key (Query String) Source: https://docs.beaconcha.in/api-reference/rewards/validator-performance-leaderboard Demonstrates how to include an API key as a query string parameter in a cURL request to the beaconcha.in API. Replace '' with your actual API key. ```bash curl https://beaconcha.in/api/v1/slot/1?apikey= ``` -------------------------------- ### GET /websites/beaconcha_in/validator_attestations_history Source: https://docs.beaconcha.in/api-reference/validators/validator-attestations-history Retrieves historical attestation data for one or more validators within a specified epoch window. Supports filtering by start and end epochs and offers a slim response option. ```APIDOC ## GET /websites/beaconcha_in/validator_attestations_history ### Description Retrieve attestations observed for one or more validators within a bounded epoch window. By default, the service returns data for the last 100 epochs ending at the latest processed epoch. You can narrow the range with `startEpoch` and `endEpoch`, which must lie within `[latest-99, latest]` and satisfy `startEpoch <= endEpoch`. Each item represents a scheduled attestation duty for a validator and includes the slot attested to, the inclusion slot when observed, a status flag, and convenience week boundaries for grouping in UI charts. When `slim=true`, the response omits the `week`, `week_start`, `week_end`, and `committeeindex` properties from each item to reduce payload size. ### Method GET ### Endpoint /websites/beaconcha_in/validator_attestations_history ### Parameters #### Query Parameters - **startEpoch** (integer) - Optional - The starting epoch for the data retrieval. Must be within `[latest-99, latest]`. - **endEpoch** (integer) - Optional - The ending epoch for the data retrieval. Must be within `[latest-99, latest]` and `startEpoch <= endEpoch`. - **slim** (boolean) - Optional - If true, omits `week`, `week_start`, `week_end`, and `committeeindex` from the response to reduce payload size. ### Request Example ```json { "query": { "startEpoch": 180000, "endEpoch": 180100, "slim": false } } ``` ### Response #### Success Response (200) - **slot** (integer) - The slot in which the attestation was scheduled. - **inclusion_slot** (integer) - The slot in which the attestation was observed to be included. - **status** (string) - The status of the attestation (e.g., "Attested", "NotAttested"). - **week** (integer) - The week number corresponding to the attestation slot. - **week_start** (integer) - The starting timestamp of the week. - **week_end** (integer) - The ending timestamp of the week. - **committeeindex** (integer) - The index of the committee the validator belonged to. #### Response Example ```json { "data": [ { "slot": 5938400, "inclusion_slot": 5938420, "status": "Attested", "week": 185575, "week_start": 1678886400, "week_end": 1678972799, "committeeindex": 10 }, { "slot": 5938432, "inclusion_slot": 5938450, "status": "Attested", "week": 185576, "week_start": 1678972800, "week_end": 1679059199, "committeeindex": 25 } ] } ``` ``` -------------------------------- ### Get Validator Queue - curl Example Source: https://docs.beaconcha.in/api-reference/validators/validator-activation-and-exit-queue This snippet demonstrates how to retrieve current queue metrics for validators awaiting activation and those scheduled to exit using a curl command. It requires no parameters but can optionally include an API key for authentication. ```bash curl https://beaconcha.in/api/v1/validators/queue ``` -------------------------------- ### Example API Request with API Key (Header) Source: https://docs.beaconcha.in/api-reference/rewards/validator-performance-leaderboard Demonstrates how to include an API key in the request header using cURL. This method is an alternative to using a query string parameter. ```bash curl -H 'apikey: ' https://beaconcha.in/api/v1/slot/1 ``` -------------------------------- ### Get APY & ROI for your dashboard Source: https://docs.beaconcha.in/api/dashboard Query for Annual Percentage Yield (APY) and Return on Investment (ROI) data for validators associated with your dashboard. Supports flexible validator selection. ```APIDOC ## POST /api/v2/ethereum/validators/apy-roi ### Description Retrieve APY and ROI data for validators on your dashboard or specific groups within it. ### Method POST ### Endpoint /api/v2/ethereum/validators/apy-roi ### Parameters #### Request Body - **chain** (string) - Required - The blockchain network (e.g., "mainnet"). - **validator** (object) - Required - Validator selection criteria. - **dashboard_id** (integer) - Optional - The ID of the dashboard to query. - **group_id** (integer) - Optional - The ID of the group within the dashboard to query. - **range** (object) - Required - The time range for the evaluation. - **evaluation_window** (string) - Required - The evaluation period (e.g., "30d"). ### Request Example ```json { "chain": "mainnet", "validator": { "dashboard_id": 123 }, "range": { "evaluation_window": "30d" } } ``` ### Response #### Success Response (200) - **data** (array of objects) - Contains APY and ROI data for each selected validator. - **validator_index** (integer) - The index of the validator. - **apy** (float) - The Annual Percentage Yield. - **roi** (float) - The Return on Investment. ``` -------------------------------- ### POST /api/v2/ethereum/validators - Pagination Example Source: https://docs.beaconcha.in/api/pagination Demonstrates how to paginate through the list of validators using cursor-based pagination. The first request fetches the initial page, and subsequent requests use the `next_cursor` from the previous response to retrieve further pages. ```APIDOC ## POST /api/v2/ethereum/validators ### Description Retrieves a paginated list of validators. Uses cursor-based pagination to fetch data in slices. ### Method POST ### Endpoint `/api/v2/ethereum/validators` ### Parameters #### Query Parameters - **page_size** (integer) - Optional - The number of items to return per page. Defaults to 10. Max limit varies by endpoint. - **cursor** (string) - Optional - The cursor string returned in `paging.next_cursor` from the previous response to load the next page. #### Request Body - **chain** (string) - Required - The blockchain chain, e.g., "mainnet". - **validator** (object) - Required - Object containing validator identifiers. - **validator_identifiers** (array of integers) - Required - A list of validator IDs. ### Request Example (First Page) ```bash curl --request POST \ --url http://beaconcha.in/api/v2/ethereum/validators \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "chain": "mainnet", "page_size": 10, "validator": { "validator_identifiers": [ 1 ] } }' ``` ### Response #### Success Response (200) - **data** (array) - A list of validator objects. - **paging** (object) - Pagination information. - **next_cursor** (string) - Present only when there is more data to fetch. Use this in the `cursor` parameter for the next request. #### Response Example (First Page Excerpt) ```json { "data": [ { /* validator item */ }, { /* validator item */ }, { /* validator item */ } ], "paging": { "next_cursor": "eyJfc2FtcGxlX2N1cnNvciI6MTIzNDU2Nzg5MH0" // truncated } } ``` ### Request Example (Next Page) ```bash curl --request POST \ --url http://beaconcha.in/api/v2/ethereum/validators \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{ "chain": "mainnet", "page_size": 10, "cursor": "eyJfc2FtcGxlX2N1cnNvciI6MTIzNDU2Nzg5MH0", "validator": { "validator_identifiers": [ 1 ] } }' ``` ### Response Example (Next Page Excerpt) ```json { "data": [ /* next 3 validators */ ], "paging": { "next_cursor": "eyJfc2FtcGxlX2N1cnNvciI6OTg3NjU0MzIxMH0" // if more data remains } } ``` ``` -------------------------------- ### Example API Request for Validator Rewards (Bash) Source: https://docs.beaconcha.in/api/overview This snippet demonstrates how to make a POST request to the beaconcha.in API's v2 Rewards endpoint using curl. It includes the necessary Authorization header with an API key and a JSON payload specifying the validator, chain, page size, and epoch. The response is a JSON object containing detailed reward and penalty information for the validator. ```bash curl -X POST 'https://beaconcha.in/api/v2/ethereum/validators/rewards-list' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "validator": { "validator_identifiers": [1] }, "chain": "mainnet", "page_size": 10, "epoch": 347566 }' ``` -------------------------------- ### Get Validator Attestations History (OpenAPI) Source: https://docs.beaconcha.in/api-reference/validators/validator-attestations-history Retrieves attestations for validators within a specified epoch range. Supports filtering by start and end epochs and a 'slim' option to reduce response size. Requires validator indices or public keys. ```yaml openapi: 3.0.4 info: title: beaconcha.in API Documentation license: name: GPL-3.0 url: https://www.gnu.org/licenses/gpl-3.0.en.html description: >- ## Introduction **Advanced and reliable API for accessing comprehensive Ethereum blockchain data.** - **Free Usage Policy:** The API is free to use under a fair use policy, with rate limits of 10 requests per minute per IP. - **Caching:** All responses are cached for 1 minute. - **Higher Usage Plans:** For higher usage plans, visit: [https://beaconcha.in/pricing](https://beaconcha.in/pricing). An API key is required to use these plans. ### API Key Usage API keys can be obtained at [/user/settings](https://beaconcha.in/user/settings) and must be included in requests either as a query string parameter or in the request header. #### Example: Query String Parameter ```bash curl https://beaconcha.in/api/v1/slot/1?apikey= ``` #### Example: Request Header ```bash curl -H 'apikey: ' https://beaconcha.in/api/v1/slot/1 ``` contact: {} version: '1.1' servers: - url: https://beaconcha.in description: Ethereum mainnet - url: https://hoodi.beaconcha.in description: Hoodi Ethereum testnet security: - ApiKeyAuthQuery: [] - ApiKeyAuthHeader: [] tags: - name: Epoch description: Data related to consensus layer epochs - name: Slots description: Data related to consensus layer slots - name: Validators description: Data related to consensus layer validators - name: Rewards description: Data related to validator rewards - name: Sync Committees description: Data related to sync committees - name: Rocketpool description: Data related to the rocketpool protocol - name: ETH.Store® description: Data related to the ETH.Store® metric - name: Validator deposits description: Data related to execution layer validator deposits - name: Blocks description: Data related to execution layer blocks - name: Gas description: Data related to gas prices - name: Address description: Data related to ethereum addresses - name: Network description: Network data - name: Misc description: Miscellaneous data - name: User description: User data paths: /api/v1/validator/{indexOrPubkey}/attestations: get: tags: - Validators summary: Validator attestations history description: >- Retrieve attestations observed for one or more validators within a bounded epoch window. By default, the service returns data for the last 100 epochs ending at the latest processed epoch. You can narrow the range with `startEpoch` and `endEpoch`, which must lie within `[latest-99, latest]` and satisfy `startEpoch <= endEpoch`. Each item represents a scheduled attestation duty for a validator and includes the slot attested to, the inclusion slot when observed, a status flag, and convenience week boundaries for grouping in UI charts. When `slim=true`, the response omits the `week`, `week_start`, `week_end`, and `committeeindex` properties from each item to reduce payload size. operationId: listValidatorAttestations parameters: - name: indexOrPubkey in: path description: >- Comma-separated validator indices and/or public keys (maximum 100 items by default). required: true style: simple explode: false schema: $ref: '#/components/schemas/primitives.indicesOrPubkeys' - name: startEpoch in: query description: >- Start epoch for the query window. Defaults to `latest - 99`. Must be within `[latest-99, latest]` and less than or equal to `endEpoch` when provided. required: false style: form explode: true schema: type: integer minimum: 0 example: 399260 - name: endEpoch in: query description: >- End epoch for the query window. Defaults to `latest`. Must be within `[startEpoch, latest]` when provided. required: false style: form explode: true schema: type: integer minimum: 0 example: 399359 - name: slim in: query description: >- When true, return a slimmed response that excludes `week`, `week_start`, `week_end`, and `committeeindex` fields from each item. required: false style: form explode: true schema: type: boolean default: false example: true responses: '200': ``` -------------------------------- ### GET /websites/beaconcha_in/validator_stats Source: https://docs.beaconcha.in/api-reference/validators/daily-validator-statistics Retrieves daily statistics for a specific validator. This includes balance snapshots, duty counts (attestations, block proposals, sync committee), and deposit/withdrawal activity aggregated per beaconchain-day. You can specify a start and end day for the data retrieval. ```APIDOC ## GET /websites/beaconcha_in/validator_stats ### Description Retrieve per-day statistics for a single validator by index. Use this endpoint to obtain balance snapshots (in gwei), duty counts (attestations, block proposals, sync committee), and deposit/withdrawal activity aggregated per beaconchain-day. When `start_day` is omitted, the API returns all days up to `end_day` (which defaults to the latest exported day). ### Method GET ### Endpoint `/websites/beaconcha_in/validator_stats` ### Parameters #### Query Parameters - **validator_index** (integer) - Required - The index of the validator. - **start_day** (integer) - Optional - The starting day for the statistics (inclusive). Defaults to the earliest available day if omitted. - **end_day** (integer) - Optional - The ending day for the statistics (inclusive). Defaults to the latest exported day if omitted. ### Request Example ```http GET /websites/beaconcha_in/validator_stats?validator_index=12345&start_day=100&end_day=150 ``` ### Response #### Success Response (200) - **data** (array) - An array of daily statistics objects. - **day** (integer) - The beaconchain day. - **balance_gwei** (string) - The validator's balance in Gwei at the end of the day. - **attestations_count** (integer) - Number of attestations performed on that day. - **block_proposals_count** (integer) - Number of block proposals performed on that day. - **sync_committee_attestations_count** (integer) - Number of sync committee attestations performed on that day. - **deposits_gwei** (string) - Total amount deposited in Gwei on that day. - **withdrawals_gwei** (string) - Total amount withdrawn in Gwei on that day. #### Response Example ```json { "data": [ { "day": 100, "balance_gwei": "32000000000", "attestations_count": 5, "block_proposals_count": 1, "sync_committee_attestations_count": 10, "deposits_gwei": "0", "withdrawals_gwei": "0" }, { "day": 101, "balance_gwei": "32000000000", "attestations_count": 6, "block_proposals_count": 0, "sync_committee_attestations_count": 9, "deposits_gwei": "0", "withdrawals_gwei": "0" } ] } ``` ``` -------------------------------- ### Accessing Documentation File Source: https://docs.beaconcha.in/api-reference/validators/validator-withdrawal-history This endpoint provides a direct link to download the `llms.txt` file, which may contain navigation and other documentation details. ```APIDOC ## Accessing Documentation File ### Description Fetch the `llms.txt` file to find navigation and other pages within the Beaconcha.in documentation. ### Method GET ### Endpoint /llms.txt ### Parameters None ### Request Example ``` GET https://docs.beaconcha.in/llms.txt ``` ### Response #### Success Response (200) - **content** (string) - The content of the `llms.txt` file. #### Response Example ``` { "content": "(content of llms.txt file)" } ``` ``` -------------------------------- ### GET /api/v1/execution/gasnow Source: https://docs.beaconcha.in/api-reference/gas/current-gas-price-recommendations Retrieve current execution-layer fee recommendations and ETH price snapshot. The response provides four fee tiers expressed as wei per gas, each corresponding to a target inclusion time: rapid (≈15 seconds), fast (≈1 minute), standard (≈3 minutes), and slow (>10 minutes). The payload also includes a Unix millisecond timestamp and an ETH/USD price snapshot. ```APIDOC ## GET /api/v1/execution/gasnow ### Description Retrieve current execution-layer fee recommendations and ETH price snapshot. The response provides four fee tiers expressed as wei per gas, each corresponding to a target inclusion time: rapid (≈15 seconds), fast (≈1 minute), standard (≈3 minutes), and slow (>10 minutes). The payload also includes a Unix millisecond timestamp and an ETH/USD price snapshot. ### Method GET ### Endpoint /api/v1/execution/gasnow ### Parameters #### Query Parameters - **apikey** (string) - Required - Your API key for authentication. ### Request Example ```bash curl -X GET "https://beaconcha.in/api/v1/execution/gasnow?apikey=" ``` ### Response #### Success Response (200) - **code** (integer) - Application-level status code. 200 indicates success. - **data** (object) - Container for gas price tiers and market data at the time of computation. - **rapid** (integer) - Recommended max fee per gas for rapid inclusion (≈15s), in wei per gas. - **fast** (integer) - Recommended max fee per gas for fast inclusion (≈1m), in wei per gas. - **standard** (integer) - Recommended max fee per gas for standard inclusion (≈3m), in wei per gas. - **slow** (integer) - Recommended max fee per gas for slow inclusion (>10m), in wei per gas. - **timestamp** (integer) - Unix timestamp in milliseconds representing when the data was computed. - **price** (number) - Current ETH/USD price snapshot. #### Response Example ```json { "code": 200, "data": { "rapid": 141086566, "fast": 131072000, "standard": 121077434, "slow": 101062862, "timestamp": 1678886410523, "price": 1600.50 } } ``` #### Error Response (400) - **status** (string) - Error message indicating gasnow data is not available. - **data** (null) #### Error Response Example (400) ```json { "status": "ERROR: gasnow data is currently not available", "data": null } ``` #### Error Response (500) - **status** (string) - Error message indicating an internal server error. - **data** (null) #### Error Response Example (500) ```json { "status": "ERROR: internal server error", "data": null } ``` ``` -------------------------------- ### Get Validator Execution Performance OpenAPI Spec Source: https://docs.beaconcha.in/api-reference/rewards/execution-layer-rewards This OpenAPI specification defines the endpoint for retrieving execution-layer rewards for validators. It details the path parameters, expected responses for success (200) and errors (400), including examples of invalid parameters and too many identifiers. ```yaml openapi: 3.0.4 info: title: beaconcha.in API Documentation license: name: GPL-3.0 url: https://www.gnu.org/licenses/gpl-3.0.en.html description: >- ## Introduction **Advanced and reliable API for accessing comprehensive Ethereum blockchain data.** - **Free Usage Policy:** The API is free to use under a fair use policy, with rate limits of 10 requests per minute per IP. - **Caching:** All responses are cached for 1 minute. - **Higher Usage Plans:** For higher usage plans, visit: [https://beaconcha.in/pricing](https://beaconcha.in/pricing). An API key is required to use these plans. ### API Key Usage API keys can be obtained at [/user/settings](https://beaconcha.in/user/settings) and must be included in requests either as a query string parameter or in the request header. #### Example: Query String Parameter ```bash curl https://beaconcha.in/api/v1/slot/1?apikey= ``` #### Example: Request Header ```bash curl -H 'apikey: ' https://beaconcha.in/api/v1/slot/1 ``` contact: {} version: '1.1' servers: - url: https://beaconcha.in description: Ethereum mainnet - url: https://hoodi.beaconcha.in description: Hoodi Ethereum testnet security: - ApiKeyAuthQuery: [] - ApiKeyAuthHeader: [] tags: - name: Epoch description: Data related to consensus layer epochs - name: Slots description: Data related to consensus layer slots - name: Validators description: Data related to consensus layer validators - name: Rewards description: Data related to validator rewards - name: Sync Committees description: Data related to sync committees - name: Rocketpool description: Data related to the rocketpool protocol - name: ETH.Store® description: Data related to the ETH.Store® metric - name: Validator deposits description: Data related to execution layer validator deposits - name: Blocks description: Data related to execution layer blocks - name: Gas description: Data related to gas prices - name: Address description: Data related to ethereum addresses - name: Network description: Network data - name: Misc description: Miscellaneous data - name: User description: User data paths: /api/v1/validator/{indexOrPubkey}/execution/performance: get: tags: - Rewards summary: Execution layer rewards description: >- Retrieve execution-layer rewards (priority fees and MEV payments) for one or more validators over multiple lookback windows. Provide validator identifiers as a comma-separated list in the path parameter. The service accepts validator indices and 0x-prefixed BLS pubkeys (up to the server-enforced limit; default 100). Values are reported in wei. operationId: getValidatorExecutionPerformance parameters: - name: indexOrPubkey in: path description: >- Comma-separated validator indices and/or public keys (maximum 100 items by default). required: true style: simple explode: false schema: $ref: '#/components/schemas/primitives.indicesOrPubkeys' responses: '200': description: >- Matching validators were retrieved successfully. The `data` array contains one item per validator with execution-layer reward totals for the last 1, 7, and 31 days, the last 365 days, and the cumulative sum since genesis when available. content: application/json: schema: allOf: - $ref: '#/components/schemas/types.ApiResponse' - type: object properties: data: type: array items: $ref: >- #/components/schemas/types.ApiValidatorExecutionPerformanceResponse '400': description: >- The request is invalid (for example, malformed identifier, too many identifiers, or unresolved pubkeys). content: application/json: schema: $ref: '#/components/schemas/types.ApiErrorResponse' examples: invalidParam: summary: Invalid validator identifier value: status: 'ERROR: invalid validator-parameter' data: null tooMany: summary: Too many identifiers value: status: 'ERROR: only a maximum of 100 query parameters are allowed' data: null unresolvedPubkeys: ``` -------------------------------- ### GET /api/gasPrice Source: https://docs.beaconcha.in/api-reference/gas/current-gas-price-recommendations Fetches current execution-layer fee recommendations and ETH price snapshot. The response includes fee tiers for different inclusion times and a timestamped ETH/USD price. ```APIDOC ## GET /api/gasPrice ### Description Retrieve current execution-layer fee recommendations and ETH price snapshot. The response provides four fee tiers expressed as wei per gas, each corresponding to a target inclusion time: rapid (≈15 seconds), fast (≈1 minute), standard (≈3 minutes), and slow (>10 minutes). The payload also includes a Unix millisecond timestamp and an ETH/USD price snapshot. ### Method GET ### Endpoint /api/gasPrice ### Parameters #### Query Parameters None ### Request Example None ### Response #### Success Response (200) - **fast** (object) - Fee recommendation for fast inclusion. - **maxFeePerGas** (string) - Maximum fee per gas in wei. - **maxPriorityFeePerGas** (string) - Maximum priority fee per gas in wei. - **fastest** (object) - Fee recommendation for fastest inclusion. - **maxFeePerGas** (string) - Maximum fee per gas in wei. - **maxPriorityFeePerGas** (string) - Maximum priority fee per gas in wei. - **save_high** (object) - Fee recommendation for high gas savings. - **maxFeePerGas** (string) - Maximum fee per gas in wei. - **maxPriorityFeePerGas** (string) - Maximum priority fee per gas in wei. - **standard** (object) - Fee recommendation for standard inclusion. - **maxFeePerGas** (string) - Maximum fee per gas in wei. - **maxPriorityFeePerGas** (string) - Maximum priority fee per gas in wei. - **timestamp** (string) - Unix millisecond timestamp of the price snapshot. - **eth_price** (string) - Current ETH price in USD. #### Response Example ```json { "fastest": { "maxFeePerGas": "45000000000", "maxPriorityFeePerGas": "20000000000" }, "fast": { "maxFeePerGas": "43000000000", "maxPriorityFeePerGas": "18000000000" }, "standard": { "maxFeePerGas": "33000000000", "maxPriorityFeePerGas": "8000000000" }, "save_high": { "maxFeePerGas": "30000000000", "maxPriorityFeePerGas": "5000000000" }, "timestamp": "1678886400000", "eth_price": "1600.50" } ``` ``` -------------------------------- ### Fetch Network Queue Statistics (Bash) Source: https://docs.beaconcha.in/use-cases/queue-tracking Retrieve network-wide queue lengths and processing rates for deposits, exits, and withdrawals. This requires an API key and specifies the chain (e.g., 'mainnet'). The response provides counts, balances, estimated processing times, and churn rates. ```bash curl --request POST \ --url https://beaconcha.in/api/v2/ethereum/queues \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data '{"chain": "mainnet"}' ``` -------------------------------- ### Get Validators by Index or Pubkey - OpenAPI Specification Source: https://docs.beaconcha.in/api-reference/validators/validators-overview Defines the GET endpoint for retrieving validator information. It accepts a comma-separated list of validator indices or public keys in the path. The response can be a single validator object or an array of validator objects, depending on the input. ```yaml paths: /api/v1/validator/{indexOrPubkey}: get: tags: - Validators summary: Validators overview description: >- Retrieve validator information by index or public key using a comma-separated list in the path parameter. Provide up to 100 identifiers (higher limits may apply to authenticated premium users). Each identifier must be either a validator index (base-10 integer) or a 48-byte BLS public key as 0x-prefixed hex (96 hex characters after 0x) or without the 0x prefix. Use the POST variant (`/api/v1/validator`) when the list is too long for a URL. operationId: getValidators parameters: - name: indexOrPubkey in: path description: >- Comma-separated validator indices and/or public keys (maximum 100 items by default). required: true style: simple explode: false schema: $ref: '#/components/schemas/primitives.indicesOrPubkeys' responses: '200': description: >- Matching validators were retrieved successfully. The `data` field contains either a single validator object (when one identifier is provided/resolved) or an array of validator objects (when multiple identifiers are provided/resolved). content: application/json: schema: allOf: - $ref: '#/components/schemas/types.ApiResponse' - type: object properties: data: oneOf: - title: Multiple validators type: array items: $ref: '#/components/schemas/types.APIValidatorResponse' - $ref: '#/components/schemas/types.APIValidatorResponse' title: Single validator '400': description: >- The request is invalid (for example, malformed identifier, too many identifiers, or unresolved pubkeys). content: application/json: schema: $ref: '#/components/schemas/types.ApiErrorResponse' examples: invalidParam: summary: Invalid validator identifier value: status: 'ERROR: invalid validator-parameter' data: null tooMany: ``` -------------------------------- ### GET /websites/beaconcha_in/staking-queues Source: https://docs.beaconcha.in/api-reference/ethereum/queues Fetches information about staking queues such as activation and exit queues, including estimated wait times. ```APIDOC ## GET /websites/beaconcha_in/staking-queues ### Description Returns information about the various staking related queues (e.g. activation, exit, etc) and how long the expected wait time is. ### Method GET ### Endpoint /websites/beaconcha_in/staking-queues ### Parameters #### Query Parameters #### Request Body ### Request Example ### Response #### Success Response (200) - **activation_queue_estimated_wait** (string) - Estimated wait time for the activation queue. - **exit_queue_estimated_wait** (string) - Estimated wait time for the exit queue. #### Response Example ```json { "activation_queue_estimated_wait": "X days", "exit_queue_estimated_wait": "Y days" } ``` ``` -------------------------------- ### GET /websites/beaconcha_in Source: https://docs.beaconcha.in/api-reference/validators/validators-by-withdrawal-credentials-or-address Retrieves validator information based on withdrawal credentials. ```APIDOC ## GET /websites/beaconcha_in ### Description This endpoint allows you to find validators by their withdrawal credentials. The response will contain an array of matching validators, with each entry including the validator's public key and index. ### Method GET ### Endpoint `/websites/beaconcha_in` ### Parameters #### Query Parameters - **withdrawal_credentials** (string) - Required - The withdrawal credentials (ETH1 address or derived value) to search for. ### Request Example ```json { "withdrawal_credentials": "0xdAC17F958D2ee523a2206206994597C13D831ec7" } ``` ### Response #### Success Response (200) - **status** (string) - OK - **data** (array) - An array of validator objects. Each object contains: - **publickey** (string) - The validator's public key. - **validatorindex** (integer) - The validator's index. #### Response Example ```json { "status": "OK", "data": [ { "publickey": "0x91cf1aeece0d14910c88f54edcfc988399db8ffa846f08d1c2febe05680614818b3b8c7d772c4e4ca983c74b453da03a", "validatorindex": 1151320 } ] } ``` #### Error Response (400) - **status** (string) - ERROR: invalid withdrawal credentials or eth1 address provided / ERROR: could not retrieve db results - **data** (string or null) - Additional context for the error. #### Error Response (500) - **status** (string) - ERROR: internal server error - **data** (string or null) - Additional context for the error. ``` -------------------------------- ### Fetch First Page of Validators using curl Source: https://docs.beaconcha.in/api/pagination This example demonstrates how to fetch the first page of validator data from the v2 API using `curl`. It sends a POST request with `page_size` and validator specific filters, omitting the `cursor` parameter. The response includes a `data` array and a `paging.next_cursor` if more data is available. ```bash curl --request POST \ --url http://beaconcha.in/api/v2/ethereum/validators \ --header 'Authorization: Bearer ' \ --header 'Content-Type: application/json' \ --data \ '{ "chain": "mainnet", "page_size": 10, "validator": { "validator_identifiers": [ 1 ] } }' ```