API Endpoints
Base URL: https://your-domain.com/casino
All requests that require authentication must include Authorization: Bearer <token>.
Public endpoints
GET /health
Returns service health status. No auth required.
GET /wallet-address
Returns the casino treasury wallet address.
{ "address": "ABC123..." }GET /public/whitelabel
Returns the platformโs public branding configuration.
{
"title": "My Casino",
"logoUrl": "https://...",
"accentColor": "#3b82f6"
}GET /recent-bets
Returns the public recent bets feed (last 20 bets across all users).
Player endpoints (require auth)
POST /auth/login
Authenticate via Sign-In-With-Solana. See Authentication.
GET /balance
Returns all token balances for the authenticated user.
{
"balances": [
{ "token": "So11111...", "balance": 1000000 }
]
}POST /deposit
Register an on-chain deposit.
| Field | Type | Required | Description |
|---|---|---|---|
signature | string | โ | Solana transaction signature |
token | string | โ | SPL token mint address |
POST /withdraw
Request a withdrawal. Debits immediately; pending admin approval.
| Field | Type | Required | Description |
|---|---|---|---|
amount | number | โ | Amount in base units (lamports for SOL) |
token | string | โ | SPL token mint |
destination | string | โ | Destination wallet address |
GET /account/transactions
Returns ledger of deposits, withdrawals, and balance adjustments.
| Query | Type | Description |
|---|---|---|
page | number | Page number (default 1) |
limit | number | Per page (default 20, max 100) |
POST /play
Play a game round.
| Field | Type | Required | Description |
|---|---|---|---|
gameType | string | โ | Game identifier (e.g. slots, crash) |
wager | number | โ | Wager in base units |
token | string | โ | SPL token mint |
config | object | โ | Game-specific config |
GET /history
Returns the userโs game history.
GET /seed
Returns the server seed (hashed) and current nonce for provably fair verification.
POST /legacy/launch
Launch a Pragmatic Play or PGSoft game via Seamless mode.
| Field | Type | Required | Description |
|---|---|---|---|
gameCode | string | โ | Provider game code |
userCode | string | โ | Platform user identifier |
language | string | โ | ISO language code (default: pt) |
Returns { "url": "https://..." } โ redirect the user to this URL.
Admin endpoints (require admin role)
All admin endpoints require Authorization: Bearer <token> where the wallet has at least admin:read permission.
GET /admin/me
Returns the current walletโs role, access level, and permissions.
{
"wallet": "ABC...",
"role": "superadmin",
"level": 1,
"permissions": ["admin:read", "admin:write", "..."],
"agentCode": null
}GET /admin/overview
Returns platform summary (games, transactions, balances).
GET /admin/metrics/ggr-daily
Returns daily GGR metrics.
| Query | Description |
|---|---|
days | Number of days to return (default 30) |
GET /admin/games
Returns game history with filters.
GET /admin/transactions
Returns all transactions (deposits/withdrawals).
PATCH /admin/balances/:user
Adjust a userโs balance (requires balances:write).
POST /admin/withdraw/approve
Approve a pending withdrawal (requires withdraw:approve).
POST /admin/withdraw/reject
Reject a pending withdrawal (requires withdraw:reject).
GET /admin/legacy/agents
List all legacy agents (operators).
POST /admin/legacy/agents
Create a new agent.
PATCH /admin/legacy/agents/:id
Update an agent (status, RTP, site endpoint, etc.).
DELETE /admin/legacy/agents/:id
Delete an agent.
GET /admin/provider-games
List game catalog from all providers.
PATCH /admin/provider-games/:gameCode
Enable or disable a game.
PATCH /admin/whitelabel
Update whitelabel branding (requires whitelabel:write).