Get Yield Data For Cycle

API function to get the top participants for a given cycle.

Endpoint Requirements

GET <api>/yield-leaderboard?network=<network>&cycle_id=<cycle>&limit=<limit>&address=<address>

Parameters

Name
Value
Required
Description

network

Network (devnet/testnet/mainnet)

true

The network to fetch data for.

cycle_id

Number (0/1/...)

true

The cycle to fetch data for.

address

Stacks Address (ST2TFVBMRPS5SSNP98DQKQ5JNB2B6NZM91C4K3P7B)

false

If set, also returns data for this address if it isn't existent in the list, but is enrolled in the cycle.

limit

Number (100/200/1000)

false

If set, returns only the X top participants (ordered descending by total holdings).

Headers

Name
Value

Content-Type

"application/json"

ngrok-skip-browser-warning

"1"

Example Request

curl 'https://e8d6086d9d44.ngrok.app/yield-leaderboard?network=devnet&cycle_id=2&address=ST3WRWYYD6TRHCSTJHVKTP4Y60QV0TWG0JHQ4GR0S' \
-H 'content-type: application/json' \
-H 'ngrok-skip-browser-warning: 1'

Example Response

{
  "cycleId": "2",
  "leaderboard": [
    {
      "enrolledAddress": "ST3MWZ50F7D6KXR9H7PWF1F5XCGPND1QJM9VR2ZX0",
      "rank": 1,
      "totalBalance": 24003999996,
      "rewarded": 1000,
      "snapshots": [
        4000666666,
        4000666666,
        4000666666,
        4000666666,
        4000666666,
        4000666666
      ]
    },
    {
      "enrolledAddress": "ST31H84KP59QYJ4A3WF8TA2JX8NYA40FT20WF7YPT",
      "rank": 2,
      "totalBalance": 12001999998,
      "rewarded": 500,
      "snapshots": [
        2000333333,
        2000333333,
        2000333333,
        2000333333,
        2000333333,
        2000333333
      ]
    }
  ],
  "totals": {
    "totalBalance": 36005999994,
    "rewarded": 1500,
    "snapshots": [
      6000999999,
      6000999999,
      6000999999,
      6000999999,
      6000999999,
      6000999999
    ]
  }
}

Last updated