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/chain identifiercelestia

X-NETWORK header

Use the X-NETWORK header to tell the API which Celestia network should process the request (e.g., celestia for mainnet, mocha-4 for the Mocha testnet).

info

X-NETWORK accepts the same identifier exposed as chain_id in the Cosmos Chain Registry. When the header is omitted the default Celestia network configured for your account will be used.

tip

Need support for another network? Reach out at [email protected].

List available networks

If you are unsure which Celestia networks are enabled for your account you can ask the API directly.

  • Endpoint: /api/v1/celestia/native/networks

Each object in the response includes:

FieldTypeRequiredDescription
namestringInternal name of the blockchain entry
typestringBlockchain type string (always COSMOS)
chain_idstringChain identifier, same as the Cosmos Chain Registry chain_id
is_defaultbooleantrue when this network is used as fallback

Example

curl "https://staking-api.stakely.io/api/v1/celestia/native/networks" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia"

Response:

[
{
"name": "celestia",
"type": "COSMOS",
"chain_id": "celestia",
"is_default": true
}
]

Stake action

Craft a stake transaction:

  • Endpoint: /api/v1/celestia/native/action/stake

Description

This endpoint will craft a stake transaction ready to be signed.

Request body parameters

FieldTypeRequiredDescription
pubkeystringpubkey string compressed or uncompressed of the address that will perform the staking action
amountnumberAmount of stake to perform in TIA

Returned

FieldTypeRequiredDescription
unsigned_tx_hexstringUnsigned craft transaction hex string
tx_auth_info_hexstringTransaction auth info hex string
unsigned_tx_hash_hexstringUnasigned tx hash hex string, ready to be signed by external integrations

Example

curl -X POST "https://staking-api.stakely.io/api/v1/celestia/native/action/stake" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia" \
-H "Content-Type: application/json" \
-d '{
"pubkey": "025a2146590b80d1f0d97cc7104e702011afff21bfaf817f5c7002446369ba9ddc",
"amount": 0.1
}'

Response:

{
"unsigned_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"tx_auth_info_hex": "0a4c0a440a1f2f636f736d6f732e63727970746f...303010c0cf24",
"unsigned_tx_hash_hex": "1a6edb7358323bafca52b1755f3ad985754dc23887110b65429373ed83321500"
}

Unstake action

Craft an unstake transaction:

  • Endpoint: /api/v1/celestia/native/action/unstake

Description

This endpoint will craft an unstake transaction ready to be signed.

Request body parameters

FieldTypeRequiredDescription
pubkeystringpubkey string compressed or uncompressed of the address that will perform the staking action
amountnumberAmount of unstake to perform in TIA

Returned

FieldTypeRequiredDescription
unsigned_tx_hexstringUnsigned craft transaction hex string
tx_auth_info_hexstringTransaction auth info hex string
unsigned_tx_hash_hexstringUnasigned tx hash hex string, ready to be signed by external integrations

Example

curl -X POST "https://staking-api.stakely.io/api/v1/celestia/native/action/unstake" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia" \
-H "Content-Type: application/json" \
-d '{
"pubkey": "025a2146590b80d1f0d97cc7104e702011afff21bfaf817f5c7002446369ba9ddc",
"amount": 0.1
}'

Response:

{
"unsigned_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"tx_auth_info_hex": "0a4c0a440a1f2f636f736d6f732e63727970746f...303010c0cf24",
"unsigned_tx_hash_hex": "1a6edb7358323bafca52b1755f3ad985754dc23887110b65429373ed83321500"
}

Claim rewards action

Craft a claim rewards transaction:

  • Endpoint: /api/v1/celestia/native/action/claim-rewards

Description

This endpoint will craft a claim rewards transaction ready to be signed.

Request body parameters

FieldTypeRequiredDescription
pubkeystringpubkey string compressed or uncompressed of the address that will perform the staking action

Returned

FieldTypeRequiredDescription
unsigned_tx_hexstringUnsigned craft transaction hex string
tx_auth_info_hexstringTransaction auth info hex string
unsigned_tx_hash_hexstringUnasigned tx hash hex string, ready to be signed by external integrations

Example

curl -X POST "https://staking-api.stakely.io/api/v1/celestia/native/action/claim-rewards" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia" \
-H "Content-Type: application/json" \
-d '{
"pubkey": "025a2146590b80d1f0d97cc7104e702011afff21bfaf817f5c7002446369ba9ddc"
}'

Response:

{
"unsigned_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af",
"tx_auth_info_hex": "0a4c0a440a1f2f636f736d6f732e63727970746f...303010c0cf24",
"unsigned_tx_hash_hex": "1a6edb7358323bafca52b1755f3ad985754dc23887110b65429373ed83321500"
}

Prepare action

Gathers signature and unsigned tx:

  • Endpoint: /api/v1/celestia/native/action/prepare

Description

Prepare a signed transaction by gathering the provided signatures with the unsigned transaction hex string:

Request body parameters

FieldTypeRequiredDescription
tx_body_hexstringUnsigned transaction body hex string
tx_auth_info_hexstringTransaction auth info hex string
signature_hexstringTransaction signatures hex string

Returned

FieldTypeRequiredDescription
signed_tx_hexstringSigned transaction string (hex encoded) ready to be broadcasted

Example

curl -X POST "https://staking-api.stakely.io/api/v1/celestia/native/action/prepare" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia" \
-H "Content-Type: application/json" \
-d '{
"tx_body_hex": "0a8e010a8b010a1c2f636f736d6f732e62616e6b...6d1203323530",
"tx_auth_info_hex": "0a4c0a440a1f2f636f736d6f732e63727970746f...303010c0cf24",
"signature_hex": "a1b2c3d4e5f6...<signature hex>"
}'

Response:

{
"signed_tx_hex": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af"
}

Broadcast action

Broadcast a signed transaction

  • Endpoint: /api/v1/celestia/native/action/broadcast

Description

Broadcast a signed transaction. Usually you will brodcast the signed transaction returned in prepare previous step:

Request body parameters

FieldTypeRequiredDescription
signed_tx_hexstringSigned transaction string (hex encoded) to be broadcasted

Returned

FieldTypeRequiredDescription
tx_hashstringTransaction hash of the broadcasted transaction

Example

curl -X POST "https://staking-api.stakely.io/api/v1/celestia/native/action/broadcast" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia" \
-H "Content-Type: application/json" \
-d '{
"signed_tx_hex": "0a8e010a8b010a1c2f636f736d6f732e62616e6b...f736d6f73120"
}'

Response:

{
"tx_hash": "03b8ef9558b9a2d9f2d4c1f4f8bafce1a6df628d6c521474d6823b6e3223d9e8af"
}

Balances

Get the staking balances for a given address:

  • Endpoint: /api/v1/celestia/native/balances

Description

Returns available, delegated, and unbonding balances along with claimable rewards for the queried address on the selected Celestia network.

Request parameters

ParameterInTypeRequiredDescription
addressquerystringCelestia address to query

Use the X-NETWORK header to select the target Celestia network.

Returned

FieldTypeRequiredDescription
availablenumberAvailable (liquid) balance
delegatednumberCurrently delegated balance
unbondingnumberBalance in the unbonding period
totalRewardsnumberTotal rewards that can be claimed
unbondingEntriesUnbondingFormattedEntryDto[]Array of detailed unbonding entries

Each unbondingEntries item:

FieldTypeRequiredDescription
creationHeightnumberHeight at which the unbonding entry was created
completionTsnumberUnix timestamp (in seconds) of completion time
balancenumberCurrent balance of the unbonding entry (human readable)
unbondingIdnumberIdentifier of the unbonding entry

Example

curl "https://staking-api.stakely.io/api/v1/celestia/native/balances?address=celestia1sjllsnramtg3ewxqwwrwjxfgc4n4ef9u0h9wu4" \
-H "X-API-KEY: $STAKELY_API_KEY" \
-H "X-NETWORK: celestia"

Response:

{
"available": 10.5,
"delegated": 5.2,
"unbonding": 2.1,
"totalRewards": 0.35,
"unbondingEntries": [
{
"creationHeight": 30120810,
"completionTs": 1774876258,
"balance": 0.1,
"unbondingId": 1552138
}
]
}