# --- Credentials -------------------------------------------------------
# This is the ONLY section you actually need to fill in. Everything else -
# search terms, marketplaces, countries, and which features run at all - is
# configured via chat commands on the control bot (see README) and persisted
# on the Docker volume, not here.

# eBay App ID (production keyset). Required if any feature below is enabled.
EBAY_CLIENT_ID=
# eBay Cert ID. Only required if listing search is enabled.
EBAY_CLIENT_SECRET=
# Long-lived Trading API user token for your own account (Developer Portal ->
# User Tokens -> Auth'n'Auth -> Sign in to Production). Only required if
# messages, sales, offers, or sniping is enabled.
EBAY_AUTH_TOKEN=
# Telegram bot token. By default this ONE bot both sends alerts and receives
# your commands (/settings, /snipe, etc.) - one bot to create, one chat to
# use.
TELEGRAM_APITOKEN=
# Telegram chat ID to send alerts to.
TELEGRAM_CHAT_ID=
# Optional. Only set this if something ELSE is already receiving commands on
# TELEGRAM_APITOKEN (e.g. you're also running kleinanzeigen-alert on the same
# bot) - Telegram only allows one process to receive a given bot's messages
# at a time, so a second one would race it. If that's your situation, create
# a second bot and put its token here; this app's commands will use it
# instead, leaving the first bot alone. Otherwise, leave this blank.
SNIPE_BOT_TOKEN=

# --- First-run defaults only ------------------------------------------------
# Everything below is only read ONCE, the very first time the app starts with
# no saved settings yet - after that, use the control bot's /setterms,
# /setmarketplaces, /setcountries, /enable, /disable commands instead, which
# persist to a Docker volume and take effect immediately, no redeploy needed.
# Editing these after first run has no effect; leaving them all blank/default
# is fine - just configure everything via chat once it's running.

EBAY_SEARCH_TERMS=Canon AE-1,Leica M6,Rolleiflex
EBAY_MARKETPLACES=EBAY_DE,EBAY_FR
EBAY_LOCATION_COUNTRIES=DE,FR,IT,ES,AT,BE,NL,IE,PL,CH,PT,SE,DK,FI,NO,CZ
ENABLE_LISTING_SEARCH=true
ENABLE_MESSAGES=true
ENABLE_SALES=true
ENABLE_OFFERS=true
ENABLE_SNIPING=true

# --- Advanced / operational tuning ------------------------------------------
# These are not exposed as chat commands (they're deployment tuning, not
# day-to-day preferences) - edit here and redeploy if you need to change them.

# Trading API site ID matching your eBay account's site (77 = Germany,
# 3 = UK, 0 = US, ...).
EBAY_SITE_ID=77
# Base URL used to build item links in messages (should match EBAY_SITE_ID's
# marketplace, e.g. https://www.ebay.co.uk for a UK account).
EBAY_ITEM_URL_BASE=https://www.ebay.de
# Results fetched per search term per poll (eBay's own max is 200).
EBAY_SEARCH_LIMIT=50
# How far back to check for completed sales each poll.
SALES_LOOKBACK_HOURS=24
# How many seconds before an auction ends to place the bid.
SNIPE_LEAD_SECONDS=5
# How long a staged /snipe waits for /confirm before expiring.
SNIPE_CONFIRM_SECONDS=120
# How often to poll, in seconds.
POLL_INTERVAL_SECONDS=600
# How many days to keep dedup records for (older entries are pruned so the
# store doesn't grow forever).
SEEN_RETENTION_DAYS=30
# Consecutive failures (of the same category) before escalating to an actual
# Telegram alert instead of only logging.
FAILURE_ALERT_THRESHOLD=3
