Skip to main content

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

tip

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.

tip

Heads up! To obtain a valid API key required for authentication, please refer to the Authentication > Create API keys section of the documentation.

Header:

NameDescriptionExample valueRequired
X-API-KEYYour api key value<API_KEY_VALUE>
X-NETWORKBlockchain network identifiermainnet

X-NETWORK header

Use the X-NETWORK header to select the Sui network.

info

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:

FieldTypeRequiredDescription
namestringInternal blockchain entry name
typestringBlockchain type string (always SUI)
chain_idstringChain identifier
is_defaultbooleantrue 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

FieldTypeRequiredDescription
wallet_addressstringWallet address of the user that will perform the staking action
amountnumberAmount 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

FieldTypeRequiredDescription
unsigned_tx_b64stringUnsigned 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

FieldTypeRequiredDescription
wallet_addressstringWallet address of the user that will perform the unstaking action
staked_sui_object_idstringObject 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 the StakedSui object to withdraw.

Returned

FieldTypeRequiredDescription
unsigned_tx_b64stringUnsigned 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

FieldTypeRequiredDescription
unsigned_tx_b64stringUnsigned transaction bytes encoded as base64
signaturesstring[]Array of base64-encoded signatures for the unsigned transaction
  • unsigned_tx_b64: Unsigned transaction bytes in base64.
  • signatures: Array of base64-encoded signatures.

Returned

FieldTypeRequiredDescription
signed_tx_b64stringCombined 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

FieldTypeRequiredDescription
unsigned_tx_b64stringUnsigned transaction bytes encoded as base64
signaturesstring[]Array of base64-encoded signatures for the transaction
signed_tx_b64stringCombined 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

FieldTypeRequiredDescription
tx_hashstringTransaction 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

ParameterInTypeRequiredDescription
addresspathstringSui wallet address

Returned

FieldTypeRequiredDescription
wallet_addressstringWallet address that was queried
total_miststringTotal staked balance in MIST (1 SUI = 1,000,000,000 MIST)
total_suinumberTotal staked balance in SUI
staked_objectsStakedSuiObjectDto[]Array of StakedSui objects owned by the wallet
fungible_objectsFungibleStakedSuiDto[]Array of FungibleStakedSui objects owned by the wallet

Each staked_objects item:

FieldTypeRequiredDescription
object_idstringObject ID of the StakedSui object
versionstringObject version
pool_idstringStaking pool ID (validator pool)
stake_activation_epochstringEpoch at which the stake was activated
principal_miststringStaked principal amount in MIST

Each fungible_objects item:

FieldTypeRequiredDescription
object_idstringObject ID of the FungibleStakedSui object
versionstringObject version
pool_idstringStaking pool ID (validator pool)
valuestringStaked 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"
}
]
}