Get Yield Protocol Data

API function to get the yield protocol's network data across all cycles.

Endpoint Requirements

GET <api>/yield-data?network=<network>

Parameters

Name
Value
Required
Description

network

Network (devnet/testnet/mainnet)

true

The network to fetch data for.

Headers

Name
Value

Content-Type

"application/json"

ngrok-skip-browser-warning

"1"

Example Request

curl 'https://e8d6086d9d44.ngrok.app/yield-data?network=devnet' \
-H 'content-type: application/json' \
-H 'ngrok-skip-browser-warning: 1'

Example Response

[
  {
    "cycleId": 0,
    "nextCycleTenureHeight": 160,
    "participantsCount": 0,
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20,
    "cycleTotal": 0
  },
  {
    "cycleId": 1,
    "nextCycleTenureHeight": 280,
    "participantsCount": 2,
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20,
    "cycleTotal": 36000000000
  },
  {
    "cycleId": 2,
    "nextCycleTenureHeight": 400,
    "participantsCount": 2,
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20,
    "cycleTotal": 36004104000
  }
]

Last updated