Agent-readable docs index: /llms.txt. Full docs in one file: /llms-full.txt. Download /docs.zip to grep all markdown files locally.

Quick start

  1. Install and start
    You need Node.js and a clone of the repo.
    npm install npm start # dashboard: http://localhost:8787
    With no RPC or wallet yet, the dashboard opens in setup mode. The app has four pages in the header: Dashboard · Terminal · PnL · Settings.
  2. Create a dedicated bot wallet
    Never use your main wallet. Create a fresh one:
    npm run wallet:new
    It writes ~/.config/bidask-flipper/bot-wallet.json and prints only the address. Fund it with a capped amount. To open positions on Meteora's site you can import this keypair into Phantom, but use the wallet for nothing else: after a close, the bot swaps that token's whole wallet balance to SOL.
  3. Connect: Wallet & RPC
    In Settings → Wallet & RPC, paste your RPC URL and the bot wallet's private key (base58, or the [12,34,…] array from the file). The bot tests the RPC, saves both to .env (owner-only permissions) and connects. The key is never shown again; only the address is.
    Prefer files? Set WALLET_KEYPAIR_PATH to the keypair file instead of pasting a key. A Helius RPC is recommended: the bot uses it for priority-fee estimates and to read how each position was opened.
    Optional keys in the same card: a Jupiter API key (otherwise Jupiter's keyless tier) and a GMGN API key for token safety info on cards and Discovery.
  4. Watch it in Shadow mode
    The bot starts in Shadow. It finds your positions, works out every flip and close, simulates each transaction against mainnet and logs what it would do. It never signs.
    Open a small Bid-Ask position from the bot wallet (on Meteora, or with Open in the dashboard) and watch the activity log for a while.
    Want to try it with no key at all? Run it watch-only on a public address: it reads that wallet's positions in Shadow mode and can never sign (Live and closes are disabled).
    WATCH_WALLET=<a wallet address> npm start
    Only watch a wallet you own or are allowed to look at.
  5. Turn on alerts (optional)
    The bell in the header turns on desktop notifications. For alerts with no browser open, add a Discord webhook in Settings → Alerts → Discord and click Send test alert. See Alerts.
  6. Go live
    When the shadow log looks right, open Settings → Mode & flip, choose Live (sign) and confirm. From then on the bot signs flips, closes and swaps for managed positions. Stop bot in the header pauses all signing instantly while it keeps watching.

Run it on Railway instead

Railway deployment (one replica, volume, password)
  1. Create a Railway service from the repo (railway.json and nixpacks.toml are included).
  2. Add a volume at /data and set DATA_DIR=/data.
  3. Set DASHBOARD_PASSWORD (required: the dashboard is public) and MODE=shadow. RPC and key can be set here or later in the dashboard.
  4. Generate a domain. Log in with any username and the password.
  5. Keep one replica. A second instance refuses to start while the first one's heartbeat is fresh. /healthz returns 503 if checks stop completing for 5 minutes.
Set ALLOW_LIVE=false to cap a deployment at Shadow.