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, …).
| Query | Description |
|---|---|
| (none) | Full list from epoch 0 |
epoch=N | Single epoch |
from=A&to=B | Inclusive range |
compact=1 | Slim 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).
| Query | Description |
|---|---|
epoch=100 | Single epoch |
epochs=98,99,100 | Batch |
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:
| Field | Description |
|---|---|
total, validator, foundation | Inflation % |
totalSupplySol, totalStakedSol, stakeRatioPct | Supply / stake |
stakingYield | ≈ validator / (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:
| Field | Description |
|---|---|
pineMevPerBlock | Pine MEV tips / block (SOL) |
networkAvgMevPerBlock | Network average |
pineVoteCostPerEpoch / networkAvgVoteCostPerEpoch | Vote cost (SOL / epoch) |
byVote / byIdentity | Per-validator MEV maps |
Cached ~30 minutes.
Other website routes
These support product flows (not general data APIs):
| Route | Purpose |
|---|---|
GET /api/quote | Swap quote helper for staking terminal |
POST /api/jupiter-swap | Jupiter swap proxy |
POST /api/recaptcha | reCAPTCHA verification |
GET /api/validator-rewards | Sanctum / pSOL reward helper |