Create and Test Forex Strategies
fetch.js downloads historical market data, updates Forex rates, refreshes symbol information, and checks for Express Generator updates.
If you are new to ExGen, begin with Quick Start and return here for full option coverage.
Fetcher can run one or more of these jobs in a single command:
If all jobs are disabled, Fetcher exits with “Nothing to fetch!”.
You can fetch data only from servers provided by the developers (Forex Software Ltd).
Currently available servers are: Premium, Dukascopy, MetaQuotes, Darwinex, Eightcap, BlackBull.
Note: Premium data is composed from Dukascopy tick data sources.
Recommended first run order for new users:
node ./bin/fetch.js --server MetaQuotes --symbol EURUSD --period M15
Example output:
..:: Express Generator Fetch v2.xx ::.. Fetched: MetaQuotes EURUSD M15, From: 2018-02-02 09:45, To: 2026-02-20 21:30, Bars: 200000 Data fetch ready!
node ./bin/fetch.js --server MetaQuotes --fx-rates true --symbol-info true
Example output:
..:: Express Generator Fetch v2.xx ::.. FX rates fetch ready! Symbol info fetch ready!
node ./bin/fetch.js --check-for-update true --update-check-interval 0
Fetcher reads options in this order (lowest to highest priority):
./bin/fetch.settings.ini–settings my-fetch.ini (or multiple files)–time-zone -4Higher priority overrides lower priority.
When using several files with –settings, each next file overrides keys from the previous one.
Settings names are flexible in INI and CLI:
Aliases are supported:
symbol and symbolsperiod and periodssettings and setting| Option | Type | Default | Description |
|---|---|---|---|
–server | string | Premium | Data server. Allowed values: Premium, Dukascopy, MetaQuotes, Darwinex, Eightcap, BlackBull. |
–symbol / –symbols | string or list | empty | One or more symbols to download, for example EURUSD GBPUSD. |
–period / –periods | string or list | M30 | One or more periods: M1, M5, M15, M30, H1, H4, D1. |
–time-zone | integer | 0 | Time zone offset in hours where UTC = 0. |
–max-data-bars | integer | 0 | Maximum bars to keep. Use 0 for all available bars. |
–if-missing-or-older-than | integer | 0 | Re-download data only if file is missing or older than N minutes. 0 disables this rule. |
–silent | boolean | false | Suppress regular console output (errors are still shown). |
Network behavior note:
socket hang up), Fetcher retries automatically after 3 seconds, up to 2 retries.| Option | Type | Default | Description |
|---|---|---|---|
–fx-rates | boolean | false | Downloads fx-rates.json in ./res. |
–symbol-info | boolean | false | Downloads symbol info file ./res/<server>.json. |
| Option | Type | Default | Description |
|---|---|---|---|
–check-for-update | boolean | true | Enables update check at startup. |
–automatic-update | boolean | true | Installs update automatically when a newer version is found. |
–update-check-interval | integer | 24 | Hours between update checks. |
| Option | Type | Description |
|---|---|---|
–settings | string or list | One or more user INI files that override default settings. |
–setting | string or list | Alternative spelling for –settings. |
./res/fx-rates.json./res/<server>.json./data./bin/res/update-check.json