ask-investing

Guides usage of the investing package covering Alpaca trading, stock data, and prediction-market agents.

74|11|Updated Jul 4, 2024
One-click install
npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-investing-opensourceagi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ask-investing
Source: https://github.com/OpenSourceAGI/qwksearch-research-agent/tree/main/skills/ask-investing
Command: npx skills add https://github.com/OpenSourceAGI/qwksearch-research-agent --skill ask-investing-opensourceagi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Developers working with the packages/investing monorepo package face a confusing surface: five distinct subsystems (Alpaca brokerage, stock data, Polymarket sync, LangGraph debate agents, and the merged PredictOS prediction-market core), subpath exports that silently resolve to nothing, and a former standalone predictos package whose imports broke after the merge. This Skill maps every task to the correct import path, call signature, and environment variable, and provides a troubleshooting table for the most common failures. ## Core Features & Use Cases - Import and API routing: Maps each task (equity trading, quotes, SEC filings, Polymarket data, debate agents, arbitrage) to the exact export and subpath such as investing/predictos or investing/stocks. - PredictOS agent workflows: Documents the full URL-to-order pipeline using getEvents, runEventAnalysisAgent, runBookmakerAgent, runMapperAgent, and findArbitrage, including config objects and error behavior like NoTradeError. - Troubleshooting guide: Covers broken subpath exports, missing model/url parameters, D1 connection failures, DOME/DFlow 401 errors, and stale README API names. - Use Case: A developer whose predictos import broke after the merge uses this Skill to learn the code now lives at investing/predictos, then follows the recipe to run an event analysis with a Grok model and map the result to Polymarket order parameters. ## Quick Start Ask the assistant how to run a prediction-market event analysis from a Polymarket or Kalshi URL using the investing package.

Frequently Asked Questions about ask-investing

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run a prediction-market analysis from a Polymarket or Kalshi URL?

Call getEvents with the URL to fetch markets, then pass the result to runEventAnalysisAgent with a model like grok-4-fast. Use runMapperAgent on the analysis to produce Polymarket order parameters, catching NoTradeError when the analysis recommends no trade.

How do I fix 'Cannot find module predictos' after the package merge?

The standalone predictos package was merged into the investing package. Change imports from predictos to investing/predictos, or its subpaths like investing/predictos/ai, /agents, /arbitrage, and /data/kalshi.

Why does an investing subpath import resolve to nothing?

Subpath exports point at dist output, so each entry must be declared in both vite.config.ts build.lib.entry and package.json exports, then rebuilt. Some subpaths like investing/alpaca and investing/stocks lack build entries entirely and must be imported from the main barrel.

What API keys does the investing package need for market data?

Polymarket data via Dome requires DOME_API_KEY and Kalshi data via DFlow requires DFLOW_API_KEY, or pass domeApiKey and dflowApiKey in the DataConfig argument. AI agents need OPENAI_API_KEY, XAI_API_KEY for Grok, or BLOCKRUN_WALLET_KEY.

Why does the database throw 'No Cloudflare D1 connection available'?

D1 is the only supported database with no local SQLite fallback. Off Cloudflare Workers, set CLOUDFLARE_ACCOUNT_ID, CLOUDFLARE_D1_TOKEN, and CLOUDFLARE_DATABASE_ID so the client can reach D1 over the REST API.

Can I use x_search tools with OpenAI models in the analysis agents?

No, x_search and web_search tools are only supported by Grok/xAI models. OpenAI and BlockRun calls silently drop the tools parameter, so choose a Grok model like grok-4-fast when search tools are needed.