Skip to content
parchmentdocs
Open app

Staking

Staking pool and per-staker views

Staking pool

get/staking

Responses

  • Staking pool view. The service's typed response, as public camelCase JSON.

    application/json

    • datanull | StakingPoolrequired
      • accRewardPerSharestringrequired

        A plain decimal string (too large for an n-suffixed integer).

        Example1250318874012553600000000
      • configIdstring | null
        Pattern^0x[0-9a-f]{64}$
        Example0xd3130ac108d621be0d73cb8f130ea4dca14f52512c4d06bf48610067098e93e1
      • lockedOwedTotalstringrequired

        Locked yield moved to owners' owed balances and not yet paid.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • lockedWeightstringrequired

        Weight of locked and vesting PARCHMENT (lockedWeightBps of 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$
        Example25000000000000n
      • lockedWeightBpsstring | null

        Locked weight per PARCHMENT in bps; null on a pool without locked yield.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example5000n
      • maxMinStakeLockMsstring | null

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example604800000n
      • maxRewardStreamMsstring | null

        The largest rewardStreamMs / minStakeLockMs an admin may set (staking::set_duration_caps; 30 days by default). Omitted by older services.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example604800000n
      • minStakeLockMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example604800000n
      • nowMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchDripEndMsstringrequired

        Projected end of the drip (moved forward while nobody stakes).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchDripLastMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchDripNowstringrequired

        parch_drip_remaining projected to now_ms.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1500000000000n
      • parchDripRemainingstringrequired

        Swept early-exit penalties dripping to stakers, as of the last accrual.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1500000000000n
      • parchmentUsdSourcestring | null
      • parchmentUsdTsMsstring | null

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchmentUsdWadstring | null

        Cached PARCHMENT/USD quote, null when unavailable.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example40000000000000000n
      • poolIdstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x37420918de237b6a324e834c387ef35ccae6f9f64ff9cbf770aa39702af7ad11
      • referralReservestringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • rewardStreamMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example604800000n
      • rewardsstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • streamEndMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • streamLastMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • streamRemainingstringrequired

        Unvested staker rewards as of the last accrual.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • streamVestedNowstringrequired

        Rewards vested between stream_last_ms and now_ms.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • totalStakedstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example4200000000000000n
      • totalWeightstringrequired

        The USDC reward index's shares: totalStaked plus lockedWeight.

        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)

application/json
{
  "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

get/staking/{owner}

Path parameters

  • ownerstringrequired

    Wallet 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

    • dataStakerrequired

      A wallet's stake (zeros without one).

      • lockedbooleanrequired

        Staked and now_ms < unlock_at_ms.

      • lockedOwedstringrequired

        Of lockedPending, what syncs already moved to the owner's owed balance.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • lockedPendingstringrequired

        USDC the locked weight earned to now_ms, owed part included. The claim pays pendingReward + lockedPending.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • lockedSyncedBalancestringrequired

        The 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$
        Example25000000000000n
      • lockedWeightstringrequired

        Locked weight as of the owner's last locked-balance sync.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example25000000000000n
      • nowMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • ownerstringrequired
        Pattern^0x[0-9a-f]{64}$
        Example0x77b909b550ed11c45f1378c03c0954c0d77d320cdc938e35509564b1e505ce0d
      • parchPendingstringrequired

        PARCHMENT forfeit rewards owed at now_ms, paid on the next stake, unstake or claim.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1500000000000n
      • pendingRewardstringrequired

        Rewards claimable at nowMs.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example100000000n
      • pendingRewardExactbooleanrequired

        False when pending_reward is an estimate until the owner's debt is re-based.

      • rewardDebtstringrequired

        A plain decimal string (too large for an n-suffixed integer).

        Example1250318874012553600000000
      • stakedstringrequired
        Pattern^-?(0|[1-9][0-9]*)n$
        Example25000000000000n
      • stakedAtMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • totalWeightstringrequired

        staked + lockedWeight: the owner's share of the USDC reward index.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example25000000000000n
      • unlockAtMsstringrequired

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

application/json
{
  "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

get/stats/staking-history

Query parameters

  • daysstringrequired

    Required. 7, 30, 90 or all; 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

    • dataStakingHistoryrequired

      The window's staking APR/APY, its inputs and the snapshots it was computed from. Rates are x 1e18 (aprWad 1e17 is 10%).

      • annualizedbooleanrequired

        True only when a partial window produced an APR (scaled from a shorter span).

      • aprWadstring | null

        APR x 1e18; null without a stake, a span or a quote to value it.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example120000000000000000n
      • apyWadstring | null

        APY x 1e18 (the APR compounded); null with the APR.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example130000000000000000n
      • avgStakestringrequired

        Time-weighted stake over the window (PARCHMENT base units).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example25000000000000n
      • avgWeightstringrequired

        Time-weighted stake plus locked weight: the USDC rewards' denominator (the PARCHMENT drip's is avgStake).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example25000000000000n
      • dailyStakingDay[]required
      • daysstringrequired

        "7", "30", "90" or "all", as requested.

        Example7
      • fromMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • observedMsstringrequired

        Milliseconds.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchmentUsdSourcestring | null

        The quote's source identifier; null without a quote.

      • parchmentUsdTsMsstring | null

        When the quote was read; null without one.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • parchmentUsdWadstring | null

        The cached PARCHMENT/USD DEX quote: USD per whole PARCHMENT x 1e18; null without one.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example40000000000000000n
      • partialbooleanrequired

        No snapshot at or before the window start, or an empty observed span.

      • pointsStakingHistoryPoint[]required

        The snapshots in the window, ascending by time.

      • rewardParchmentstringrequired

        PARCHMENT vested to stakers over the window (base units, 9 decimals).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1500000000000n
      • rewardUsdcstringrequired

        USDC vested to stakers over the window (base units, 6 decimals).

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1850000000000n
      • toMsstringrequired

        The request time.

        Pattern^-?(0|[1-9][0-9]*)n$
        Example1796677200000n
      • windowMsstring | null

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

application/json
{
  "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"
  }
}