API Reference
REST API endpoints for PokeDexter integrations.
API Reference
Most users interact with PokeDexter through chat commands. This API reference is for developers building integrations.
Base URL: https://poke.dexter.cash/api/v1
Health & Status
GET /api/v1/health
Health check (no auth required).
GET /api/v1/ping
Simple ping (no auth required).
Wallet Endpoints
POST /api/v1/wallet/connect
Connect a Solana wallet.
Body:
GET /api/v1/wallet
Get your connected wallet info.
DELETE /api/v1/wallet
Disconnect your wallet.
Wager Endpoints
POST /api/v1/wager/challenge
Create a new wager challenge.
Body:
POST /api/v1/wager/accept
Accept an incoming challenge.
Body:
POST /api/v1/wager/decline
Decline an incoming challenge.
GET /api/v1/wager/challenges
Get your pending challenges (incoming and outgoing).
GET /api/v1/wager/active
Get your current active wager.
GET /api/v1/wager/:wagerId
Get wager details by ID.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SOLANA_RPC_URL | No | mainnet | Solana RPC endpoint |
HOUSE_CUT_PERCENT | No | 5 | House fee percentage |
MIN_WAGER_USD | No | 1 | Minimum wager |
MAX_WAGER_USD | No | 25 | Maximum wager |
Error Codes
| Code | Message |
|---|---|
WALLET_NOT_CONNECTED | You must connect a wallet first |
INVALID_ADDRESS | Invalid Solana address format |
USER_NOT_FOUND | User not found or offline |
SELF_WAGER | You can't wager against yourself |
AMOUNT_OUT_OF_RANGE | Wager amount out of allowed range |

API Reference