Skip to main content
Version: mainnet (v0.75)

List games

GET 

/api/v2/games

Get a list of games and corresponding game data, given the provided filters

Request

Query Parameters

    gameId string

    Game ID to filter for.

    epochFrom uint64

    First epoch to retrieve game data from. If not provided, defaults to the last epoch minus 30, or the first epoch available if not enough epochs have passed.

    epochTo uint64

    Last epoch to retrieve game data to (inclusive). If not provided, defaults to the last epoch.

    entityScope string

    Possible values: [ENTITY_SCOPE_UNSPECIFIED, ENTITY_SCOPE_INDIVIDUALS, ENTITY_SCOPE_TEAMS]

    Default value: ENTITY_SCOPE_UNSPECIFIED

    Entity scope to filter games for, i.e. team games or individual games only.

    • ENTITY_SCOPE_INDIVIDUALS: Rewards must be distributed directly to eligible parties.
    • ENTITY_SCOPE_TEAMS: Rewards must be distributed to directly eligible teams, and then amongst team members
    pagination.first int32

    Number of records to be returned that sort greater than row identified by cursor supplied in 'after'.

    pagination.after string

    If paging forwards, the cursor string for the last row of the previous page.

    pagination.last int32

    Number of records to be returned that sort less than row identified by cursor supplied in 'before'.

    pagination.before string

    If paging forwards, the cursor string for the first row of the previous page.

    pagination.newestFirst boolean

    Whether to order the results with the newest records first. If not set, the default value is true.

    teamId string

    Team ID to filter for. This filter will only be applied if entity scope is not specified in the request, or the entity scope is set to teams.

    partyId string

    Party ID to filter for. This filter will apply regardless of the entity scope. If the entity scope filter is teams, then the party ID filter will apply to team members.

Responses

A successful response.

Schema
    games object

    Page of games data and corresponding page information.

    edges object[]

    Page of games data and their corresponding cursors.

  • Array [
  • cursor string

    Cursor that can be used to fetch further pages.

    node object

    Game data.

    epoch uint64

    Epoch at which the last game metrics were captured.

    id Unique ID of the game
    individual object
    individual object[]

    List of individual party IDs, and the metrics associated with each participant.

  • Array [
  • individual Party ID of the individual participating
    rank uint64

    Rank of the individual either in the game or within their team.

    rewardEarned Reward earned by the individual during the epoch
    rewardEarnedQuantum Rewards earned by the individual in quantum value
    rewardMetric Reward metric applied to the individual

    Possible values: [DISPATCH_METRIC_UNSPECIFIED, DISPATCH_METRIC_MAKER_FEES_PAID, DISPATCH_METRIC_MAKER_FEES_RECEIVED, DISPATCH_METRIC_LP_FEES_RECEIVED, DISPATCH_METRIC_MARKET_VALUE, DISPATCH_METRIC_AVERAGE_POSITION, DISPATCH_METRIC_RELATIVE_RETURN, DISPATCH_METRIC_RETURN_VOLATILITY, DISPATCH_METRIC_VALIDATOR_RANKING]

    Default value: DISPATCH_METRIC_UNSPECIFIED

    totalRewardsEarned Total rewards earned by the individual for the game
    totalRewardsEarnedQuantum Total rewards earned by the individual in quantum value
    volume Volume traded by the individual
  • ]
  • participants uint64

    The number of participants in the game.

    rewardAssetId string

    ID of the asset rewarded for involvement in the game.

    team object
    team object[]

    List of teams, the participant members of a team, and the metrics associated with each participant.

  • Array [
  • rank uint64
    rewardEarned Reward earned by the team
    rewardEarnedQuantum Rewards earned by the team in quantum value
    rewardMetric Reward metric applied to the team

    Possible values: [DISPATCH_METRIC_UNSPECIFIED, DISPATCH_METRIC_MAKER_FEES_PAID, DISPATCH_METRIC_MAKER_FEES_RECEIVED, DISPATCH_METRIC_LP_FEES_RECEIVED, DISPATCH_METRIC_MARKET_VALUE, DISPATCH_METRIC_AVERAGE_POSITION, DISPATCH_METRIC_RELATIVE_RETURN, DISPATCH_METRIC_RETURN_VOLATILITY, DISPATCH_METRIC_VALIDATOR_RANKING]

    Default value: DISPATCH_METRIC_UNSPECIFIED

    team object

    Breakdown of a team's participation in a game.

    membersParticipating object[]
  • Array [
  • individual Party ID of the individual participating
    rank uint64

    Rank of the individual either in the game or within their team.

    rewardEarned Reward earned by the individual during the epoch
    rewardEarnedQuantum Rewards earned by the individual in quantum value
    rewardMetric Reward metric applied to the individual

    Possible values: [DISPATCH_METRIC_UNSPECIFIED, DISPATCH_METRIC_MAKER_FEES_PAID, DISPATCH_METRIC_MAKER_FEES_RECEIVED, DISPATCH_METRIC_LP_FEES_RECEIVED, DISPATCH_METRIC_MARKET_VALUE, DISPATCH_METRIC_AVERAGE_POSITION, DISPATCH_METRIC_RELATIVE_RETURN, DISPATCH_METRIC_RETURN_VOLATILITY, DISPATCH_METRIC_VALIDATOR_RANKING]

    Default value: DISPATCH_METRIC_UNSPECIFIED

    totalRewardsEarned Total rewards earned by the individual for the game
    totalRewardsEarnedQuantum Total rewards earned by the individual in quantum value
    volume Volume traded by the individual
  • ]
  • teamId ID of the team participating
    totalRewardsEarned Total rewards earned by the individual for the team
    totalRewardsEarnedQuantum Total rewards earned by the team in quantum value
    volume Volume traded by the team
  • ]
  • ]
  • pageInfo object

    Page information that is used for fetching further pages.

    endCursor string

    End cursor.

    hasNextPage boolean

    Indicator if there is a next page.

    hasPreviousPage boolean

    Indicator if there is a previous page.

    startCursor string

    Start cursor.

Loading...