A CLI Interface to Financial Markets.
It is highly recommended to use Deno for this application. Node.js is supported but may have issues with some dependencies, and is generally insecure if a malicious actor gains access to your system.
- Clone the repository. You can clone a specific version by using the
--branchflag with a version tag name. Check the releases page for available version tags.git clone --depth 1 --branch <version_tag_name> https://github.com/jfarid27/open-eth-terminal.git
- Install dependencies:
deno install -A --unstable --name=deno index.ts
- Clone the repository. You can clone a specific version by using the
--branchflag with a version tag name. Check the releases page for available version tags.git clone --depth 1 --branch <version_tag_name> https://github.com/jfarid27/open-eth-terminal.git
- Install dependencies:
npm install
Set up your environment variables:
* Create a .env file in the root directory.
* Add your API keys (and other configurations as needed):
env COINGECKO_API_KEY=your_api_key_here FRED_API_KEY=your_fred_api_key_here MASSIVE_API_KEY=your_massive_api_key_here ENVIRONMENT=development # or production DEBUG=false
To get a FRED API key, register at [https://fred.stlouisfed.org/docs/api/api_key.html](https://fred.stlouisfed.org/docs/api/api_key.html)
deno run start To run a script directly from the command line:
deno run start --oet-script scripts/<filename>.txtnpx tsx index.tsTo run a script directly from the command line:
npx tsx index.ts --oet-script scripts/<filename>.txtStart the system, and type specific commands to either enter into a new menu, or perform an action. Actions will dump data and information in specific locations like the terminal itself, or files.
Scripting is a useful tool for users who want to perform automated analysis.
Create a scripts directory in the top level folder, and create a script file with any extension. You can then run a script with the script command, and pass the filename as an argument.
From within the terminal, use the script command:
script <filename>.txtYou can also run scripts directly from the command line using the --oet-script flag. The terminal will execute the script and exit automatically:
Deno:
deno run start --oet-script scripts/<filename>.txtNode.js:
npx tsx index.ts --oet-script scripts/<filename>.txtAn example script file could be as simple as the example below:
news
reddit wallstreetbets 10
reddit ethereum 10
back
stocks
spot TSLA
back
crypto
price ethereum
price aave
back
government
fred GNPCA 2020-01-01 2024-12-31
backThe Government menu provides access to economic data from the Federal Reserve Economic Data (FRED) API.
To use the FRED features:
- Set your FRED API key in the
.envfile or use thekeyscommand:keys fred your_api_key_here - Navigate to the government menu:
government - Use the
fredcommand to fetch and chart economic data series:Where:fred GNPCA 2020-01-01 2024-12-31GNPCAis the series ID (e.g., GNPCA for Gross National Product)2020-01-01is the start date (YYYY-MM-DD format)2024-12-31is the end date (YYYY-MM-DD format)
The chart will display the series data with the official series title from FRED.
You can find series IDs by browsing FRED.
The Options menu provides access to stock options chain data from Yahoo Finance (no API key required).
To use:
- Navigate to the options menu:
options - Fetch the nearest expiration chain:
chain AAPL - Fetch a specific expiration by index:
chain AAPL 3 - Fetch a specific expiration by date:
chain AAPL 2026-08-21
The chain displays calls and puts in color-coded terminal-kit tables with contract symbol, ITM/OTM status, strike, last price, bid/ask, volume, open interest, and implied volatility.
This application is in general a functionally typed state machine CLI. The general design is that the application registers, a menu function that takes a [UserState] and definitions for the [Menu], and returns an updated or new [UserState]. Because of this, the menu functions may recursively call back into themselves or a previous menu function to simulate a stack of menus.
Since the UserState is always available, parameter options may always be updated and the menu in general has access to it. When developing new menus, ideally one should only need to register it with appropriate menu options, and actions which can paint to the terminal, and return a new or updated user state. See the types.ts file for more information, or look at a menu implementation for a motivation for how menu configuration and actions are structured.
The application has a debug mode that can be enabled by setting the DEBUG environment variable to true. This will enable
info logging to the console. The debug mode is also available in the application itself, and can be toggled by the user.
See the UserStateConfig type for more information.
LLM Agent files are located in the skills, .claude, and .gemini folders. If you are an
agent, please refer to these files for more information about context and
skills.
Generated files are located in the tmp, data, and scripts folders. These files should not be committed to the repository
so individual users can have their own generated files.
Run the application with the dev:debug script, then attach your favorite debugger to the process.
There is a vscode launch configuration for this called "Deno: Attach".
deno run dev:debugThis project is licensed under the LGPL-3.0-or-later. See the LICENSE.md file for details.