fcontext from your terminal to query Financial Context market data, manage sign-in, and produce JSON output for scripts or agents.
The CLI talks to Financial Context by default:
/api/market-data/*. The current CLI focuses on US stock data: symbols must use the CODE.US format, and market filters must be US.
Command Basics
Use either command name.fctx is the short alias for fcontext and supports the same subcommands, flags, output formats, and schemas.
Install
- macOS (Homebrew)
- Linux / macOS (Script)
- Windows (Scoop)
- Windows (PowerShell)
Install the
fcontext-cli cask from the Aitaport tap:Release artifacts use the
fcontext-cli-* package names, including
fcontext-cli-darwin-amd64.tar.gz, fcontext-cli-darwin-arm64.tar.gz,
fcontext-cli-linux-musl-amd64.tar.gz, fcontext-cli-linux-musl-arm64.tar.gz,
and fcontext-cli-windows-amd64.zip. The shell and PowerShell installers download the matching archive,
verify its .sha256 checksum, and install both fcontext and fctx. Legacy hosted
/fcontext/fcontext-terminal/* installer URLs continue to redirect or mirror the latest release for compatibility.Authenticate
Manage CLI authentication: sign in, sign out, and inspect the local token status.OAuth 2.0 Login
Use the OAuth 2.0 authorization-code flow to sign in. This works in local terminals, SSH sessions, and headless servers because the CLI prints the authorization URL and the next command to run.oauth-token.json in the local fcontext config directory. Later commands reuse that token automatically.
Authorization Code
If no browser is available on the current machine, generate a one-time authorization code from Financial Context Connect and redeem it directly:Auth Logout
Clear the locally stored OAuth token. The next authenticated command will require a new login.Auth Status
Inspect the current base URL and sign-in status.Check
Validate sign-in and Financial Context API connectivity without relying on an active market session. The report includes endpoint status and latency.Update
Download and run the official installer script to replace the current CLI binary with the latest release.First Commands
Market Data
fear-greed to inspect the Fear & Greed Index, a market-sentiment indicator that summarizes investor appetite for risk on a scale from extreme fear to extreme greed:
Company Data
News And Events
Trading Activity
Screeners
Direct Endpoint Access
Useapi get when you need a supported read-only endpoint before a dedicated command exists:
Output For Agents
Every command supports JSON output:--schema to print a machine-readable response schema: