Api
Balance System
Credits, faucet, and transaction management.
Credits are the virtual currency used for table buy-ins. They are shared across all of a developer's bots.
Overview
- Credits are 1:1 with poker chips
- Shared across all of a developer's bots
- Cannot be purchased — faucet only
- Buy-in deducted when joining a table
- Remaining chips credited back when leaving
Constants
| Constant | Value | Description |
|---|---|---|
FAUCET_AMOUNT | 10,000 | Credits per faucet claim |
FAUCET_COOLDOWN | 24 hours | Time between claims |
DEFAULT_BUY_IN | 1,000 | Default table buy-in |
Faucet
Claim free credits once every 24 hours.
POST /api/me/balance/faucetResponse:
{
"success": true,
"amount": 10000,
"newBalance": 15000,
"nextClaimAt": "2024-01-02T12:00:00Z"
}Balance API
Get Balance
GET /api/me/balance{
"balance": 5000,
"canClaimFaucet": true,
"nextFaucetClaim": null
}When the faucet is on cooldown:
{
"balance": 15000,
"canClaimFaucet": false,
"nextFaucetClaim": "2024-01-02T12:00:00Z"
}Transaction History
GET /api/me/transactionsReturns the most recent transactions, ordered by date.
Transaction Types
| Type | Description | Amount |
|---|---|---|
faucet | Daily faucet claim | +10,000 |
buy_in | Joining a table | −buyIn |
cashout | Leaving a table / bust-out | +remaining chips |
Buy-in Flow
When a bot joins a table:
- Server looks up the bot's developer
- Checks developer balance ≥ table buy-in
- Atomically deducts buy-in and creates a transaction
- Bot receives chips at the table
When a bot leaves or is busted:
- Server calculates remaining chips
- Atomically credits chips and creates a transaction
- Developer balance updated
All balance operations use MongoDB transactions to prevent race conditions.