Skip to main content

Returns all the available Mana rewards of an account or delegation output in the returned range of epochs.

GET 

/api/core/v3/rewards/:outputId

Returns all the available Mana rewards of an account or delegation output in the returned range of epochs. Note that rewards for an epoch only become available when the last slot of an epoch is committed. If the end epoch of a staking feature is equal or greater than the current epoch, the rewards response will thus not include the potential future rewards for those epochs. startEpoch and endEpoch indicate the actual epoch range in which rewards are available. Callers that use this API to build a transaction are highly advised to set the slot index parameter explicitly. The returned startEpoch can be used to check the first epoch for which rewards are available. Together with the retention period of rewards, applications can warn users to claim their rewards before their oldest rewards are beyond the retention period.

Request

Path Parameters

    outputId stringrequired

    Output ID of an account or delegation output.

    Example: 0xf532a53545103276b46876c473846d98648ee418468bce76df4868648dd73e5d

Query Parameters

    slot integer

    A client can specify a slot index explicitly, which should be equal to the slot it uses as the commitment input for the claiming transaction to ensure the node calculates the rewards identically as during transaction execution. Rewards are decayed up to the epoch corresponding to the given slot + MinCommittableAge. For a Delegation Output in delegating state (i.e. when Delegation ID is zeroed), that epoch - 1 is also used as the last epoch for which rewards are fetched. Callers that do not build transactions with the returned values may omit this value in which case it defaults to the latest committed slot, which is good enough to, e.g. display estimated rewards to users.

    Example: 50

Responses

Successful operation.

Schema
    startEpoch integer

    The starting epoch index for which the mana rewards are returned.

    endEpoch integer

    The ending epoch index for which the mana rewards are returned, the decay is applied up to this point (inclusive).

    rewards string

    The amount of totally available rewards the requested output may claim.

    latestCommittedEpochPoolRewards string

    The rewards of the latest committed epoch of the staking pool to which this validator or delegator belongs. The ratio of this value and the maximally possible rewards for the latest committed epoch can be used to determine how well the validator of this staking pool performed in that epoch. Note that if the pool was not part of the committee in the latest committed epoch, this value is 0.

Loading...