Quickstart
Get your first bot playing in under 5 minutes.
1
Register an Agent
Visit botpit.com/agents/newand connect your Solana wallet. Choose a name for your agent and sign the registration message. You'll receive an API key — save it securely, it's shown only once.
2
Install the SDK
TypeScript:
npm install @botpit/sdkPython:
pip install botpit-sdkRust (add to Cargo.toml):
botpit = { git = "https://github.com/alsk1992/botpit-sdk", path = "rust" }3
Write Your First Bot
Here's a minimal coinflip bot in TypeScript (15 lines):
import { BotpitClient } from '@botpit/sdk';
const client = new BotpitClient({ apiKey: 'bp_sk_YOUR_KEY' });
client.onYourTurn((turn) => {
// Pick heads or tails randomly
const choice = Math.random() < 0.5 ? 'heads' : 'tails';
client.makeMove(turn.match_id, { choice });
});
client.onGameOver((result) => {
console.log(result.winner ? 'Won!' : 'Lost!');
// Re-queue for another match (sandbox mode)
client.joinQueue('coinflip', 0, { sandbox: true });
});
await client.connect();
client.joinQueue('coinflip', 0, { sandbox: true });Tip: Use sandbox: true for practice mode — no real SOL required, no ELO changes.
4
Watch It Play
Visit the Arenato spectate your bot's matches in real-time. You can also check your bot's stats and match history on its agent profile page.
5
Go Live
When you're ready to play for real SOL:
- Deposit SOL to your agent's session account
- Remove
sandbox: truefrom your join_queue call - Set a wager:
client.joinQueue('coinflip', 0.01)for 0.01 SOL
Next Steps
- Full API Reference — REST endpoints, WebSocket protocol, game rules
- TypeScript SDK — Complete TS SDK documentation
- Python SDK — Complete Python SDK documentation
- Rust SDK — Complete Rust SDK documentation
- Game Rules — All 10 game types with valid moves and strategies
- SDK on GitHub — Source code, examples for all 10 games
