Add a new api key for your account with a specified name.
Account
AddNewApiKey
Create a new API key
POST:/account/apikeys
Returns basic account details such as name, email address, KYC status, etc.
Account
GetAccount
Get basic account details
GET:/account
Returns all api keys for your account, optionally including revoked keys.
Account
GetApiKeys
Get API keys
GET:/account/apikeys
Optional
query: { Optional
includeAnything except 'true' will be considered false
.
Revoke an api key for your account.
Account
RevokeApiKey
Revoke an API key
PUT:/account/apikeys/{key}
Build a Babylon pre-stake transaction with signed delegation payloads. Only available on testnet
Bitcoin
BuildBabylonPreStakeTransaction
Build a Babylon pre-stake transaction with signed delegation payloads
POST:/bitcoin/buildBabylonPreStakeTransaction
Build an unsigned pre-stake staking transaction PSBT that needs to be signed by the staker. Only available on testnet
Bitcoin
BuildPreStakeStakingTransaction
Build an unsigned pre-stake staking transaction PSBT
POST:/bitcoin/buildPreStakeStakingTransaction
Build a babylon registration transaction for an existing stake as part of the post-stake flow. Only available on testnet
Bitcoin
BuildRegistrationTransaction
Build a post-stake babylon registration transaction
POST:/bitcoin/buildRegistrationTransaction
Build a bitcoin staking transaction for use with the post-stake flow. Only available on testnet
Bitcoin
BuildStakingTransaction
Build a post-stake bitcoin staking transaction
POST:/bitcoin/buildStakingTransaction
Build an unbonding transaction PSBT. Only available on testnet
Bitcoin
BuildUnbondingTransaction
Build an unbonding transaction PSBT that needs to be signed by the staker.
POST:/bitcoin/buildUnbondingTransaction
Build a withdrawal transaction PSBT for withdrawing funds from unbonded or expired stakes. Only available on testnet
Bitcoin
BuildWithdrawalTransaction
Build a withdrawal transaction PSBT
POST:/bitcoin/buildWithdrawalTransaction
Finalize a verified pre-stake by broadcasting the Bitcoin staking transaction. Only available on testnet
Bitcoin
FinalizePreStake
Broadcast and finalize a verified pre-stake Bitcoin staking transaction
POST:/bitcoin/finalizePreStake
Get UTXOs for a given bitcoin address
Bitcoin
GetAddressUtxos
Get UTXOs for a given bitcoin address. Only available on testnet
GET:/bitcoin/utxos/{address}
Get delegation payloads for a given staking transaction ID. Only available on testnet
Bitcoin
GetDelegationPayloads
Get delegation payloads
POST:/bitcoin/getDelegationPayloads
Get delegation payloads for pre-stake using the unsigned staking transaction. Only available on testnet
Bitcoin
GetDelegationPayloadsPreStake
Get delegation payloads for pre-stake
POST:/bitcoin/getDelegationPayloadsPreStake
Get all staking details for your account. Only available on testnet
Bitcoin
GetStakingDetails
Get all staking details for your account
GET:/bitcoin/stakingDetails
Optional
query: { Optional
address?: stringBitcoin address
Optional
pageOptional
pageGet current staking parameters including confirmation requirements. Only available on testnet
Bitcoin
GetStakingParams
Get current babylon staking protocol parameters
GET:/bitcoin/stakingParams
Get the status of a staking transaction. Only available on testnet
Bitcoin
GetStakingStatus
Get the status of a staking transaction
GET:/bitcoin/stakingStatus/{stakingTxId}
Submit a signed pre-stake registration to Babylon for covenant verification. Only available on testnet
Bitcoin
SubmitPreStakeRegistration
Submit a signed pre-stake registration to Babylon for covenant verification
POST:/bitcoin/submitPreStakeRegistration
Submit a signed staking transaction for broadcasting to the Bitcoin network using the post-stake flow. Only available on testnet
Bitcoin
SubmitStakingTransaction
Broadcast a signed bitcoin staking transaction for use with the post-stake flow
POST:/bitcoin/submitStakingTransaction
Submit a staker-signed unbonding transaction PSBT. Only available on testnet
Bitcoin
SubmitUnbondingTransaction
Submit a staker-signed unbonding transaction PSBT for processing with covenant signatures and broadcasting.
POST:/bitcoin/submitUnbondingTransaction
Submit a signed withdrawal transaction for broadcasting to the Bitcoin network. Only available on testnet
Bitcoin
SubmitWithdrawalTransaction
Submit a signed withdrawal transaction for broadcasting to the Bitcoin network
POST:/bitcoin/submitWithdrawalTransaction
Abandon stake request and all associated validators.
Ethereum
AbandonStake
Abandon Stake
PUT:/ethereum/stake/{stakeId}/abandon
Broadcast one or more pre-signed exit messages to the beacon chain
Ethereum
BroadcastPresignedExitMessage
Broadcast exit message(s)
POST:/ethereum/broadcastPresignedExitMsg
Generate pre-signed exit message(s) for a specified list of public keys and broadcast the message to a beacon node in a single request.
Ethereum
BulkWithdraw
Bulk withdraw Validators
POST:/ethereum/bulkWithdrawValidators
This endpoint is only to be used with active 0x02 validators, using this to perform initial activation deposits will result in a loss of funds. Generate transaction data for depositing additional ETH to multiple active 0x02 validators. This endpoint will generate a transaction for interacting with our pectra batch deposit implementation. The generated transaction will contain a dummy signature and deposit data root since signature validation is skipped for active validators. The returned transaction data must be signed and broadcast by the user.
Ethereum
CraftEthValidatorBatchTopupTx
Generate batch validator top-up transaction
POST:/ethereum/txcrafting/validators/batchtopup
Generate transaction data for performing an EIP 7251 on-chain validator consolidation. This can be used to upgrade a single validator by specifying itself as both the source and target. Or to combine 2 active validators into a single validator. The consolidation transaction must be signed and submitted by the address controlling the source validator (the configured withdrawal address).
Ethereum
CraftEthValidatorConsolidateTx
Generate validator consolidation transaction
POST:/ethereum/txcrafting/validators/consolidate
This endpoint is only to be used with active 0x02 validators, using this to perform initial activation deposits will result in a loss of funds. Generate transaction data for depositing additional ETH to an active 0x02 validator. This endpoint will generate a transaction for interacting with the canonical beacon deposit contract. The generated transaction will contain a dummy signature and deposit data root since signature validation is skipped for active validators. The returned transaction data must be signed and broadcast by the user.
Ethereum
CraftEthValidatorTopupTx
Generate validator top-up transaction
POST:/ethereum/txcrafting/validators/topup
Generate transaction data for performing an EIP 7002 on-chain validator withdrawal. This can be used to withdraw accrued rewards exceeding 32 ETH. The withdrawal amount will be capped such that the validator balance does not fall below 32 ETH. This can be used to perform a full exit by specifying an amount of 0. The returned transaction data must be signed and broadcast by the user.
Ethereum
CraftEthValidatorWithdrawTx
Generate validator withdrawal transaction
POST:/ethereum/txcrafting/validators/withdraw
DEPRECATED use /stakeV2
instead. Request one or more new validators. Validators created via this endpoint will have 0x01
withdrawal credentials.
Ethereum
CreateStake
[Deprecated] Create Capella-era (0x01) validator(s)
POST:/ethereum/stake
Request one or more new validators, returning the individual validator details in the response. Validators created via this endpoint will have 0x01
withdrawal credentials.
Ethereum
CreateStakeV2
Create Capella-era (0x01) validator(s)
POST:/ethereum/stakeV2
Stake an arbitrary amount of ETH (Denoted in gwei) post-Pectra. This endpoint will calculate and create the appropriate number of validators for the staked amount. The data required for the deposit transaction will be returned in the response. Validators created via this endpoint will have 0x02
withdrawal credentials.
Ethereum
CreateStakeV3
Create Pectra-era (0x02) validator(s)
POST:/ethereum/stakeV3
This endpoint will simulate all pending withdrawals up to and including the specified validator indexes. The simulation calculates the estimated exit as if the exit had been processed at that moment in time. The results are indicative and can only account for the state of the exit queue at the time of simulating. If this is being used optimise validator exits, caution should be taken since missing the predictedExitSubmissionDeadlineEpoch
will result in the longest possible period of no rewards earned. Submitting exit messages during the deadline epoch can be risky, some time (2-4 minutes) should be allowed for the beacon chain to process any exit messages broadcasted to the network. We recommend submitting exit messages at least an hour before the deadline epoch to account for unexpected changes to the exit queue. You should also consider the impact of your own withdrawals on the exit queue if you are exiting large amounts of validators at once. This endpoint will return an error in the following situations: - one or more invalid validator indexes are passed - one or more of the specified validators does not have withdrawal credentials set (0x01...) - one or more validators has already exited - one or more validators is not known to the beacon chain Below is a description of each of the fields returned: - expectedExitEpoch - the epoch in which the validator would exit the Beacon chain if its exit was processed at the current time - expectedFullWithdrawalEligibilityEpoch - the epoch where the validator would become eligible for receiving the full staked balance ETH plus any excess - predictedUpcomingWithdrawalEpoch - the predicted epoch in which the validator's withdrawal will be processed by the Beacon chain, taking the current exit queue into account - predictedExitSubmissionDeadlineEpoch - the deadline epoch in which the validator should already be queued for exiting the Beacon chain
Ethereum
EstimateWithdrawalTimes
Estimate validator exit times
POST:/ethereum/estimateWithdrawalTimes
Generate one or more pre-signed exit messages for a specified list of public keys
Ethereum
GenPresignedExitMsg
Generate exit message(s)
POST:/ethereum/genPresignedExitMsg
By default, validator records are populated with deposit transaction data suitable for deposits of 32ETH. This endpoint can be used in situations where you want to perform deposits of amounts other than 32ETH. This will generate the deposit transaction data for one or more validators corresponding to the amount(s) specified in the request body. Note that this will not replace nor invalidate the deposit data that is stored on the validator records themselves This endpoint will return an error in the following situations: - an invalid amount is specified (<= 0 or > 32000000000) - one or more of the specified validators is not in a WAITING_DEPOSIT state - one or more validators is not associated your account - the list of specified validators contains duplicate pubkeys
Ethereum
GenerateDepositData
Generate arbitrary amount deposit data
POST:/ethereum/validators/generateDepositData
Returns deposit data for all validators in the specified stake request.
Ethereum
GetDepositDataForStake
Get deposit data for Stake
GET:/ethereum/stake/{stakeId}/depositdata
Returns Validators for your account with filtering on reference, withdrawal address, and status. Records are returned in order of initial request.
Ethereum
GetOrderedValidators
Get Validators
GET:/ethereum/orderedValidators
Optional
query: { Optional
count?: stringdefaults to 100
Optional
reference?: stringOptional
skip?: stringOptional
status?: stringOptional
withdrawalReturns stake details and associated validators by stakeId.
Ethereum
GetStake
Get Stake details by stakeId
GET:/ethereum/stake/{stakeId}
Returns details of all staking requests for your account including withdrawal address, fee recipient, and validator details.
Ethereum
GetEthereumStakes
Get Stakes
GET:/ethereum/stakes
Optional
query: { Optional
reference?: stringReturns all staking requests with validator status counts.
Ethereum
GetStakesWithValidatorStatusCounts
Get Stakes with validator counts bystatus
GET:/ethereum/stakesWithValidatorStatusCounts
Optional
query: { Optional
reference?: stringOptional
withdrawalReturns the accounts summary. Individual stakes are not flattened
Ethereum
GetValidatorAccountsSummary
Get Staking accounts summary
GET:/ethereum/validators/accounts
Returns daily performance stats of validators, returns stats for all active validators if none are specified
Ethereum
GetValidatorDailyPerformance
Get Validator daily performance
GET:/ethereum/validators/performance
Optional
query: { Optional
validatorcomma seperated list of validator indexes
Returns daily rewards stats of validators, returns stats for all active validators if none are specified
Ethereum
GetValidatorDailyRewards
Get Validator daily rewards
GET:/ethereum/validators/dailyRewards
Optional
query: { Optional
currency?: stringfiat currency for ethereum pricing
Optional
dateunix timestamp of starting date from
Optional
dateunix timestamp of ending date to
Optional
validatorcomma seperated list of validator indexes
Returns the dashboard summary. Individual stakes are flattened
Ethereum
GetValidatorDashboardSummary
Get Staking dashboard summary
GET:/ethereum/validators/dashboard
Returns validator income history for a given time frame and validator indices
Ethereum
GetValidatorIncomeHistory
Get Validator income history
GET:/ethereum/validators/incomeHistory
Optional
account?: stringaccount reference to use as filter
Time frame for the data: 1D (1 day in 1-hour chunks) or 1W (1 week in 6-hour chunks)
Optional
validatorcomma seperated list of validator indexes
Returns beacon chain information of validators, returns info for all active validators if none are specified.
Ethereum
GetValidatorInfo
Get Validator beacon chain info
GET:/ethereum/validators/info
Optional
query: { Optional
validatorcomma seperated list of validator indexes
Returns the estimated wait times and other queue stats for entering and exiting validators.
Ethereum
GetValidatorQueueStats
Get Validator queue
GET:/ethereum/validators/queueStats
Returns summarized validator rewards data suitable for use in charts.
Ethereum
GetValidatorRewardsChartData
Get staking rewards chart data
GET:/ethereum/validators/rewardsChartData
Optional
query: { Optional
account?: stringaccount reference to use as filter
Optional
currency?: stringcurrency used for price data
Optional
datapoints?: numbernumber of datapoints to return
Optional
dateunix timestamp of starting date from
Optional
dateunix timestamp of ending date to
Optional
validatorcomma seperated list of validator indexes
Get system information including API versions
Public
GetSystemInfo
Get System Info
GET:/public/systemInfo
get data for rendering network statistics (asset prices, assets UAM, etc)
Public
GetWebsiteData
Get Pier Two Public Data
GET:/public/websiteData
Optional
query: { Optional
currency?: stringcurrency used for price data (usd
by default)
get static network config such as chain id, contract addresses, operator addresses, etc
Public
NetworkConfig
Get Network Config
GET:/public/networkConfig
Generate a stake transaction payload containing one or more instructions. Possible instruction types and inputs are described below: This returns a serialized transaction which can be deserialized, signed and submitted to the network. See @solana/web.js docs for deserializing Versioned Messages and working with Versioned Transactions N.B any instructions operating on an existing stake account must specify target stakePubkey in the request body seperate to the instructions Create and delegate new stake account ~~~ { type: 'createAndDelegate' input: { fromPubkey: pubkey of funding address, stakeAuthority: address authorized to delegate and undelegate stake, withdrawAuthority: address authorized to withdraw stake, lamports: amount of lamports to stake (1 sol = 1000000000 lamports), reference: an arbitrary reference used to identify/group the stake within the Pier Two platform, label: an arbitrary label/memo for use within the Pier Two platform } } ~~~ Create a new stake account (same input data as 'createAndDelegate') ~~~ { type: 'create' input: { fromPubkey: pubkey of funding address, stakeAuthority: address authorized to delegate and undelegate stake, withdrawAuthority: address authorized to withdraw stake, lamports: amount of lamports to stake (1 sol = 1000000000 lamports), reference: an arbitrary reference used to identify/group the stake within the Pier Two platform, label: an arbitrary label/memo for use within the Pier Two platform } } ~~~ Delegate an existing stake account ~~~ { type: 'delegate' input: { authorizedPubkey: address authorized to delegate and undelegate stake } } ~~~ Undelegate (deactivate) an existing stake account ~~~ { type: 'undelegate' input: { authorizedPubkey: address authorized to delegate and undelegate stake } } ~~~ Withdraw inactive stake (deactivated stake balance or any other excess SOL held by account) ~~~ { type: 'withdraw' input: { toPubkey: recipient of withdrawn funds, authorizedPubkey: address authorized to withdraw stake, lamports: amount of lamports to withdraw (1 sol = 1000000000 lamports), } } ~~~ Merge an eligible stake account into target stake account An eligible stake account must have the same stakeAuthority and withdrawAuthority and have been active for an entire epoch and earned rewards ~~~ { type: 'merge' input: { sourceStakePubkey: address of stake account to merge (this account will be dissolved/closed onchain), authorizedPubkey: address authorized to delegate and undelegate } } ~~~
Solana
BuildTransactionPayload
Generate a stake transaction payload
POST:/solana/stake/buildTransaction
Returns information about the current epoch and inflation reward rate.
Solana
GetNetworkStakingInfo
Get current epoch staking reward info
GET:/solana/stake/networkInfo
Returns the 7D, 30D and total inflation and MEV rewards for the specified stake accounts.
Solana
GetPerformanceSummary
Get Solana stake performance summary
GET:/solana/stake/performanceSummary
Optional
query: { Optional
stakecomma seperated list of stake account pubkeys, will return data for all active stake accounts if none are provided
Returns daily rewards stats of specified stake accounts.
Solana
GetStakeAccoutDailyRewards
Get daily rewards stats
GET:/solana/stake/dailyRewards
Optional
currency?: stringfiat currency for ethereum pricing
Optional
dateunix timestamp of starting date from
Optional
dateunix timestamp of ending date to
comma seperated list of stake account pubkeys
Returns summarized Solana staking rewards data suitable for use in charts.
Solana
GetStakeRewardsChartData
Get staking rewards chart data
GET:/solana/stake/rewardsChartData
Optional
query: { Optional
currency?: numbercurrency used for price data
Optional
datapoints?: numbernumber of datapoints to return, defaults to 30
Optional
dateunix timestamp of starting date from
Optional
dateunix timestamp of ending date to
Optional
stakecomma seperated list of stake pubkeys, will return all rewards if none are specified
Returns the details of Solana staking positions for your account.
Solana
GetSolanaStakes
Get Solana Stake Accounts
GET:/solana/stakes
Optional
query: { Optional
pageOptional
pageProtected
addProtected
addProtected
addOptional
rawQuery: QueryParamsTypeProtected
createProtected
encodeProtected
mergeOptional
params2: RequestParamsProtected
toOptional
rawQuery: QueryParamsTypeGenerated using TypeDoc
Title
Pier Two Staking API
Version
1.0.75-mainnet
Base Url
https://gw-1.api.piertwo.io
Contact
The Pier Two Staking API Docs