Overview
The games API manages the lifecycle of SolBid auction games. Each game tracks bids, players, prize pools, and game state on the Solana blockchain. All game-related endpoints return comprehensive game data including player information and bid history.
Create game
curl -X POST https://api.solbid.com/api/game \
-H "Content-Type: application/json" \
-H "userId: 123" \
-d '{
"gameId": 1,
"initialBidAmount": 1000000,
"creatorPublicKey": "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU",
"gamePda": "8xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV",
"playerPda": "9xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsW",
"bidPda": "AxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsX",
"txId": "5j7s8K9mN3pQ4rT6vW8xY2zA1bC3dE4fG5hI6jK7lM8nO9pQ0r"
}'
Creates a new SolBid game with an initial bid. This endpoint initializes the game state, creates the first player record, and records the initial bid.
Authenticated user’s ID for authorization
Request body
Unique game identifier (positive integer)
Initial bid amount in lamports (positive integer)
Creator’s Solana wallet public key (base58 encoded)
Game’s Program Derived Address on Solana (base58 encoded)
Player’s Program Derived Address on Solana (base58 encoded)
Bid’s Program Derived Address on Solana (base58 encoded)
Solana transaction ID for the game creation
Response
Complete game information including players and bids Game’s Program Derived Address
Initial bid amount in lamports
Current highest bid amount
Timestamp of the last bid (ISO 8601)
Total number of bids in the game
Current prize pool amount
Whether the game has ended
Array of player objects with bid history Player’s wallet public key
Player’s Program Derived Address
Total amount bid by player
Number of bids made by player
Whether player’s position is safe
Player’s role (PLAYER, WINNER, or FINISHER)
User profile information (name, imageUrl)
200 Success
401 Unauthorized
400 Validation error
{
"message" : "Game created successfully" ,
"gameData" : {
"id" : 1 ,
"gameId" : "1" ,
"pda" : "8xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV" ,
"initialBidAmount" : 1000000 ,
"highestBid" : 1000000 ,
"lastBidTime" : "2026-03-02T20:30:00.000Z" ,
"totalBids" : 1 ,
"lastBidderId" : "AxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsX" ,
"prizePool" : 1000000 ,
"gameEnded" : false ,
"players" : [
{
"id" : 1 ,
"playerPubkey" : "7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU" ,
"pda" : "9xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsW" ,
"totalBidAmount" : 1000000 ,
"bidCount" : 1 ,
"royaltyEarned" : 0 ,
"safe" : false ,
"role" : "PLAYER" ,
"bid" : {
"id" : 1 ,
"pda" : "AxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsX" ,
"amount" : 1000000 ,
"timestamp" : "2026-03-02T20:30:00.000Z" ,
"txId" : "5j7s8K9mN3pQ4rT6vW8xY2zA1bC3dE4fG5hI6jK7lM8nO9pQ0r"
},
"user" : {
"id" : 123 ,
"name" : "Player1" ,
"imageUrl" : "https://example.com/avatar.jpg"
}
}
]
}
}
After game creation, the global game ID counter is incremented automatically.
Get game
curl "https://api.solbid.com/api/game?id=1"
Retrieves detailed information about a specific game, including all players and their bid history.
Query parameters
Database ID of the game to retrieve
Response
Complete game data See game object structure in “Create game” response
{
"game" : {
"gameData" : {
"id" : 1 ,
"gameId" : "1" ,
"pda" : "8xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV" ,
"initialBidAmount" : 1000000 ,
"highestBid" : 2000000 ,
"lastBidTime" : "2026-03-02T21:00:00.000Z" ,
"totalBids" : 5 ,
"lastBidderId" : "BxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsY" ,
"prizePool" : 6000000 ,
"gameEnded" : false ,
"players" : []
}
}
}
List all games
curl "https://api.solbid.com/api/game"
Retrieves a list of all games in the system.
Response
{
"message" : "Games data fetched" ,
"games" : [
{
"id" : 1 ,
"gameId" : "1" ,
"pda" : "8xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV" ,
"initialBidAmount" : 1000000 ,
"highestBid" : 2000000 ,
"totalBids" : 5 ,
"prizePool" : 6000000 ,
"gameEnded" : false
}
]
}
Get live games
curl "https://api.solbid.com/api/game/live"
Retrieves all games that are currently active (not ended).
Response
Array of active game objects
200 Success
404 No live games
{
"gameData" : [
{
"id" : 1 ,
"gameId" : "1" ,
"pda" : "8xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsV" ,
"initialBidAmount" : 1000000 ,
"highestBid" : 2000000 ,
"lastBidTime" : "2026-03-02T21:00:00.000Z" ,
"totalBids" : 5 ,
"prizePool" : 6000000 ,
"gameEnded" : false
}
]
}
Get current game ID
curl "https://api.solbid.com/api/gameid"
Retrieves the current game ID counter, used for creating new games.
Response
Current game ID counter value
This value is automatically incremented each time a new game is created.