API

the web client is just the first API consumer

IdlePiracy is built API-first. There's no separate "official" client with private access to anything — the web client talks to the exact same public REST API that anyone can call, the same way Torn and Screeps treat automation: a supported way to play, not an exploit to patch out.

Every account gets its own API key under Settings → API. Full market order-book data is exposed through the API on purpose — public data makes the trading game deeper and gives the community room to build tooling around it.

v0.1 — read endpoints

GET /api/v1/character            # skills, gold, location, current action
GET /api/v1/character/inventory
GET /api/v1/character/officers
GET /api/v1/world/ports          # static world data
GET /api/v1/market/{port}        # live order book
GET /api/v1/logbook?since=...

v0.1 ships read-only. A v0.2 write surface is planned for after auth hardening: POST /actions (start a batch), POST /market/list|buy, and POST /travel — the same actions the web client performs, just callable directly.

Rate limits

Free accounts get 60 requests/minute (current design value). Higher tiers are a planned membership perk later — the same Screeps-style monetization lane where automation capacity itself is the thing worth paying for, never an in-game power advantage.

Botting is legal, one account is the rule

Playing IdlePiracy by bot, with your own API key, is legal and documented — not something we quietly tolerate. The only rule is one account per player. Automation players are treated as the subscriber core, not a problem to police out of the game. See Fairness for how the one-account rule is enforced in practice.

Publishing the spec

An OpenAPI spec will be published alongside the API itself. Community tools built against it are free marketing — the more captains build their own dashboards, alert bots, and market trackers, the better for everyone.