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 identifier | mainnet | ⚪ |
X-IDENTITY | Caller-defined identity stored in the audit log | user-1234 | ⚪ |
X-NETWORK header
Use the X-NETWORK header to select the Sui network.
If you omit the header the API falls back to the default Sui 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 obtain the list of Sui staking networks currently enabled for your API key.
- Endpoint:
/api/v1/sui/native/networks - Method:
GET
Response payload fields:
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | Internal blockchain entry name |
type | string | ✅ | Blockchain type string (always SUI) |
chain_id | string | ✅ | Chain identifier |
is_default | boolean | ✅ | true when this network is used as fallback |
Example
curl "https://staking-api.stakely.io/api/v1/sui/native/networks" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet"
Response:
[
{
"name": "sui",
"type": "SUI",
"chain_id": "mainnet",
"is_default": true
}
]
Staking information
Get the staking parameters of this protocol:
- Endpoint:
/api/v1/sui/native/staking-info
Description
Staking parameters for Sui 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/sui/native/staking-info" \
-H "X-API-KEY: $STAKELY_API_KEY"
Response:
{
"stake_activation_max_time": 1440,
"stake_deactivation_max_time": 0,
"withdrawal_max_time": 0,
"staking_reward_fee": 7,
"withdrawal_fee": 0,
"staking_apr": null,
"staking_apy": 1.44,
"max_slashing_percentage": 0,
"min_stake_amount": "1",
"max_stake_amount": null,
"users": 948,
"tvl_usd": 21793372.33,
"tvl_token": 31534325.46
}
Stake action
Craft an unsigned stake transaction:
- Endpoint:
/api/v1/sui/native/action/stake - Method:
POST
Description
This endpoint crafts an unsigned stake transaction ready to be signed.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
wallet_address | string | ✅ | Wallet address of the user that will perform the staking action |
amount | number | ✅ | Amount of SUI to stake. Minimum 1 SUI. Up to 9 decimal places (MIST precision). |
wallet_address(required): Wallet address of the user that will perform the staking action.amount(required): Amount of SUI to stake (minimum 1 SUI, up to 9 decimals).
Returned
| Field | Type | Required | Description |
|---|---|---|---|
unsigned_tx_b64 | string | ✅ | Unsigned transaction bytes encoded as base64 |
unsigned_tx_b64: Unsigned transaction bytes encoded as base64.
Example
curl -X POST "https://staking-api.stakely.io/api/v1/sui/native/action/stake" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e",
"amount": 1
}'
Response:
{
"unsigned_tx_b64": "AAADAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...ZQADAQAAAQEA"
}
Unstake action
Craft an unsigned unstake transaction:
- Endpoint:
/api/v1/sui/native/action/unstake - Method:
POST
Description
This endpoint crafts an unsigned unstake transaction ready to be signed.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
wallet_address | string | ✅ | Wallet address of the user that will perform the unstaking action |
staked_sui_object_id | string | ✅ | Object ID of the StakedSui object to withdraw |
wallet_address(required): Wallet address of the user that will perform the unstaking action.staked_sui_object_id(required): Object ID of theStakedSuiobject to withdraw.
Returned
| Field | Type | Required | Description |
|---|---|---|---|
unsigned_tx_b64 | string | ✅ | Unsigned transaction bytes encoded as base64 |
unsigned_tx_b64: Unsigned transaction bytes encoded as base64.
Example
curl -X POST "https://staking-api.stakely.io/api/v1/sui/native/action/unstake" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet" \
-H "Content-Type: application/json" \
-d '{
"wallet_address": "0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e",
"staked_sui_object_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b1c2d3e4f5a6b7c8d9e0f1a2b"
}'
Response:
{
"unsigned_tx_b64": "AAADAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...ZQADAQAAAQEA"
}
Prepare action
Gathers signatures and unsigned transaction:
- Endpoint:
/api/v1/sui/native/action/prepare - Method:
POST
Description
Prepare a signed transaction by combining the unsigned transaction bytes and signatures into a single payload.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
unsigned_tx_b64 | string | ✅ | Unsigned transaction bytes encoded as base64 |
signatures | string[] | ✅ | Array of base64-encoded signatures for the unsigned transaction |
unsigned_tx_b64: Unsigned transaction bytes in base64.signatures: Array of base64-encoded signatures.
Returned
| Field | Type | Required | Description |
|---|---|---|---|
signed_tx_b64 | string | ✅ | Combined transaction bytes and signatures, encoded as base64(JSON.stringify({ bytes, signatures })) |
Example
curl -X POST "https://staking-api.stakely.io/api/v1/sui/native/action/prepare" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet" \
-H "Content-Type: application/json" \
-d '{
"unsigned_tx_b64": "AAADAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...ZQADAQAAAQEA",
"signatures": [
"AHJzPZ8T...base64signature"
]
}'
Response:
{
"signed_tx_b64": "eyJieXRlcyI6IkFBQURB...base64encodedjson"
}
Broadcast action
Broadcast a signed transaction:
- Endpoint:
/api/v1/sui/native/action/broadcast - Method:
POST
Description
Broadcast a signed Sui transaction.
Request body parameters
| Field | Type | Required | Description |
|---|---|---|---|
unsigned_tx_b64 | string | ⚪ | Unsigned transaction bytes encoded as base64 |
signatures | string[] | ⚪ | Array of base64-encoded signatures for the transaction |
signed_tx_b64 | string | ⚪ | Combined transaction bytes and signatures, encoded as base64(JSON.stringify({ bytes, signatures })) |
unsigned_tx_b64(required): Unsigned transaction bytes encoded as base64.signatures(required): Array of base64-encoded signatures for the transaction.
Returned
| Field | Type | Required | Description |
|---|---|---|---|
tx_hash | string | ✅ | Transaction hash (Sui transaction digest) of the broadcasted transaction |
tx_hash: Transaction hash of the broadcasted transaction.
Example
curl -X POST "https://staking-api.stakely.io/api/v1/sui/native/action/broadcast" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet" \
-H "Content-Type: application/json" \
-d '{
"unsigned_tx_b64": "AAADAQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA...ZQADAQAAAQEA",
"signatures": [
"AHJzPZ8T...base64signature"
],
"signed_tx_b64": "eyJieXRlcyI6IkFBQURB...base64encodedjson"
}'
Response:
{
"tx_hash": "8gYvWKd5V3hT2qZnL4xR9mA7cE1fJ6uB0pN3sO5tY2wX"
}
Unified staking balance
Get the staking balance for the given address in the unified cross-protocol shape:
- Endpoint:
/api/v1/sui/native/staking-balance/{address}
Description
Staking balance for an address in the unified cross-protocol shape, in SUI. Stakes are split into active and activating against the current epoch, and rewards are derived from the validator pool exchange rates (null if they cannot be derived for every position). Unstaking returns the funds in the same transaction, so there is no deactivation or withdrawing bucket. Every StakedSui and FungibleStakedSui object is listed as a staking object, with its validator and per-object rewards; its id is the staked_sui_object_id the unstake endpoint takes.
Amounts are in SUI. The field names are the same on every protocol Stakely supports, so a single integration can read a position on any of them; a bucket that does not apply here is null.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Sui wallet address |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
staked_amount | number | ✅ | Stake that is currently active and earning rewards, in native token units. |
stake_activation_amount | number | ✅ | Stake that has been delegated but is still warming up, in native token units. null when the protocol activates stake immediately. |
stake_deactivation_amount | number | ✅ | Stake that is unbonding and has not completed its deactivation period yet, in native token units. null when the protocol has no unbonding period. |
stake_withdrawing_amount | number | ✅ | Stake that finished deactivating and is waiting for a withdrawal transaction, in native token units. null when the protocol releases the funds automatically. |
stake_rewards_amount | number | ✅ | Rewards that can be claimed, in native token units. null when the protocol compounds rewards into staked_amount instead of accruing them separately. |
staking_objects | StakingObjectDto[] | ✅ | Individually addressable units that make up the position, normalised across protocols. The amounts above are the aggregate; these are the handles needed to act on the position, because protocols such as Solana and Sui require an object id to craft an unstake or withdraw transaction. null means the protocol exposes no addressable objects at all and every action is amount-based; an empty array means it does expose them and the address currently holds none. An object is only listed when the protocol publishes a real identifier for it, so the listed objects do not necessarily add up to the totals above. |
Each item in staking_objects is a StakingObjectDto:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | ✅ | Identifier of this object on its protocol, passed back to the action endpoints of that protocol (see below). |
type | StakingObjectType | ✅ | Whether the object holds stake (delegation) or represents an exit already requested (withdrawal_request). |
status | StakingObjectStatus | ✅ | Lifecycle phase of the object. Objects sharing a status add up to the matching amount bucket of the response. |
amount | number | ✅ | Principal held by this object, in native token units. null when it could not be read. |
rewards_amount | number | ✅ | Rewards accrued by this object on top of its principal, in native token units. null when the protocol reports rewards only at address level, compounds them into the principal, or when they could not be derived. |
validator_address | string | ✅ | Validator this object is delegated to, in the protocol native format (a vote account on Solana, a validator address on Sui). null when the protocol does not attribute the object to a single validator. |
activation_epoch | number | ✅ | Epoch at which this object starts earning rewards. null on protocols that do not track activation per object. |
withdrawable_epoch | number | ✅ | Epoch from which this object can be withdrawn. null on protocols whose withdrawal is time-based or that release funds automatically. |
withdrawable_at | string | ✅ | ISO-8601 instant from which this object can be withdrawn. null on protocols whose withdrawal is epoch-based or that release funds automatically. |
On Sui the id is the StakedSui (or FungibleStakedSui) object id that the unstake action takes as staked_sui_object_id.
type values:
| Value | Description |
|---|---|
delegation | The object holds stake. |
withdrawal_request | The object represents an exit that has already been requested. |
status values:
| Value | Description |
|---|---|
activating | Warming up, not earning rewards yet. Adds up to stake_activation_amount. |
active | Live and earning rewards. Adds up to staked_amount. |
deactivating | Unbonding, deactivation period not finished. Adds up to stake_deactivation_amount. |
withdrawable | Deactivated and waiting for a withdrawal transaction. Adds up to stake_withdrawing_amount. |
unknown | The lifecycle phase could not be derived from the protocol data. |
Example
curl "https://staking-api.stakely.io/api/v1/sui/native/staking-balance/0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet"
Response:
{
"staked_amount": 1,
"stake_activation_amount": 0,
"stake_deactivation_amount": null,
"stake_withdrawing_amount": null,
"stake_rewards_amount": 0.000200681,
"staking_objects": [
{
"id": "0x41e25e4c6dffffa51011f9239cae44b90eec3c427a03c20f26e8d454f151ef68",
"type": "delegation",
"status": "active",
"amount": 1,
"rewards_amount": 0.000200681,
"validator_address": "0x07fffa5cb91c8522b6a5d57b8fda97deb803238b23dc3b0a3b3b723546483098",
"activation_epoch": 1100,
"withdrawable_epoch": null,
"withdrawable_at": null
}
]
}