Skip to main content

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

tip

You can check the Staking API Reference here:

Authentication

In order to use staking api related 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 > Auth section of the documentation.

Header:

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

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).

info

If you omit the header the API falls back to the default Pharos network configured for your account.

tip

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.

Response payload: array of NetworkResponseDto

FieldDescription
nameInternal blockchain entry name
typeBlockchain type string (typically ETHEREUM)
chain_idChain identifier to use as X-NETWORK
is_defaulttrue when this network is used as fallback

Delegate action

Craft a delegate transaction:

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:

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:

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:

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:

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
FieldDescription
pendingStakePending stake (activation), decimal string
stakeActive stake (including eligible pending activation), decimal string
pendingUnstakeAmount in undelegation / lock period (84 epochs by default), decimal string
pendingWithdrawStakeAmount withdrawable after unlock epoch, decimal string
rewardsClaimable rewards, decimal string