Start with free public datasets
Connected your DB but have nothing to put in it? Start with one of these three. All free, no API key, with the loader script and the exact values to pick on screen (table, columns). The script is built around a parser map — adding your own source is one more entry.
Get the fetchers
Clone the fetcher repo onto the machine that runs your agent. The only dependency is pg. ★ DATABASE_URL in .env must be a write account. A read-only account is supposed to reject the INSERT; that one is for the SoriTrading integration.
git clone https://github.com/valueconnectinc/soritrading-fetchers ~/soritrading-fetchers cd ~/soritrading-fetchers && npm install cp .env.example .env # DATABASE_URL
https://github.com/valueconnectinc/soritrading-fetchers · Open source · one folder per fetcher · cron included
The three below are **starters**. The repo also carries VIX, crypto implied volatility (DVOL), the yield curve, the dollar index, stablecoin market cap and DeFi TVL — all free, no API key. Run `node run.mjs list` for the full list. Market series have no value on US holidays (missing, not zero), and DVOL starts in March 2021.
Reading the Data settings screen
Agents → pick an agent → Data sources tab. Only you add or delete datasets, on this screen — the AI only reads them, and connection strings never go into chat. From top to bottom the screen has these parts.
- External DB — Enter a connection name (e.g. main) and the connection string. It is stored encrypted on the agent machine only and never reaches the server. When the screen opens the agent reads the table list automatically ([Check connection] re-reads it).
- Tables and datasets — One row per table in the DB: table name, approximate row count, table comment — and the datasets that read that table, listed under it.
- AI visibility (right side of the table row) — Private (default — the AI does not even know the table exists) · name · columns · sample · query. Pick, then [Save visibility]. The columns, sample and query levels send real data to the AI, so do not open tables with personal information. Only tables in the public schema can be opened.
- Dataset names (under the table row) — The values a strategy calls with ctx.data(name). [+ Add a dataset from this table] → pick a name, time column and value column; the description is pre-filled from the table comment, and [Save] unlocks only after [Test] passes. One table can have several names (a filter per exchange or symbol series, or an older strategy that uses a different name). State badge: ok · pending · broken. Click the real-time badge next to it for wake settings (poll · notify · redis) — the default is fine for most.
- Computed datasets (SQL) — Values that need a calculation — moving averages, lags, several tables combined. SQL can read more than one table, so these are grouped separately, not under a table. Most calculations can be done in strategy code with two ctx.data calls; use SQL only when the calculation needs the whole history (moving averages, ranks). Older SQL declarations live here too: [SQL reviewed] · [Delete], or bulk-convert simple ones to table selection.
- Datasets whose table was not found — When a declared table is not in the current list, the dataset does not disappear — it stays here with the reason: table list not received yet (does not mean missing) · the DB has no such table (renamed or dropped) · this device has no such connection name.
- Two scopes — AI visibility is stored on the device you have open only. Datasets apply to every device with the same connection name. With several devices, pick visibility on each one.
1. Fear & Greed Index
alternative.me0 (extreme fear) to 100 (extreme greed), daily, full history since Feb 2018. A sentiment axis price alone cannot show — the best first test.
node run.mjs fear-greed
Connection: main · Table: fear_greed Name: fg · Time column: ts · Value column: v
2. Bitcoin hash rate
blockchain.comA chain-native metric (TH/s) on a different axis from price, useful as a regime filter. Values are large and slow-moving, so a ratio to its moving average works better than the raw level.
node run.mjs btc-hashrate
Connection: main · Table: btc_hashrate Name: hashrate · Time column: ts · Value column: v
3. US federal funds rate (practice)
FRED (DFF)Daily effective federal funds rate — the classic macro regime filter. ★ Note: the same value already arrives as the base indicator base_fedfunds (ctx.data('base_fedfunds') — collected by your agent from FRED). Feeding the same value through two paths makes results ambiguous about which one was used, so treat this as integration practice only.
node run.mjs fed-funds
Connection: main · Table: macro_fed_funds Name: dff · Time column: ts · Value column: v
Scheduled collection (cron)
Installs each fetcher's own schedule into crontab. Re-running replaces the block instead of stacking lines, and your own entries are left alone. Logs go to a per-fetcher file under logs/.
node run.mjs --install-cron
- Use epoch seconds for the time column (ms and ISO are auto-detected, and the tsUnit field of the verification report tells you how it was read).
- Re-running the script is safe — it upserts, so no duplicates and only newer values change. Re-run periodically for fresh data.
- Backtest results carry a data fingerprint (row count, hash). If the DB content changes the fingerprint changes, and two results with different fingerprints were not run on the same data.
- Backtests that use external data also run on the agent — every backtest runs on the agent (my candle store) only.
- Tables you expose become visible to the AI (the columns, sample and query levels send real data) — do not expose tables containing personal information.
All documentation — Guide