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
Heads up! To obtain a valid API key required for authentication, please refer to the Authentication > Auth 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 | 1672 | ⚪ |
X-NETWORK header
Use the X-NETWORK header to select the Pharos network. For Pharos mainnet, the chain ID is typically 1672 (confirm with the networks endpoint below).
If you omit the header the API falls back to the default Pharos network configured for your account.
Need another Pharos environment exposed? Let us know at [email protected].
List available networks
Use this helper endpoint to obtain the list of Pharos staking networks that are currently enabled for your API key.
- Endpoint:
/api/v1/pharos/native/networks
Response payload: array of NetworkResponseDto
| Field | Description |
|---|---|
name | Internal blockchain entry name |
type | Blockchain type string (typically ETHEREUM) |
chain_id | Chain identifier to use as X-NETWORK |
is_default | true when this network is used as fallback |
Delegate action
Craft a delegate transaction:
- Endpoint:
/api/v1/pharos/native/action/delegate
Description
This endpoint crafts a delegate transaction ready to be signed. The transaction delegates the specified amount (native token, 18 decimals) from address to the validator pool.
Request body parameters
PharosDelegateActionDto
Returned
PharosActionResponseDto
Undelegate action
Craft an undelegate transaction:
- Endpoint:
/api/v1/pharos/native/action/undelegate
Description
This endpoint crafts an undelegate transaction ready to be signed. It exits the delegator’s effective stake for the given address. Principal becomes withdrawable only after the protocol 84-epoch withdraw window.
Request body parameters
PharosUndelegateActionDto
Returned
PharosActionResponseDto
Withdraw action
Craft a withdraw (claimStake) transaction:
- Endpoint:
/api/v1/pharos/native/action/withdraw
Description
Once principal has passed the unlock period, this action crafts a transaction to withdraw completed unstake back to the wallet. If nothing is withdrawable or funds are still locked, the API returns a validation error.
Request body parameters
PharosWithdrawActionDto
Returned
PharosActionResponseDto
Claim rewards action
Craft a claim rewards transaction:
Description
This endpoint crafts a claim rewards transaction ready to be signed. It transfers accumulated staking rewards for the delegator address.
Request body parameters
PharosClaimRewardsActionDto
Returned
PharosActionResponseDto
Compound rewards action
Craft a compound rewards transaction:
Description
This endpoint crafts a compound rewards transaction ready to be signed. It reinvests claimable rewards into the active stake for the delegator address.
Request body parameters
PharosCompoundRewardsActionDto
Returned
PharosActionResponseDto
Prepare action
After signing raw_tx_hex_hash, call the Pharos prepare endpoint:
- Endpoint:
/api/v1/pharos/native/action/prepare
Description
Prepare a signed transaction by combining the provided signatures (r, s, v) with the unsigned transaction hex from the crafting response.
Request body parameters
EthPrepareActionDto
Returned
EthPrepareActionResponseDto
Broadcast action
Broadcast the signed transaction:
- Endpoint:
/api/v1/pharos/native/action/broadcast
Description
Broadcast a signed transaction. Typically you broadcast the hex returned from the prepare step.
Request body parameters
EthBroadcastActionDto
Returned
EthBroadcastActionResponseDto
Stake balance
Get stake balance for the given address:
Description
Returns a breakdown of stake and rewards for the delegator. All numeric fields are decimal strings in native token units (18 decimals).
Request parameters
Path parameter: address — delegator EVM address to query.
Returned
PharosStakeBalanceResponseDto
| Field | Description |
|---|---|
pendingStake | Pending stake (activation), decimal string |
stake | Active stake (including eligible pending activation), decimal string |
pendingUnstake | Amount in undelegation / lock period (84 epochs by default), decimal string |
pendingWithdrawStake | Amount withdrawable after unlock epoch, decimal string |
rewards | Claimable rewards, decimal string |