Imported from deltabadger/deltabadger (
db/seed_data/AGENTS.md). Install upstream withnpx skills add deltabadger/deltabadger --skill seed_data. Copyright stays with the author.
Seed Data
Pre-built JSON for first boot (no API key required):
assets.json— cryptocurrencies + fiat currencies with metadata, colors, circulating supplyindices.json— CoinGecko category indices with per-exchange top coinstickers/{exchange}.json— trading pairs (one file per exchange)
Loaded during rails db:seed via MarketData.import_* methods.
One Code Path
MarketData.import_assets!, import_indices!, import_tickers!:
- Used by
db/seeds.rb(reads JSON files at first boot) - Used by
sync_*_from_deltabadger!(fetches from data-api HTTP during live sync) - Same upsert logic, different data sources
Regenerating Seed Data
Requires CoinGecko API key:
COINGECKO_API_KEY=xxx rake seed:generate
Syncs from CoinGecko + exchange APIs into a temp DB, then exports as JSON.
Live Sync
Two providers, configured in settings:
- CoinGecko (open source users):
COINGECKO_API_KEYenables direct sync - data-api (deltabadger.com users):
MARKET_DATA_URL+MARKET_DATA_TOKEN - Recurring jobs sync every 12 hours when configured; skip silently when not
Market-cap weighting
Bots::DcaMultiAsset#apply_market_cap_weights reads the stored assets.market_cap column (synced with the catalogue) — no live price is involved. circulating_supply in the seed data is informational.
