DexterDexter

DexterAPI 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).

{
  "success": true,
  "status": "healthy",
  "version": "1.0.0"
}

GET /api/v1/ping

Simple ping (no auth required).

{ "pong": true }

Wallet Endpoints

POST /api/v1/wallet/connect

Connect a Solana wallet.

Body:

{ "address": "7xKX...AsU" }

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:

{
  "targetUserId": "gary",
  "amount": 10,
  "format": "gen9randombattle"
}

POST /api/v1/wager/accept

Accept an incoming challenge.

Body:

{ "challengerId": "ash" }

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

VariableRequiredDefaultDescription
SOLANA_RPC_URLNomainnetSolana RPC endpoint
HOUSE_CUT_PERCENTNo5House fee percentage
MIN_WAGER_USDNo1Minimum wager
MAX_WAGER_USDNo25Maximum wager

Error Codes

CodeMessage
WALLET_NOT_CONNECTEDYou must connect a wallet first
INVALID_ADDRESSInvalid Solana address format
USER_NOT_FOUNDUser not found or offline
SELF_WAGERYou can't wager against yourself
AMOUNT_OUT_OF_RANGEWager amount out of allowed range

Next Steps