Endpoints
API Usage
Once you have access to the Staking API with a validated user and existing API keys, you can start using this service.
Try it live
Every endpoint on this page can be executed from the interactive Swagger console, using your own X-API-KEY.
The machine-readable OpenAPI schema is available at:
Authentication
In order to use the Staking API endpoints you need to include your API KEY.
Heads up! To obtain a valid API key required for authentication, please refer to the Authentication > Create API keys section of the documentation.
Header:
| Name | Description | Example value | Required |
|---|---|---|---|
X-API-KEY | Your api key value | <API_KEY_VALUE> | ✅ |
X-NETWORK | Blockchain network/chain identifier | 1 | ⚪ |
X-IDENTITY | Caller-defined identity stored in the audit log | user-1234 | ⚪ |
X-NETWORK header
Set the X-NETWORK header to the StakeWise chain you want to target.
Supported values: 1 (Ethereum Mainnet) and 560048 (Ethereum Hoodi).
When omitted the API falls back to the default StakeWise network configured for your account.
X-IDENTITY header
Use the X-IDENTITY header to attribute a request to the end user or account acting through your integration. The value is caller-defined and is stored with the request in the audit log, so activity can be traced back to it later.
The header is optional and does not change the response. Prefer an opaque internal identifier such as a user ID or account reference over personal data like emails or names. If you omit it, the request is attributed only to your API key.
List available networks
Use this helper endpoint to discover which StakeWise networks are currently enabled for your API key.
- Endpoint:
/api/v1/ethereum/stakewise/networks
Response payload fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Internal blockchain entry name |
type | string | ✅ | Blockchain type string (always ETHEREUM) |
chain_id | string | ✅ | Chain identifier such as 1 or 560048 |
is_default | boolean | ✅ | true when the network is used as fallback |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/networks" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
[
{
"name": "ethereum",
"type": "ETHEREUM",
"chain_id": "1",
"is_default": true
}
]
Staking information
Get the staking parameters of this protocol:
- Endpoint:
/api/v1/ethereum/stakewise/staking-info
Description
Staking parameters for the StakeWise vault on Ethereum mainnet: activation, deactivation and withdrawal times in minutes, fees, current APR/APY, slashing risk and stake limits. Served from an in-memory snapshot refreshed hourly.
Returned
| Field | Type | Required | Description |
|---|---|---|---|
stake_activation_max_time | number | ✅ | Maximum time, in minutes, for a new stake to become active and start accruing rewards. 0 means it is effective immediately. |
stake_deactivation_max_time | number | ✅ | Maximum time, in minutes, for an unstake request to complete the unbonding/exit period. 0 means the stake is released immediately. |
withdrawal_max_time | number | ✅ | Maximum time, in minutes, between a completed deactivation and the funds being spendable again. 0 means the funds are available as soon as the deactivation completes. |
staking_reward_fee | number | ✅ | Aggregate fee charged on staking rewards, as a percentage of the rewards generated (validator commission plus any protocol fee). |
withdrawal_fee | number | ✅ | Fee charged when withdrawing the stake, as a percentage of the withdrawn amount. Network transaction (gas) costs are not included. |
staking_apr | number | ✅ | Current annual percentage rate (rewards without compounding), as a percentage. |
staking_apy | number | ✅ | Current annual percentage yield (rewards with compounding), as a percentage. |
max_slashing_percentage | number | ✅ | Maximum percentage of the staked amount that the protocol can slash. 0 means the protocol implements no slashing. |
min_stake_amount | string | ✅ | Minimum amount that can be staked, as a decimal string in the native token of the chain. |
max_stake_amount | string | ✅ | Maximum amount that can be staked, as a decimal string in the native token of the chain. null means the protocol enforces no upper limit. |
users | number | ✅ | Number of addresses currently staking with Stakely on this chain. Live figure, refreshed hourly. null on protocol-scoped endpoints (liquid staking, vaults), because the feed only publishes this per chain and the chain-wide figure is not that protocol's. |
tvl_usd | number | ✅ | Total value staked with Stakely on this chain, in USD. Live figure, refreshed hourly. null on protocol-scoped endpoints, for the same reason as users. |
tvl_token | number | ✅ | Total value staked with Stakely on this chain, in the native token of the chain. Live figure, refreshed hourly. null on protocol-scoped endpoints, for the same reason as users. |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/staking-info" \
-H "X-API-KEY: $STAKELY_API_KEY"
Response:
{
"stake_activation_max_time": 0,
"stake_deactivation_max_time": 43200,
"withdrawal_max_time": null,
"staking_reward_fee": 5,
"withdrawal_fee": 0,
"staking_apr": 2.18,
"staking_apy": 2.22,
"max_slashing_percentage": 100,
"min_stake_amount": "0",
"max_stake_amount": null,
"users": null,
"tvl_usd": null,
"tvl_token": null
}
Stake into stakewise vault
Craft a stake transaction:
- Endpoint:
/api/v1/ethereum/stakewise/action/stake
Description
This endpoint will craft a stake transaction ready to be signed.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
address | string | ✅ | Eth address that will perform the staking action |
amount | number | ✅ | Amount of stake to perform in eth units |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
serialized_tx_hex | string | ✅ | Serialized transaction hex string ready to be signed |
unsigned_tx_hash_hex | string | ✅ | Unasigned tx hash hex string, ready to be signed by external integrations |
payload | object | ✅ | Payload object |
Example
curl -X POST "https://staking-api.stakely.io/api/v1/ethereum/stakewise/action/stake" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1" \
-H "Content-Type: application/json" \
-d '{
"address": "0x0e79065B5F11b5BD1e62B935A600976ffF3754B9",
"amount": 0.1
}'
Response:
{
"serialized_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"unsigned_tx_hash_hex": "1a6edb7358323bafca52b1755f3ad985754dc23887110b65429373ed83321500",
"payload": {
"type": "0x0",
"nonce": "0x5fe08",
"gasLimit": "0x30d40",
"to": "0x169856275ddca01b2fcdc63c4f1b0adf72a4cf10",
"value": "0x16345785d8a0000",
"data": "0x18f729500000000000000000000000000e7906...1d1c666802bd",
"gasPrice": "0x2887734d"
}
}
Unstake action
Craft a unstake transaction
- Endpoint:
/api/v1/ethereum/stakewise/action/unstake
Description
This endpoint will build an "enter exit queue" unstake transaction ready to be signed. The exited assets needs to mature for a given period before there are claimable
Request param
| Field | Type | Required | Description |
|---|---|---|---|
address | string | ✅ | Eth address that will perform the staking action |
amount | number | ✅ | Amount of stake to perform in eth units |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
serialized_tx_hex | string | ✅ | Serialized transaction hex string ready to be signed |
unsigned_tx_hash_hex | string | ✅ | Unasigned tx hash hex string, ready to be signed by external integrations |
payload | object | ✅ | Payload object |