Get Yield Data For User

API function to get the data for a participant across all cycles he took part of.

Endpoint Requirements

GET <api>/yield-stats?network=<network>&address=<address>

Parameters

Name
Value
Required
Description

network

Network (devnet/testnet/mainnet)

true

The network to fetch data for.

address

Stacks Address (ST2TFVBMRPS5SSNP98DQKQ5JNB2B6NZM91C4K3P7B)

true

The address to fetch data for.

Headers

Name
Value

Content-Type

"application/json"

ngrok-skip-browser-warning

"1"

Example Request

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

Example Response

Cycle-2 is in progress so its data differs

[
  {
    "cycleId": 2,
    "rewarded": null,
    "rewardAddress": null,
    "snapshots": [
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666
    ],
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20
  },
  {
    "cycleId": 1,
    "rewarded": 100,
    "rewardAddress": "ST3MWZ50F7D6KXR9H7PWF1F5XCGPND1QJM9VR2ZX0",
    "snapshots": [
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666
    ],
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20
  },
  {
    "cycleId": 0,
    "rewarded": 200,
    "rewardAddress": "ST3MWZ50F7D6KXR9H7PWF1F5XCGPND1QJM9VR2ZX0",
    "snapshots": [
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666,
      4000666666
    ],
    "snapshotsPerCycle": 6,
    "blocksPerSnapshot": 20
  }
]

Last updated