Endpoints
A comprehensive list of endpoints exposed by our Tournaments API
Overview
Each Endpoint has a GET and a POST operation, the GET will generate a prepared transaction for the endpoint, complete with signatures from newly created accounts and our API signer. Next, this transaction must be signed by the caller and send back in a POST body. We will validate the transaction received via HTTP POST and forward this along to the Solana network.
AddEntryFeeAsReward
Transfer tokens collected by a Tournaments Entry Fee to the Reward Escrow, this enables the Entry Fee to be redistributed to tournament participants. This endpoint is only callable by a Tournament Authority.
AddReward
Transfer tokens from the Tournament Authority to the Reward Escrow. It's important to specify the Reward Amount with the correct decimal precision. This endpoint is only callable by a Tournament Authority.
Example: 1 $USDC would be a reward amount of "100000", USDC has 6 decimals of precision.
BanCheater
Revoke all tournament points gained by a detected cheater in a tournament. This endpoint is only callable by a Tournament Authority.
CreateRound
Create a new round of matches within a Tournament. For each new round, increment the Round Index by 1, the API uses the Participants per Round to determine the number of matches to create for a round. This endpoint is only callable by a Tournament Authority.
CreateTournament
Create a new Tournament, the creator mints a Tournament Authority token granting them full control over Tournament operations.
Specify a Name and a Tournament Size, optionally specify an Entry Fee and/or a Token Gate. The Name cannot be longer than 100 characters. The Size sets a limit on number of participants who can join, but this limit does not need to be reached to start the Tournament.
An Entry Fee requires a Mint and an Amount which each participant must pay to enter into your Tournament.
A Token Gate requires a Mint and an Amount which each participant must have in their Wallet to be eligible to enter into your Tournament.
DistributeReward
Distribute the tokens stored in a Tournament Reward Escrow to a Tournament Participant
EndMatch
Update the state of a Match to Ended. This endpoint is only callable by a Tournament Authority.
Before a winner of a match can be determined, the Match must be in the Ended State.
EndTournament
Update the state of the Tournament to Ended. This endpoint is only callable by a Tournament Authority.
When a Tournament is moved to Ended, no more Matches or Rounds can be created. Cheaters can still be detected and banned at this stage, this is where rewards would be distributed to eligible participants.
EnterMatch
Enter a Tournament Participant into a Match. This endpoint is only callable by a Tournament Authority.
The Tournament Authority is in control of which participants enter which Matches so that the Tournament Authority can control bracketing and matchmaking semantics.
EnterTournament
A participant uses this endpoint to enter into a tournament of their choice. If the tournament has an Entry Fee or Token Gate configured, the participant must pay or have in their wallet the necessary tokens.
FinalizeTournament
Finalize the results of a Tournament, all rewards have be distributed, cheaters banned and the results of the Tournament become immutable. This endpoint is only callable by a Tournament Authority.
GetMatch
Retrieve Match Details in JSON format
GetMatchesByRound
Retrieve all Matches of a particular Round in a tournament. Use the Round Index to select a particular round. Flip the finalized Boolean if you would like to selectively retrieve Matches which are finalized or not.
GetMatchParticipants
Retrieve all participants for a particular Match.
GetParticipantsForRound
Retrieve all participants who are eligible for a particular Round, regardless if they have entered a Match in that Round or not.
GetStandings
Retrieve current Tournament Standings sorted descending from most points awarded. For each Match win a participant is awarded 1 Tournament Point.
GetTournament
Retrieve Tournament Details in JSON format
SetMatchResult
Determine a Winner of an Ended Match and move the Match into the Finalized State. This endpoint is only callable by a Tournament Authority.
The Winner will receive 1 Point in their points token account. Tournaments uses the points to determine which participants are eligible to play in subsequent tournament rounds and for participants and managers to keep track of Tournament state.
Currently only 1 winner can be selected but we will make this endpoint more flexible to support multiple winners in the future.
StartMatch
Move a Match within a Tournament into the Started State, this signifies that the Match is beginning to be played out on chain, no other participants may enter this Match. This endpoint is only callable by a Tournament Authority.
StartTournament
Move a Tournament into the Started State, no more participants may enter the tournament and now it's possible to begin creating Tournament Rounds. This endpoint is only callable by a Tournament Authority.
Last updated