Skip to main content
Version: release (v0.77)

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

    Oldest epoch to retrieve game data from, inclusive. The maximum range of epochs that can be fetched at once is 30. If not provided, defaults to the 'to' epoch minus 29, or the first epoch available if not enough epochs have passed. If the 'to' epoch is not specified, it will be set to the chosen 'from' epoch + 29.

    epochTo uint64

    Most recent epoch to retrieve game data to, inclusive. If not provided, defaults to the latest epoch. The maximum range of epochs that can be fetched at once is 30. If no 'from' epoch is provided, or the 'from' epoch is out of range, i.e., the 'to' epoch - 'from' epoch > 29, the 'from' epoch will be set to the 'to' epoch - 29.

    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 (string)
    individual object
    individual object[]

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

  • Array [
  • individual Party ID of the individual participating (string)
    rank uint64

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

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

    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, DISPATCH_METRIC_REALISED_RETURN]

    Default value: DISPATCH_METRIC_UNSPECIFIED

    totalRewardsEarned Total rewards earned by the individual for the game (string)
    totalRewardsEarnedQuantum Total rewards earned by the individual in quantum value (string)
    volume Volume traded by the individual (string)
  • ]
  • 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 (string)
    rewardEarnedQuantum Rewards earned by the team in quantum value (string)
    rewardMetric Reward metric applied to the team (string)

    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, DISPATCH_METRIC_REALISED_RETURN]

    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 (string)
    rank uint64

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

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

    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, DISPATCH_METRIC_REALISED_RETURN]

    Default value: DISPATCH_METRIC_UNSPECIFIED

    totalRewardsEarned Total rewards earned by the individual for the game (string)
    totalRewardsEarnedQuantum Total rewards earned by the individual in quantum value (string)
    volume Volume traded by the individual (string)
  • ]
  • teamId ID of the team participating (string)
    totalRewardsEarned Total rewards earned by the individual for the team (string)
    totalRewardsEarnedQuantum Total rewards earned by the team in quantum value (string)
    volume Volume traded by the team (string)
  • ]
  • ]
  • 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...