Rewards Queries
In this section we describe the queries available for looking up rewards information.
- Query Reward Program By ID
- Query Reward Programs
- Query Claim Period Reward Distribution By ID
- Query Claim Period Reward Distributions
- Query Rewards By Address
Query Reward Program By ID
The QueryRewardProgramByID
query is used to obtain the content of a specific Reward Program.
Request
The id
is the unique identifier for the Reward Program.
Response
Query Reward Programs
The QueryRewardPrograms
query is used to obtain the content of all Reward Programs matching the supplied query_type
.
Request
The query_type
is used to filter on the Reward Program state. The following are a list of query_types
.
- ALL - All Reward Programs will be returned.
- PENDING - All Reward Programs that are in the
PENDING
state will be returned. - ACTIVE - All Reward Programs that are in the
STARTED
state will be returned. - OUTSTANDING - All Reward Programs that are either in the
PENDING
orSTARTED
state will be returned. - FINISHED - All Reward Programs that are in the
FINISHED
orEXPIRED
state will be returned.
Response
Query Claim Period Reward Distribution By ID
The QueryClaimPeriodRewardDistributionByID
query is used to obtain the content of a specific Claim Period Reward Distribution
.
Request
The reward_id
is a unique identifier for the Reward Program and the claim_id
is a unique identifier for the Reward Program's Claim Period.
Response
Query Claim Period Reward Distributions
The QueryClaimPeriodRewardDistributions
query is used to obtain the content of all Claim Period Reward Distributions
matching the supplied query_type
.
Request
The pagination
field is used to help limit the number of results.
Response
Query Rewards By Address
The QueryRewardsByAddress
query is used to obtain the status of the address' Reward Claims.
Request
The address
field is the bech32 address of the user to list Reward Claims for. The claim_status
is used to filter on the Reward Claim. The following are a list of claim_status
.
- ALL - All Reward Claims are returned.
- UNCLAIMABLE - All Reward Claims that are not yet eligible to be claimed.
- CLAIMABLE - All Reward Claims that are still eligible to be claimed.
- CLAIMED - All Reward Claims that have been claimed.
- EXPIRED - All Reward Claims that have expired.