Endpoints
API Usage
Once you already have access to the Staking API with a validated user and existing apikeys you can start using this service.
API Reference docs
You can check the Staking API Reference here:
- Rendered doc page.
- Staking OpenApi
Authentication
In order to use staking api related endpoints you need to include your API KEY
Header:
Name | Description | Example value | Required |
---|---|---|---|
X-API-KEY | Your api key value | <API_KEY_VALUE> | ✅ |
ChainId
The chainId is the id of the chain you want to stake/unstake/claim rewards.
ChainId is a string that identifies the blockchain network. It is used to specify the destination of the transaction.
For example, if you want to stake/unstake/claim rewards on Cosmos Hub, you need to use the chainId cosmoshub-4
.
You can find the list of chainIds for each chain in the Cosmos Chain Registry. Select the directory of the chain you want to use and look for the chain_id
field value.
If you pass a wrong chainId or the chain is not yet supported, the endpoint will return a 404 error with the message Blockchain not found
.
If you need us to enable/support a new chain, please contact us at [email protected].
Stake action
Craft a stake transaction:
- Endpoint:
/api/v1/cosmos/{chainId}/action/stake
Description
This endpoint will craft a stake transaction ready to be signed.
Request body parameters
Returned
Unstake action
Craft an unstake transaction:
- Endpoint:
/api/v1/cosmos/{chainId}/action/unstake
Description
This endpoint will craft an unstake transaction ready to be signed.
Request body parameters
Returned
Claim rewards action
Craft a claim rewards transaction:
Description
This endpoint will craft a claim rewards transaction ready to be signed.
Request body parameters
Returned
Prepare action
Gathers signature and unsigned tx:
- Endpoint:
/api/v1/cosmos/{chainId}/action/prepare
Description
Prepare a signed transaction by gathering the provided signatures with the unsigned transaction hex string:
Request body parameters
Returned
Broadcast action
Broadcast a signed transaction
Description
Broadcast a signed transaction. Usually you will brodcast the signed transaction returned in prepare
previous step: