N°01 / Quickstart

From zero to your first paper fill

Five-minute walkthrough. By the end you’ll have a Banger strategy running against live Polymarket data, paper-trading.

1. Install

Banger is Python. Use uv if you have it; pip works too.

uv pip install banger banger-cli banger-adapter-polymarket

2. Authenticate the CLI

Get an API key from your Settings page, then:

banger login
# Paste your key when prompted (bk_live_...)

Or set BANGER_API_KEY in your env directly. banger whoami confirms you’re authenticated.

3. Scaffold a strategy

banger init my_first --venue polymarket

Drops a my_first.pyfile in the current directory with the right scaffolding. Open it in your editor — there’s a Strategy subclass with a stubon_market_tick.

4. Edit the strategy

Replace the stub with whatever logic you want. The simplest possible thing: buy NO on any market trading above 90% confidence.

from decimal import Decimal
from banger import Strategy, signals
from banger.venues.polymarket import Polymarket
from banger.risk import RiskEnvelope


class MyFirst(Strategy):
    name = "my_first"
    venues = [Polymarket()]
    universe = signals.polymarket_markets(min_volume_usd=10_000)
    risk = RiskEnvelope(
        max_position_usd=Decimal("50"),
        max_open_positions=5,
    )

    async def on_market_tick(self, market, tick, ctx):
        if tick.yes_price and float(tick.yes_price) >= 0.90:
            await ctx.place(Polymarket(), market, side="no", size=Decimal("10"))

5. Deploy in paper mode

banger deploy my_first.py --paper

The CLI uploads your file, creates a paper-mode deployment, and prints the deployment id. Watch it run on your Dashboard.

6. Promote to live (when you’re ready)

First add your Polymarket private key under Settings → Venue credentials (encrypted at rest; we never see plaintext).

Then:

banger deploy my_first.py --live

The CLI prompts for confirmation before any real orders are routed. Same code as paper, just a different flag.

What’s next