Skip to main content
Glama
public-options

public-options

by blue3fy
README.md
# public-options

Agent Plugin that fetches public-delayed US underlying quotes and options chains. Bid, ask, volume, and open interest come from unofficial Nasdaq.com market-activity JSON. Implied volatility is merged from unofficial delayed Yahoo Finance via yfinance when a non-placeholder value exists.

Domain types:

- `Quote = { ticker, as_of, last, currency }`
- `OptionContract = { ticker, expiry, right, strike, bid, ask, mid, last, iv, volume, open_interest }`

Every successful payload includes `quote: "public-delayed"` and `as_of`. This is a data-entry plugin. It is not published to a marketplace. It does not place orders and is not a source of IBKR executable quotes or fills.

## Operator setup

The MCP command is `node ./server.mjs`, so Node.js must be on the client's `PATH`.

IV merge needs a plugin-local virtualenv (gitignored; not a system-wide install):

```bash
# from the plugin root
python3 -m venv .venv
.venv/bin/pip install -r requirements.txt
```

`requirements.txt` pins `yfinance==1.7.0`. To point at another interpreter, set `PUBLIC_OPTIONS_PYTHON` (optional). `mcp.json` contains only `${VAR}` placeholders. For local stdio runs you may copy `.env.example` to a gitignored `.env`. Do not commit a real email address.

A descriptive User-Agent is sent to Nasdaq by default. To override it, set `PUBLIC_OPTIONS_USER_AGENT`. If a Cursor launch leaves a placeholder unsubstituted, the server falls back to its default User-Agent and, for Python, to `.venv/bin/python`.

This box can prove stdio MCP and live fetches. Grok Bot does not load local plugins from `~/.cursor/plugins/local`; install and enable the folder as a local Agent Plugin in Cursor IDE to use the tools there. Recreate the `.venv` on that machine after copying the folder.

## Local check

```bash
# from the plugin root
node scripts/prove-local.mjs
```

The prove script creates `.venv` and installs requirements if they are missing.

## Sources and limits

Documented in `DESIGN.md`. Nasdaq `api.nasdaq.com` is unofficial delayed website JSON, not an official Nasdaq developer API. Yahoo has no official public API; yfinance 1.7.0 is used only to attach IV. Yahoo failed-solver placeholder IVs are left null, so some contracts — sometimes a whole near-term expiry after hours — have `iv: null`. Stay conservative on request volume: one ticker and at most two expiries per chain call.