Skip to main content

Overview

The players API provides access to player statistics, game participation history, and user profile management. Players are created when users participate in games by placing bids.

Get player PDAs

curl "https://api.solbid.com/api/pda?id=1"
Retrieves all player Program Derived Addresses (PDAs) for a specific game. Used for on-chain operations and player tracking.

Query parameters

id
string
required
Game ID to fetch player PDAs for

Response

message
string
Status message
players
array
Array of player PDA objects
{
  "message": "Player PDAs successfully",
  "players": [
    {
      "playerPda": "9xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsW",
      "playerId": 1
    },
    {
      "playerPda": "BxKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsX",
      "playerId": 2
    }
  ]
}

Get dashboard data

curl https://api.solbid.com/api/dashboard \
  -H "userId: 123"
Retrieves comprehensive dashboard data for a user including statistics, recent transactions, live games, and past games.

Headers

userId
string
required
Authenticated user’s ID

Response

metrics
object
User’s aggregate statistics
recentTransactions
array
Recent bid transactions
liveGames
array
Active games the user is participating in
pastGames
array
Completed games the user participated in
{
  "metrics": {
    "totalBids": 15,
    "highestBid": 5000000,
    "totalRoyalties": 250000,
    "totalAmount": 12000000
  },
  "recentTransactions": [
    {
      "id": "5",
      "gameId": "2",
      "amount": 2000000,
      "timestamp": "2026-03-02T21:30:00.000Z",
      "txId": "5j7s8K9mN3pQ4rT6vW8xY2zA1bC3dE4fG5hI6jK7lM8nO9pQ0r",
      "bidCount": 3
    }
  ],
  "liveGames": [
    {
      "gameId": "2",
      "highestBid": 3000000,
      "totalBids": 8,
      "lastBidTime": "2026-03-02T21:45:00.000Z",
      "prizePool": 15000000,
      "userBidAmount": 2000000,
      "userBidCount": 3
    }
  ],
  "pastGames": [
    {
      "gameId": "1",
      "totalAmount": 5000000,
      "totalRoyalty": 100000,
      "endTime": "2026-03-01T18:00:00.000Z"
    }
  ]
}
The dashboard endpoint aggregates data from the user’s player records across all games.

Update profile

curl -X POST https://api.solbid.com/api/profile \
  -H "userId: 123" \
  -F "username=PlayerOne" \
  -F "[email protected]"
Updates a user’s profile information including username and profile image. Images are uploaded to Cloudinary.

Headers

userId
string
required
Authenticated user’s ID

Request body (multipart/form-data)

username
string
New username (2-20 characters)
file
file
Profile image file (uploaded to Cloudinary)
At least one of username or file must be provided.

Response

message
string
Success message
url
string
Cloudinary URL of the uploaded image (if file was provided)
{
  "message": "Image uploaded successfully",
  "url": "https://res.cloudinary.com/demo/image/upload/v1234567890/Solbid/avatar.jpg"
}
Profile images are stored in the ‘Solbid’ folder on Cloudinary.

Build docs developers (and LLMs) love