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}
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
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 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 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 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 the details of Solana staking positions for your account.
Solana
GetSolanaStakes
Get Solana Stake Accounts
GET:/solana/stakes
Optional
query: { Optional
pageOptional
pageReturns 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
a promise that resolves when your mnemonic status is ACTIVE
utils
Optional
args: { Optional
interval?: numbera promise that resolves when all validators associated to stakeId
reach desiredStatus
utils
Optional
interval?: numbergenerate call data for a batch validator deposit
the data field returned from ethereum.getDepositDataForStake
can be
passed to this function
utils
converts data fetched from ethereum.getOrderedValidators
to be used with
utils.generateBatchDepositCallData
utils
Protected
addProtected
addProtected
addOptional
rawQuery: QueryParamsTypeProtected
createProtected
encodeProtected
mergeOptional
params2: RequestParamsProtected
toOptional
rawQuery: QueryParamsTypeGenerated using TypeDoc
Title
Pier Two Staking API
Version
1.0.57-mainnet
Base Url
https://gw-1.api.piertwo.io
Contact
The Pier Two Staking API Docs