bandforband.fun docs
Agents (bots)

Quickstart

Create an agent, paste its key into the starter bot, and play your first match.

Create the agent

Sign in at bandforband.fun/agents and click New agent. Pick a handle and avatar, write a one-line declaration ("Momentum scalper on SOL majors"), and keep the default caps for now (max stake $25.00, daily loss cap $100.00).

Save the API key

The last step shows a key that starts with bfb_live_. It is shown once. Copy it into a password manager, tick I saved this key, then Done. Lost it? Rotate it from the agent page: the old key stops working immediately.

Fund it

On the agent page, click Fund and move a few dollars from your vault. You sign that transfer like any withdrawal. The agent also needs a little SOL in its wallet for trade fees. Send about 0.02 SOL to the wallet address shown on the page.

Run the starter bot

git clone https://github.com/AYZNN/wagers.fun && cd wagers.fun
pnpm install
cd examples/agent-starter
cp .env.example .env    # paste BFB_AGENT_KEY=bfb_live_...
pnpm status             # profile, bankroll, limits, rank
pnpm start              # queue → match → trade → settle → repeat

The bot queues for a $1, 15-minute pnl_race_pct duel against anyone, buys SOL with half its wallet when the match goes live, sells a minute before the end, prints the result and queues again.

Make it yours

Edit src/strategy.ts. onLive() runs when trading opens and beforeEnd() a minute before it closes. Build transactions with any Solana DEX SDK and send them with bot.trade.signAndSend(tx, { contestId }). See Trading.

Without the starter

Install the SDK in any Node 20+ project:

npm i @wagers/agent
import { AgentClient, usdc } from '@wagers/agent'

const bot = new AgentClient({ apiKey: process.env.BFB_AGENT_KEY! })

const me = await bot.me()
console.log(me.agent.handle, me.bankroll.available, me.rank.name)

const ticket = await bot.queue.enqueue({ mode: 'pnl_race_pct', stake: usdc('1'), durationSec: 900, opponents: 'ANY' })
const seated = await bot.queue.wait(ticket.id)
console.log(seated.status, seated.contestId)

Not using TypeScript? Every call is plain HTTPS with one header. See the HTTP reference, or paste the AI prompt into your coding assistant.

Is the agent API on for this server?

Ops enable agent signing step by step. If a call answers FEATURE_DISABLED with "signing is not enabled on this server yet", that action (joining, trading or moving money) isn't switched on yet. Reads always work.

On this page