Dataset Viewer

The dataset viewer is not available because its heuristics could not detect any supported data files. You can try uploading some data files, or configuring the data files location manually.

YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

Flipper — Albion Online Black Market flipping tool

A small, self-hosted market tool for Albion Online traders: it compares the lowest sell offers in the royal cities with the buy orders waiting on the Black Market, subtracts the sales tax, and ranks the trades that are still profitable — including quality and enchantment upgrade plays.

Everything runs on plain Node (18+) with zero runtime dependencies.

npm start            # http://localhost:3000

What is inside

Piece What it does
server/index.js HTTP server: static site, JSON API, and the data-client ingest endpoint
server/lib/deals.js The flip engine (direct, quality-upgrade and enchantment-upgrade flips)
server/lib/albion.js Public market API client, location mapping, scan helpers
server/lib/auth.js Accounts (scrypt), cookie sessions, password resets
server/lib/store.js Embedded JSON store: users, sessions, tokens, orders, carts
server/lib/items.js Item catalogue helpers (tiers, enchantments, categories, values)
server/lib/discord.js Discord OAuth2 login, webhook posting, alert embeds
server/lib/alerts.js Background flip-alert watcher + community-channel digest
server/lib/settings.js Runtime settings the control panel edits (live, no restart)
server/lib/adminRoutes.js The whole /api/admin/* surface: users, tokens, orders, settings, logs
public/ Landing, auth, token, scanner, cart, settings, documentation
server/lib/botRoutes.js /api/bot/* — the bot's REST surface (key-protected): flips, items, link, DM queue
bot/ The Discord bot: gateway client, one-shot server builder, 9 slash commands, DM alerts, safe ws.js
tools/send-test-orders.js Simulated in-game data client (streams live public prices into a token)
tools/fetch-item-metadata.mjs Optional: builds item values so quality-upgrade flips work
tools/mock-webhook.js Local receiver to test Discord alerts without a server
tools/mock-discord.js Fake Discord REST + gateway (:9998) so the bot can be tested with no token
tools/test-bot.js End-to-end bot test: mock Discord + temp site + real bot (44 checks, npm run test:bot)

Pages

  • / — landing page with a live sample scan
  • /sign-up.html, /log-in.html, /forgot-password.html, /reset-password.html
  • /token.html — your personal ingest token + data-client setup
  • /deals.html — the scanner (filters, results table, cart drawer, CSV + share cards)
  • /cart.html — full run sheet: quantities, buy list per city, materials, totals, exports
  • /settings.html — Discord account, bot DM linking, flip alerts, community sharing
  • /admin.html — control panel (admins only): overview, users, orders, tokens, alerts, settings, logs, danger zone
  • /documentation.html — how the maths and the ingestion work

Control panel (/admin.html)

The first account created on a fresh database becomes owner + admin. Admins (role admin, plan owner, or any email in FLIP_ADMIN_EMAILS) get an Admin link in the nav and the full control panel:

Tab What you can do
Overview Accounts, orders 24h, community pool, sessions, uptime, memory, orders per market, watcher state
Users Search/filter accounts, promote to VIP / admin (or demote), generate a reset link, clear a user's stored orders, run a scan as that user, delete an account
Market orders Browse everything ingested with filters (market, offer/request, item id, token prefix, age)
Tokens Every ingest token with order counts and last upload, rotate any of them
Alerts & Discord Watcher stats, dry run, run now, per-account alert report, community digest, test message, OAuth/invite/webhook status
Site settings Site name, tagline, site URL, registrations open/closed, maintenance mode + message, community pool on/off, VIP free/strict, price cache, assumed stock, order lifetime, alert interval, Discord invite/webhook/OAuth credentials, and the item-value tools (rebuild from the community dump or upload your own item-metadata.json)
Activity log Server events (sign-ups, logins, ingests, watcher restarts) and an audit trail of every admin action
Danger zone Purge stale or all orders, clear alert histories, kill other sessions, download a DB backup, reset the database

Everything applies live — renaming the site updates the nav, page titles and /api/site immediately; changing the alert interval restarts the watcher without a deploy. Secrets (Discord client secret) are stored server-side and only ever shown masked.

Discord & community features

Sign in with Discord. Set DISCORD_CLIENT_ID + DISCORD_CLIENT_SECRET, add https://your-site/api/auth/discord/callback as a redirect URL in the Discord developer portal, and the Continue with Discord buttons light up. Accounts link by email automatically; new ones are created passwordless.

Flip alerts. Each account can paste an incoming webhook URL (Discord → Server settings → Integrations → Webhooks). A watcher re-scans every FLIP_ALERT_INTERVAL_MS (default 5 min) with that account's rules and posts the matches; every flip is fingerprinted so it is announced only once. FLIP_ALERTS=0 disables the watcher, and DISCORD_WEBHOOK_URL adds a community-channel digest that the site owner can push from the settings page.

Community pool (VIP). Orders ingested by any account can be merged into a shared pool; the scanner's Community pool (VIP) mode searches it. Only aggregated market orders are pooled — no carts, tokens or emails — and every user can opt out on the settings page. The plan system (free / vip / pro / owner) is already wired up and the feature is free while the beta flag is on; set FLIP_VIP_MODE=strict to require a plan, and use the owner tools to assign one.

Share & export. The scanner and the cart both export CSV; any deal can be rendered as a share card image (canvas, no dependencies) for Discord.

The Discord bot. bot/ is a dependency-free Node bot that builds your server (roles, channels, read-only overwrites, pinned guides, an invite), answers nine slash commands, and delivers the alert watcher's flips as DMs to linked accounts — no webhook needed. Create an app at https://discord.com/developers/applications, copy the token, then:

node bot/setup.js --create-guild "My Community" --token <token>   # the bot creates the server itself
#     …or: DISCORD_BOT_TOKEN=... BOT_API_KEY=<panel> AUTO_CREATE_GUILD=1 npm run bot

npm run bot:setup -- --print-invite     # (alternative) invite the bot into a server you made
node bot/setup.js --guild <id>          # build roles/channels/guides once
DISCORD_BOT_TOKEN=... BOT_API_KEY=<panel> GUILD_ID=<id> npm run bot

A bot-owned server comes out complete — icon, five categories, roles, read-only channels, pinned guides and a permanent invite — and the first human who joins is promoted to Site Admin automatically. Deleting the Discord application deletes a server the bot created, so if you want your own account to own it, create the server yourself and let the bot build it instead.

Users link from Settings → Flip alerts by Discord DM (15-minute code, then /link <code> in Discord). The admin panel's Alerts & Discord tab has the API key, the auto-digest channel/interval, the DM queue and the bot's heartbeat. The bot only uses the GUILDS intent, and npm run test:bot proves the whole thing against a mock Discord. See bot/README.md.

Testing alerts locally

node tools/mock-webhook.js          # listens on http://localhost:9999/hook
FLIP_WEBHOOK_ANY=1 npm start        # allow posting to a local URL
# save http://localhost:9999/hook as your webhook on the settings page

Two ways to feed it data

Public feed (instant). The server queries the community market API for the items your filters cover. Great for exploring; prices are aggregates and can be minutes old.

Your private database (recommended). Copy the ingest URL from the token page into the Albion Data Client as its custom ingest endpoint. Every order you walk past in game is streamed into your account and nobody else sees it. Orders expire after 24 h automatically and you can rotate the token at any time.

Endpoint shape (what the data client posts):

POST /api/<token>/marketorders.ingest
{ "Orders": [ { "Id": 1, "ItemTypeId": "T6_2H_HALBERG@2", "ItemGroupTypeId": "T6_2H_HALBERD",
                "LocationId": "Martlock", "QualityLevel": 1, "EnchantmentLevel": 2,
                "UnitPriceSilver": 12345600, "Amount": 12, "AuctionType": "offer",
                "Expires": "2026-10-12T09:30:00" } ] }

AuctionType: "offer" = a sell order (cities) · "request" = a buy order (Black Market). UnitPriceSilver is in 1/10000 silver, exactly as the game reports it.

The maths

profit_per_unit = bm_buy_price × (1 − tax) − city_sell_price
margin          = profit_per_unit / city_sell_price          tax = 4% premium / 8% standard
  • Quality upgrades cost coefficient(from → to) × item_value (expected reroll cost).
  • Enchantment upgrades consume runes/souls/relics of the tier: 384 units for 2H weapons, 288 for 1H, 192 for chest/bags, 96 for head/shoes/capes/off-hands — cheapest offers first, and the trade is re-checked after that cost.

Optional item values

Quality-upgrade flips need item values:

node tools/fetch-item-metadata.mjs      # writes data/item-metadata.json (estimates, flagged)

You can also hand-write data/item-metadata.json with exact values:

{ "T6_2H_HALBERD": { "value": 2048, "category": "2H-weapon" } }

Configuration

Env var Default Meaning
PORT 3000 HTTP port
HOST 0.0.0.0 Bind address
FLIP_PUBLIC_URL auto Force the base URL used in ingest links (behind a proxy)
FLIP_DATA_DIR data/store Where the JSON database lives
FLIP_ORDER_TTL_MS 24 h How long ingested orders are kept
FLIP_PRICE_TTL_MS 5 min Public price cache lifetime
FLIP_ASSUMED_STOCK 2000 Stock assumed for public-feed orders
DISCORD_CLIENT_ID / DISCORD_CLIENT_SECRET — Enable Discord login
DISCORD_INVITE — Invite link shown in the nav / landing page
DISCORD_WEBHOOK_URL — Community-channel digest webhook
FLIP_ALERTS on Set 0 to stop the alert watcher
FLIP_ALERT_INTERVAL_MS 5 min Watcher interval (minimum 60 s)
FLIP_VIP_MODE free strict gates the community pool behind a plan
FLIP_WEBHOOK_ANY off 1 allows non-Discord webhook URLs (local receivers)

Settings can also live in data/config.json instead of env vars:

{
  "discord": {
    "invite": "https://discord.gg/your-invite",
    "clientId": "…",
    "clientSecret": "…",
    "communityWebhook": "https://discord.com/api/webhooks/…",
    "alertIntervalMs": 300000,
    "alertsEnabled": true
  }
}

Reset everything by deleting data/store/db.json.

Renaming the site

The brand name lives in the page titles, the nav/footer markup and a couple of API strings. One command renames it everywhere:

grep -rl "Flipper" public server | xargs sed -i 's/Flipper/YourName/g'

Credits

Market data by the Albion Online Data Project. Item names derived from the MIT licensed AlbionFlipper. Unofficial tool — not affiliated with Sandbox Interactive. See NOTICE.md.

Downloads last month
487