Staking
Staking pool and per-staker views
Staking pool
/stakingResponses
Staking pool view. The service's typed response, as public camelCase JSON.
application/json
datanull | StakingPoolrequiredaccRewardPerSharestringrequiredA plain decimal string (too large for an n-suffixed integer).
Example1250318874012553600000000configIdstring | nullPattern^0x[0-9a-f]{64}$Example0xd3130ac108d621be0d73cb8f130ea4dca14f52512c4d06bf48610067098e93e1lockedOwedTotalstringrequiredLocked yield moved to owners' owed balances and not yet paid.
Pattern^-?(0|[1-9][0-9]*)n$Example1850000000000nlockedWeightstringrequiredWeight of locked and vesting PARCHMENT (
lockedWeightBpsof it), as of each owner's last sync. It earns USDC only (no PARCHMENT drip, no referral bonus).Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000nlockedWeightBpsstring | nullLocked weight per PARCHMENT in bps; null on a pool without locked yield.
Pattern^-?(0|[1-9][0-9]*)n$Example5000nmaxMinStakeLockMsstring | nullMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example604800000nmaxRewardStreamMsstring | nullThe largest
rewardStreamMs/minStakeLockMsan admin may set (staking::set_duration_caps; 30 days by default). Omitted by older services.Pattern^-?(0|[1-9][0-9]*)n$Example604800000nminStakeLockMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example604800000nnowMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchDripEndMsstringrequiredProjected end of the drip (moved forward while nobody stakes).
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchDripLastMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchDripNowstringrequiredparch_drip_remainingprojected tonow_ms.Pattern^-?(0|[1-9][0-9]*)n$Example1500000000000nparchDripRemainingstringrequiredSwept early-exit penalties dripping to stakers, as of the last accrual.
Pattern^-?(0|[1-9][0-9]*)n$Example1500000000000nparchmentUsdSourcestring | nullparchmentUsdTsMsstring | nullMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchmentUsdWadstring | nullCached PARCHMENT/USD quote, null when unavailable.
Pattern^-?(0|[1-9][0-9]*)n$Example40000000000000000npoolIdstringrequiredPattern^0x[0-9a-f]{64}$Example0x37420918de237b6a324e834c387ef35ccae6f9f64ff9cbf770aa39702af7ad11referralReservestringrequiredPattern^-?(0|[1-9][0-9]*)n$Example1850000000000nrewardStreamMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example604800000nrewardsstringrequiredPattern^-?(0|[1-9][0-9]*)n$Example100000000nstreamEndMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nstreamLastMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nstreamRemainingstringrequiredUnvested staker rewards as of the last accrual.
Pattern^-?(0|[1-9][0-9]*)n$Example1850000000000nstreamVestedNowstringrequiredRewards vested between
stream_last_msandnow_ms.Pattern^-?(0|[1-9][0-9]*)n$Example1850000000000ntotalStakedstringrequiredPattern^-?(0|[1-9][0-9]*)n$Example4200000000000000ntotalWeightstringrequiredThe USDC reward index's shares:
totalStakedpluslockedWeight.Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000n
Example request
curl 'https://api.parchment.trade/staking'const res = await fetch("https://api.parchment.trade/staking");
const { data } = await res.json();Example response (200)
{
"data": {
"accRewardPerShare": "1250318874012553600000000",
"configId": "0xd3130ac108d621be0d73cb8f130ea4dca14f52512c4d06bf48610067098e93e1",
"lockedOwedTotal": "1850000000000n",
"lockedWeight": "25000000000000n",
"lockedWeightBps": "5000n",
"maxMinStakeLockMs": "604800000n",
"maxRewardStreamMs": "604800000n",
"minStakeLockMs": "604800000n",
"nowMs": "1796677200000n",
"parchDripEndMs": "1796677200000n",
"parchDripLastMs": "1796677200000n",
"parchDripNow": "1500000000000n",
"parchDripRemaining": "1500000000000n",
"parchmentUsdSource": "string",
"parchmentUsdTsMs": "1796677200000n",
"parchmentUsdWad": "40000000000000000n",
"poolId": "0x37420918de237b6a324e834c387ef35ccae6f9f64ff9cbf770aa39702af7ad11",
"referralReserve": "1850000000000n",
"rewardStreamMs": "604800000n",
"rewards": "100000000n",
"streamEndMs": "1796677200000n",
"streamLastMs": "1796677200000n",
"streamRemaining": "1850000000000n",
"streamVestedNow": "1850000000000n",
"totalStaked": "4200000000000000n",
"totalWeight": "25000000000000n"
}
}Staker
/staking/{owner}Path parameters
ownerstringrequiredWallet address
Pattern^(0[xX])?[0-9a-fA-F]{1,64}$Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
Responses
One staker's stake and claimable rewards (claim them with the claim transaction). Claims are never blocked by pool coverage; only an admin/guardian emergency pause can halt them. The service's typed response, as public camelCase JSON.
application/json
dataStakerrequiredA wallet's stake (zeros without one).
lockedbooleanrequiredStaked and
now_ms < unlock_at_ms.lockedOwedstringrequiredOf
lockedPending, what syncs already moved to the owner's owed balance.Pattern^-?(0|[1-9][0-9]*)n$Example100000000nlockedPendingstringrequiredUSDC the locked weight earned to
now_ms, owed part included. The claim payspendingReward + lockedPending.Pattern^-?(0|[1-9][0-9]*)n$Example100000000nlockedSyncedBalancestringrequiredThe finalized locked and vesting balance that weight was set from; a later ledger change counts after the next sync.
Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000nlockedWeightstringrequiredLocked weight as of the owner's last locked-balance sync.
Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000nnowMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nownerstringrequiredPattern^0x[0-9a-f]{64}$Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0dparchPendingstringrequiredPARCHMENT forfeit rewards owed at
now_ms, paid on the next stake, unstake or claim.Pattern^-?(0|[1-9][0-9]*)n$Example1500000000000npendingRewardstringrequiredRewards claimable at
nowMs.Pattern^-?(0|[1-9][0-9]*)n$Example100000000npendingRewardExactbooleanrequiredFalse when
pending_rewardis an estimate until the owner's debt is re-based.rewardDebtstringrequiredA plain decimal string (too large for an n-suffixed integer).
Example1250318874012553600000000stakedstringrequiredPattern^-?(0|[1-9][0-9]*)n$Example25000000000000nstakedAtMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000ntotalWeightstringrequiredstaked + lockedWeight: the owner's share of the USDC reward index.Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000nunlockAtMsstringrequiredWhen the stake unlocks, ms.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000n
Example request
curl 'https://api.parchment.trade/staking/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d'const res = await fetch("https://api.parchment.trade/staking/0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d");
const { data } = await res.json();Example response (200)
{
"data": {
"locked": true,
"lockedOwed": "100000000n",
"lockedPending": "100000000n",
"lockedSyncedBalance": "25000000000000n",
"lockedWeight": "25000000000000n",
"nowMs": "1796677200000n",
"owner": "0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d",
"parchPending": "1500000000000n",
"pendingReward": "100000000n",
"pendingRewardExact": true,
"rewardDebt": "1250318874012553600000000",
"staked": "25000000000000n",
"stakedAtMs": "1796677200000n",
"totalWeight": "25000000000000n",
"unlockAtMs": "1796677200000n"
}
}Staking APR history
/stats/staking-historyQuery parameters
daysstringrequiredRequired.
7,30,90orall; anything else (missing or empty included) is 400 bad_request.One of73090all
Responses
Staking APR/APY history for days=7|30|90|all, from the service's staking pool snapshots and its cached PARCHMENT/USD DEX quote (USDC is $1). A 7/30/90 window is partial when no snapshot is at or before its start or its observed span is empty; annualized is true only when a partial window produced an APR. days=all uses the whole series (windowMs null). aprWad/apyWad are x 1e18 and null without a stake, a span or a quote to value PARCHMENT. Every integer is an n-suffixed decimal string. The service's typed response, as public camelCase JSON.
application/json
dataStakingHistoryrequiredThe window's staking APR/APY, its inputs and the snapshots it was computed from. Rates are x 1e18 (
aprWad1e17 is 10%).annualizedbooleanrequiredTrue only when a partial window produced an APR (scaled from a shorter span).
aprWadstring | nullAPR x 1e18; null without a stake, a span or a quote to value it.
Pattern^-?(0|[1-9][0-9]*)n$Example120000000000000000napyWadstring | nullAPY x 1e18 (the APR compounded); null with the APR.
Pattern^-?(0|[1-9][0-9]*)n$Example130000000000000000navgStakestringrequiredTime-weighted stake over the window (PARCHMENT base units).
Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000navgWeightstringrequiredTime-weighted stake plus locked weight: the USDC rewards' denominator (the PARCHMENT drip's is
avgStake).Pattern^-?(0|[1-9][0-9]*)n$Example25000000000000ndailyStakingDay[]requireddaysstringrequired"7","30","90"or"all", as requested.Example7fromMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nobservedMsstringrequiredMilliseconds.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchmentUsdSourcestring | nullThe quote's source identifier; null without a quote.
parchmentUsdTsMsstring | nullWhen the quote was read; null without one.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nparchmentUsdWadstring | nullThe cached PARCHMENT/USD DEX quote: USD per whole PARCHMENT x 1e18; null without one.
Pattern^-?(0|[1-9][0-9]*)n$Example40000000000000000npartialbooleanrequiredNo snapshot at or before the window start, or an empty observed span.
pointsStakingHistoryPoint[]requiredThe snapshots in the window, ascending by time.
rewardParchmentstringrequiredPARCHMENT vested to stakers over the window (base units, 9 decimals).
Pattern^-?(0|[1-9][0-9]*)n$Example1500000000000nrewardUsdcstringrequiredUSDC vested to stakers over the window (base units, 6 decimals).
Pattern^-?(0|[1-9][0-9]*)n$Example1850000000000ntoMsstringrequiredThe request time.
Pattern^-?(0|[1-9][0-9]*)n$Example1796677200000nwindowMsstring | nullThe window length; null for
all.Pattern^-?(0|[1-9][0-9]*)n$Example604800000n
Example request
curl 'https://api.parchment.trade/stats/staking-history?days=7'const res = await fetch("https://api.parchment.trade/stats/staking-history?days=7");
const { data } = await res.json();Example response (200)
{
"data": {
"annualized": true,
"aprWad": "120000000000000000n",
"apyWad": "130000000000000000n",
"avgStake": "25000000000000n",
"avgWeight": "25000000000000n",
"daily": [
{
"aprWad": "120000000000000000n",
"avgStake": "25000000000000n",
"avgWeight": "25000000000000n",
"dayMs": "1796601600000n",
"final": true,
"fromMs": "1796677200000n",
"observedMs": "1796677200000n",
"parchmentUsdWad": "40000000000000000n",
"rewardParchment": "1500000000000n",
"rewardUsdc": "1850000000000n",
"toMs": "1796677200000n"
}
],
"days": "7",
"fromMs": "1796677200000n",
"observedMs": "1796677200000n",
"parchmentUsdSource": "string",
"parchmentUsdTsMs": "1796677200000n",
"parchmentUsdWad": "40000000000000000n",
"partial": true,
"points": [
{
"parchDripVested": "1500000000000n",
"parchmentUsdWad": "40000000000000000n",
"rewardsVestedUsdc": "1850000000000n",
"totalStaked": "4200000000000000n",
"tsMs": "1796677200000n"
}
],
"rewardParchment": "1500000000000n",
"rewardUsdc": "1850000000000n",
"toMs": "1796677200000n",
"windowMs": "604800000n"
}
}