๐ŸŒ™ Moonray Quest API

Public API for accessing Moonray Quest match results and leaderboard data

๐Ÿ“‹ Table of Contents

๐Ÿ” Overview

The Moonray Quest API provides public access to match results for building leaderboards, statistics dashboards, and other third-party integrations. This API is read-only and designed for external consumption.

Public API: All endpoints are publicly accessible and do not require authentication. User data is anonymized with deterministic unique identifiers to protect privacy while maintaining consistency for tracking purposes.

๐Ÿ“Š Match Results API

GET /api/v2/mnry/quest/matches/results
Retrieve public match results for completed Moonray Quest matches with declared winners. Perfect for building leaderboards, player statistics, and match history displays.

Query Parameters

Parameter Type Description
limit number Maximum number of matches to return (default: 50, max: 100)
offset number Number of matches to skip for pagination (default: 0)
mode string Filter by game mode (e.g., "duel", "deathmatch")
map string Filter by map identifier
region string Filter by region
winnerUniqueId string Filter by winner's unique identifier

Example Response

{ "matches": [ { "gameId": "123e4567-e89b-12d3-a456-426614174000", "name": "Arena Championship Final", "mode": "duel", "map": "facility_alpha", "region": "us-east", "wagerMNRY": 25.5, "maxPlayers": 2, "creator": { "userUniqueId": "usr_a1b2c3d4e5f6", "userName": "ProGamer123" }, "participants": [ { "userUniqueId": "usr_a1b2c3d4e5f6", "userName": "ProGamer123" }, { "userUniqueId": "usr_f6e5d4c3b2a1", "userName": "SkillMaster" } ], "winners": [ { "userUniqueId": "usr_f6e5d4c3b2a1", "userName": "SkillMaster" } ], "resultDetails": { "score": "15-12", "duration": 847, "kills": { "usr_f6e5d4c3b2a1": 15, "usr_a1b2c3d4e5f6": 12 } }, "completedAt": "2024-01-15T18:30:00.000Z", "createdAt": "2024-01-15T18:00:00.000Z" } ], "pagination": { "total": 1247, "limit": 50, "offset": 0, "hasMore": true } }

๐Ÿ“‹ Data Models

Match Result Object

Field Type Description
gameId string Unique identifier for the match
name string Display name of the match
mode string Game mode (e.g., "duel", "deathmatch")
map string Map identifier where the match was played
region string Geographic region of the match
wagerMNRY number Wager amount in MNRY tokens
maxPlayers number Maximum number of players allowed in the match
creator User Match creator information
participants User[] Array of all match participants
winners User[] Array of match winners (supports team matches)
resultDetails object Match statistics and results (varies by game mode)
completedAt string ISO 8601 timestamp when match completed
createdAt string ISO 8601 timestamp when match was created

User Object

Field Type Description
userUniqueId string Deterministic hash-based unique identifier for the user
userName string Public display name of the user
Privacy Note: The userUniqueId is a deterministic hash of the internal user ID, ensuring consistent identification across API calls while protecting user privacy. This allows for proper leaderboard tracking without exposing sensitive data.

โšก Rate Limiting & Usage

Rate Limits

Response Headers

All responses include rate limiting headers:

Error Responses

Rate Limit Exceeded (429)

{ "error": { "code": "RATE_LIMIT_EXCEEDED", "message": "Too many requests. Please try again later.", "retryAfter": 60 } }

Invalid Request (400)

{ "error": { "code": "INVALID_PARAMETER", "message": "Invalid limit parameter. Must be between 1 and 100.", "parameter": "limit" } }

๐Ÿš€ Getting Started

Ready to build with the Moonray Quest API? Here's a simple example to get you started:

JavaScript Example

// Fetch recent match results fetch('/api/v2/mnry/quest/matches/results?limit=10') .then(response => response.json()) .then(data => { console.log(`Found ${data.pagination.total} total matches`); data.matches.forEach(match => { const winnerNames = match.winners.map(w => w.userName).join(', '); console.log(`${match.name}: ${winnerNames} won ${match.wagerMNRY} MNRY`); }); }); // Build a leaderboard by wins const leaderboard = {}; data.matches.forEach(match => { match.winners.forEach(winner => { const winnerId = winner.userUniqueId; leaderboard[winnerId] = (leaderboard[winnerId] || 0) + 1; }); }); console.log('Top winners:', leaderboard);