Skip to main content

Website API

Base URL: https://www.pinestake.com/api

These are Next.js App Router handlers shipped with the Pine-Stake/web site. They power /calendar, the profit calculator, and pool on-chain overlays.

Epoch & calendar

GET /api/epoch/history

All-epochs wall-clock history (Pine’s analogue of Stakewiz all_epochs_history), baked from anchors (genesis, Stakewiz, validators.app, manual tweets, downtime adjustments, Solana Beach CU, …).

QueryDescription
(none)Full list from epoch 0
epoch=NSingle epoch
from=A&to=BInclusive range
compact=1Slim Stakewiz-like fields only
curl -s "https://www.pinestake.com/api/epoch/history?epoch=100" | jq '.epoch'

Example epoch fields: epoch, start, end, startMs, endMs, duration_seconds, durationHours, firstSlot, lastSlot, slotsInEpoch, avgSlotMs, avgSlotMsRaw, avgCuPerBlock, downtimeMs, hasDowntime, source.

Response also includes metadata: version, generatedAt, genesisMs, slotsPerEpoch, sources, epochCount, minEpoch, maxEpoch.

GET /api/epoch/duration

Completed-epoch durations for the duration chart, plus current epoch id and attached outage / degradation lists.

curl -s https://www.pinestake.com/api/epoch/duration | jq '{currentEpoch, n: (.epochs|length)}'

GET /api/epoch/timestamps

Resolve wall-clock bounds for epochs (calendar month/year views, converters).

QueryDescription
epoch=100Single epoch
epochs=98,99,100Batch
startMs=&endMs=Epochs overlapping a UTC millisecond range

GET /api/epoch/incidents

Mainnet Beta outages and degradations used on the calendar and duration chart.

{
"outages": [{ "id": "...", "name": "...", "startMs": 0, "endMs": 0, "url": "...", "kind": "outage" }],
"degradations": [{ "id": "...", "name": "...", "startMs": 0, "endMs": 0, "url": "...", "kind": "degradation" }]
}

Feature gates

GET /api/feature-gates

Solana Foundation explorer feature list, enriched with on-chain activation status / slot (revalidated ~5 minutes).

curl -s https://www.pinestake.com/api/feature-gates | jq '.stats'
{
"features": [{
"key": "<feature pubkey>",
"title": "...",
"mainnet_activation_epoch": 727,
"onChainActivationSlot": 314064000,
"onChainStatus": "activated"
}],
"source": "https://raw.githubusercontent.com/solana-foundation/explorer/...",
"stats": { "activated": 74, "pending": 20, "probed": 94 }
}

Network helpers

GET /api/solana/inflation

Live inflation + implied staking yield before commission:

FieldDescription
total, validator, foundationInflation %
totalSupplySol, totalStakedSol, stakeRatioPctSupply / stake
stakingYieldvalidator / (staked/supply)

GET /api/solana/stake-pool-totals

On-chain SPL stake-pool account metadata keyed by withdraw authority (poolAddress, validatorList, reserveStake, poolMint, totalLamports, …). Used to overlay live pool totals and validator-list stakes on pool pages.

GET /api/trillium/mev

Recency-weighted Trillium rewards summary for the profit calculator:

FieldDescription
pineMevPerBlockPine MEV tips / block (SOL)
networkAvgMevPerBlockNetwork average
pineVoteCostPerEpoch / networkAvgVoteCostPerEpochVote cost (SOL / epoch)
byVote / byIdentityPer-validator MEV maps

Cached ~30 minutes.

Other website routes

These support product flows (not general data APIs):

RoutePurpose
GET /api/quoteSwap quote helper for staking terminal
POST /api/jupiter-swapJupiter swap proxy
POST /api/recaptchareCAPTCHA verification
GET /api/validator-rewardsSanctum / pSOL reward helper