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-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.
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
}
]
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 |
Example
curl -X POST "https://staking-api.stakely.io/api/v1/ethereum/stakewise/action/unstake" \
-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"
}
}
Withdraw action
Craft a withdraw transaction
- Endpoint:
/api/v1/ethereum/stakewise/action/withdraw
Description
Once the assets in queue are ready to be claimable you can claim them. This action will craft a withdraw transaction of the withdrawable assets.
| Field | Type | Required | Description |
|---|---|---|---|
address | string | ✅ | Eth address that will perform the staking action |
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/withdraw" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1" \
-H "Content-Type: application/json" \
-d '{
"address": "0x0e79065B5F11b5BD1e62B935A600976ffF3754B9"
}'
Response:
{
"address": "0x0e79065B5F11b5BD1e62B935A600976ffF3754B9",
"amount": 0.1
}
Prepare action
Gathers signature and unsigned tx:
- Endpoint:
/api/v1/ethereum/stakewise/action/prepare
Description
Prepare a signed transaction by gathering the provided signatures with the unsigned transaction hex string:
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
serialized_tx_hex | string | ✅ | Unsigned serialized transaction hex string ready to be signed |
r | string | ✅ | r part of the ECDSA signature in hex |
s | string | ✅ | s part of the ECDSA signature in hex |
v | number | ✅ | v part of the ECDSA signature |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
signed_tx_hex | string | ✅ | Signed transaction hex string ready to be broadcasted |
Example
curl -X POST "https://staking-api.stakely.io/api/v1/ethereum/stakewise/action/prepare" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1" \
-H "Content-Type: application/json" \
-d '{
"serialized_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"r": "6da2b6fe309b629720bc3d1d3a8befb3f461e3b53ccee85c55d10b11d3a3d263",
"s": "085fe4bb8ff0c04e4e41a2ba44609f894b9a70f4330de726d1403ee21b65e685",
"v": 34035
}'
Response:
{
"signed_tx_hex": "0xf9014b1f8455bd900c83030d4094169856275d...ad908c2b5b15"
}
Broadcast action
Broadcast a signed transaction
- Endpoint:
/api/v1/ethereum/stakewise/action/broadcast
Description
Broadcast a signed transaction. Usually you will brodcast the signed transaction returned in prepare previous step:
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
signed_tx_hex | string | ✅ | Signed transaction hex string ready to be broadcasted |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
tx_hash | string | ✅ | Transaction hash of the broadcasted transaction |
Example
curl -X POST "https://staking-api.stakely.io/api/v1/ethereum/stakewise/action/broadcast" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1" \
-H "Content-Type: application/json" \
-d '{
"signed_tx_hex": "0xf9014b1f8455bd900c83030d4094169856275d...ad908c2b5b15"
}'
Response:
{
"tx_hash": "0x23273dacef9d64fdb2c790e9f9f4c13574125078a272059dac2473bc8bfba163"
}
Action history
Get the StakeWise action history for the given address
- Endpoint:
/api/v1/ethereum/stakewise/historic/{address}
Description
Get the StakeWise action history for the given address. It returns all past actions of the different action kinds.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Address to retrieve action history for |
Returned
Array of StakewiseGetActionResponseDto items:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Event identifier |
assets | string | ✅ | Transaction amount assets in eth units |
shares | string | ✅ | Transaction amount shares in eth units |
actionType | string | ✅ | Stakewise vault action type |
link | string | ✅ | Transaction explorer link |
createdAt | number | ✅ | Transaction date in unix timestamp format (ms) |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/historic/0xb794f5ea0ba39494ce839613fffba74279579268" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
[
{
"id": "0xe08ff6b0c57162c32feebde105af11c7ad14f8aa068140271d393128eee5076e-53",
"assets": "0.01",
"shares": "0.009990742171519222",
"actionType": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"link": "https://holesky.etherscan.io/tx/0xe08ff6...3128eee5076e",
"createdAt": 1713279456000
}
]
Stake balance
Get stakewise stake balance for the given address
- Endpoint:
/api/v1/ethereum/stakewise/stake-balance/{address}
Description
Get stakewise stake balance for the given address.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Address to query stake balance for |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
shares | number | ✅ | Balance in vault tokens in ETH |
assets | number | ✅ | Balance in ETH |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/stake-balance/0xb794f5ea0ba39494ce839613fffba74279579268" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
{
"shares": 0.445154555310375,
"assets": 0.4465649642705789
}
Exited balance
Get stakewise exited balance for the given address
- Endpoint:
/api/v1/ethereum/stakewise/exited-balance/{address}
Description
Get stakewise exited balance for the given address.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Address to query exited balance for |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
total | number | ✅ | Total withdrawal amount (in ETH) by address in the vault |
withdrawable | number | ✅ | Amount available for withdrawal (in ETH) by address in the vault |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/exited-balance/0xb794f5ea0ba39494ce839613fffba74279579268" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
{
"total": 0.5,
"withdrawable": 0.1
}
Vault info
Get stakewise vault info such as APY and balance for the current time
- Endpoint:
/api/v1/ethereum/stakewise/vault
Description
Get vault details, as current APY
Returned
| Field | Type | Required | Description |
|---|---|---|---|
vaultAddress | string | ✅ | Vault address |
apy | number | ✅ | Current APY of the vault |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/vault" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
{
"vaultAddress": "0x1234567890123456789012345678901234567890",
"apy": 5.6
}
User Stats
Get user stats for the StakeWise vault over the last N days
- Endpoint:
/api/v1/ethereum/stakewise/stats/{address}
Description
Get historical user stats for the StakeWise vault over the last N days. Use the days query parameter to set the window.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Address to query stats for |
days | query | number | ⚪ | Number of days to retrieve stats for, if not provided 7 days will be used as default |
Returned
Array of StakewiseGetUserStatsResponseDto items:
| Field | Type | Required | Description |
|---|---|---|---|
time | number | ✅ | Date and time for each data point |
balance | number | ✅ | Total assets by the user in current vault at the moment of time |
apy | number | ✅ | Current APY based on time, rewards and balance |
rewards | number | ✅ | Number of assets earned by the user in current vault during the interval |
Example
curl "https://staking-api.stakely.io/api/v1/ethereum/stakewise/stats/0xb794f5ea0ba39494ce839613fffba74279579268" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: 1"
Response:
[
{
"time": 1713279456000,
"balance": 10.5,
"apy": 5.6,
"rewards": 0.01
}
]