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-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.
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
}
]
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"
}
Stake balance
Get staked balance for the given address:
- Endpoint:
/api/v1/sui/native/stake-balance/{address} - Method:
GET
Description
Get staked balance information for the given Sui wallet address.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
address | path | string | ✅ | Sui wallet address |
Returned
| Field | Type | Required | Description |
|---|---|---|---|
wallet_address | string | ✅ | Wallet address that was queried |
total_mist | string | ✅ | Total staked balance in MIST (1 SUI = 1,000,000,000 MIST) |
total_sui | number | ✅ | Total staked balance in SUI |
staked_objects | StakedSuiObjectDto[] | ✅ | Array of StakedSui objects owned by the wallet |
fungible_objects | FungibleStakedSuiDto[] | ✅ | Array of FungibleStakedSui objects owned by the wallet |
Each staked_objects item:
| Field | Type | Required | Description |
|---|---|---|---|
object_id | string | ✅ | Object ID of the StakedSui object |
version | string | ✅ | Object version |
pool_id | string | ✅ | Staking pool ID (validator pool) |
stake_activation_epoch | string | ✅ | Epoch at which the stake was activated |
principal_mist | string | ✅ | Staked principal amount in MIST |
Each fungible_objects item:
| Field | Type | Required | Description |
|---|---|---|---|
object_id | string | ✅ | Object ID of the FungibleStakedSui object |
version | string | ✅ | Object version |
pool_id | string | ✅ | Staking pool ID (validator pool) |
value | string | ✅ | Staked value in MIST |
Example
curl "https://staking-api.stakely.io/api/v1/sui/native/stake-balance/0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: mainnet"
Response:
{
"wallet_address": "0x7d20dcdb2bca4f508ea9613994683eb4e76e9c4ed371169677c1be02aaf0b58e",
"total_mist": "2000000000",
"total_sui": 2,
"staked_objects": [
{
"object_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"version": "12345",
"pool_id": "0xabcdef...",
"stake_activation_epoch": "100",
"principal_mist": "1000000000"
}
],
"fungible_objects": [
{
"object_id": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"version": "12345",
"pool_id": "0xabcdef...",
"value": "1000000000"
}
]
}