primary-logic-external-api

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Primary Logic External API

Primary Logic External API

Use this skill to retrieve read-only, real-time investment context from extensive monitored sources through one API, including LLM-ranked relevance and impact signals for public and private companies.
使用该技能通过一个API从大量监测数据源中获取只读的实时投资相关信息,包括针对上市公司和私营公司的、由LLM排序的相关性和影响信号。

Activation Cues

触发条件

Activate this skill when the user asks for any of:
  • ticker-specific bullish or bearish evidence
  • recent catalysts or risk signals from content
  • per-content relevance or impact details by ticker
  • source coverage or content visibility checks
  • API key usage diagnostics for external data pulls
  • setup help for agentic decision support or user-controlled trading workflows
当用户询问以下任意内容时激活该技能:
  • 特定ticker的看多或看空证据
  • 来自内容的近期催化剂或风险信号
  • 按ticker划分的单条内容相关性或影响详情
  • 数据源覆盖范围或内容可见性检查
  • 外部数据拉取的API密钥使用诊断
  • 用于Agent决策支持或用户可控交易工作流的设置帮助

What This Data Represents

数据说明

  • Source-normalized investment context: top podcasts, articles/news, X/Twitter, Kalshi, Polymarket, earnings calls, filings, and other monitored channels normalized into one feed
  • LLM-heavy signal extraction: per-ticker relevance and impact scores attached to each content item to prioritize material developments
  • Public + private company coverage: source visibility and ticker or company coverage context for the requesting organization
  • 标准化后的投资相关信息:来自顶级播客、文章/新闻、X/Twitter、Kalshi、Polymarket、财报电话会议、备案文件以及其他监测渠道的内容被统一为一个信息流
  • 基于LLM的信号提取:每条内容都附带针对ticker的相关性和影响评分,用于优先展示重要动态
  • 上市公司+私营公司覆盖:针对请求机构的数据源可见性以及ticker或公司覆盖范围信息

Connection

连接方式

Hard Rules

硬性规则

  • Only call read-only GET endpoints under /v1.
  • Never fabricate data; all claims must map to API responses.
  • Data is org-scoped; if records are missing, org visibility may be the cause.
  • If an API call fails, report status, error code or message, and a concrete next step.
  • Use absolute timestamps in outputs when the user asks about recent windows.
  • Do not claim market prices, positions, or execution events unless explicitly present in the API data.
  • Do not present outputs as guaranteed returns or autonomous execution instructions.
  • Keep user control explicit: frame outputs as context for decision support and user-approved actions.
  • 仅调用/v1路径下的只读GET端点。
  • 不得编造数据;所有声明必须与API响应一致。
  • 数据按机构划分范围;如果记录缺失,可能是因为机构的可见性限制。
  • 如果API调用失败,报告状态、错误代码或消息,并给出具体的下一步建议。
  • 当用户询问近期时间范围时,在输出中使用绝对时间戳。
  • 除非API数据中明确包含,否则不得声称市场价格、持仓或执行事件。
  • 不得将输出表述为有保证的回报或自主执行指令。
  • 明确保留用户控制权:将输出表述为决策支持的参考信息和用户批准的操作依据。

Input Contract

输入约定

Interpret each user request into this query plan:
  1. objective:
    • thesis_support, counter_thesis, catalyst_scan, sentiment_shift, coverage_check
  2. scope:
    • tickers: list of uppercase ticker symbols
    • time window: since and until in ISO datetime format
    • source_types: optional list
  3. signal filters:
    • min_relevance: 0..1
    • min_abs_impact: 0..10
    • sentiment: positive|negative|neutral
    • include_reasoning: true when the user asks why
  4. retrieval:
    • limit (default 50)
    • sort mode: date|abs_impact|relevance
If ticker or time window is missing for an investment decision or trading workflow request, ask one concise clarification.
将每个用户请求转换为以下查询计划:
  1. 目标:
    • thesis_support(支持论点), counter_thesis(反驳论点), catalyst_scan(催化剂扫描), sentiment_shift(情绪转变), coverage_check(覆盖范围检查)
  2. 范围:
    • tickers:大写ticker符号列表
    • 时间窗口:ISO日期时间格式的since和until
    • source_types:可选列表
  3. 信号过滤:
    • min_relevance:0..1
    • min_abs_impact:0..10
    • sentiment:positive|negative|neutral
    • include_reasoning:当用户询问原因时设为true
  4. 检索设置:
    • limit(默认50)
    • sort mode:date|abs_impact|relevance
如果投资决策或交易工作流请求中缺少ticker或时间窗口,询问一个简洁的澄清问题。

Query Defaults

查询默认值

  • Default content limit: 50 unless user asks otherwise.
  • Apply ticker filters whenever the user names tickers.
  • For larger pulls, continue pagination while next_cursor is present.
  • For signal-heavy tasks, start with min_relevance >= 0.6 and min_abs_impact >= 5.
  • 默认内容数量限制:50,除非用户另有要求。
  • 当用户提及ticker时,自动应用ticker过滤。
  • 对于大规模拉取,在存在next_cursor时继续分页。
  • 对于侧重信号的任务,初始设置min_relevance >= 0.6且min_abs_impact >=5。

Data Shape (API Output)

数据格式(API输出)

See response contracts for canonical payload examples.
请查看响应约定获取标准负载示例。

Output Contract

输出约定

Return structured investment output with:
  1. key_findings: 3 to 7 concise bullets
  2. thesis_view: one short paragraph
  3. supporting_evidence: list of {content_id, ticker, impact_score, relevance_score}
  4. contrary_evidence: same schema as supporting_evidence
  5. catalysts: list
  6. risks: list
  7. api_trace:
    • endpoints used
    • filters used
    • time window
    • pagination coverage
If results are empty, return "no qualifying records" and suggest exactly which filter to relax first.
返回结构化的投资输出内容,包含:
  1. key_findings:3至7条简洁的项目符号
  2. thesis_view:一段简短的段落
  3. supporting_evidence:{content_id, ticker, impact_score, relevance_score}列表
  4. contrary_evidence:与supporting_evidence结构相同
  5. catalysts:列表
  6. risks:列表
  7. api_trace:
    • 使用的端点
    • 使用的过滤器
    • 时间窗口
    • 分页覆盖范围
如果结果为空,返回“无符合条件的记录”,并明确建议首先放宽哪个过滤器。

Decision Workflow

决策工作流

  1. Validate connectivity once per session with GET /v1/health.
  2. Use GET /v1/content for broad discovery pulls.
  3. Use GET /v1/tickers/{ticker}/content for signal-ranked ticker analysis.
  4. Use GET /v1/content/{content_id}/ticker-signals for per-item attribution detail.
  5. Use GET /v1/entities/tickers/{ticker}?include_signal_stats=true for summary context.
  6. Use GET /v1/sources when visibility or source scope is ambiguous.
  7. Use GET /v1/usage for telemetry and rate-limit troubleshooting.
  1. 每个会话通过GET /v1/health验证一次连通性。
  2. 使用GET /v1/content进行广泛的发现式拉取。
  3. 使用GET /v1/tickers/{ticker}/content进行按信号排序的ticker分析。
  4. 使用GET /v1/content/{content_id}/ticker-signals获取单条内容的归属详情。
  5. 使用GET /v1/entities/tickers/{ticker}?include_signal_stats=true获取汇总信息。
  6. 当可见性或数据源范围不明确时,使用GET /v1/sources。
  7. 使用GET /v1/usage进行遥测和速率限制故障排查。

Endpoint Cheat Sheet

端点速查表

Quick Connectivity Test

快速连通性测试

bash
curl -s \
  -H "Authorization: Bearer <PRIMARYLOGIC_API_KEY>" \
  "https://primarylogic--pulse-backend-external-api-app.modal.run/v1/health"
bash
curl -s \
  -H "Authorization: Bearer <PRIMARYLOGIC_API_KEY>" \
  "https://primarylogic--pulse-backend-external-api-app.modal.run/v1/health"

References

参考资料

  • Use cases
  • API recipes
  • Response contracts
  • Validation guide
  • 使用案例
  • API使用示例
  • 响应约定
  • 验证指南