Skip to main content

Junctionary Pulse — LangChain Toolkit

Give your LangChain agents finished stock-market briefings: one tool call per ticker, every weekday morning. No raw-news plumbing, no 50k-token web-research loops — just structured briefings with sources.

  • Product: junctionarypulse.com — $5/mo agent plan, any 5 tickers
  • Auth: X-API-Key header (get a key at /agents)
  • Rate limit: 120 requests/min

Installation

pip install junctionary-pulse-langchain

Usage

import os
from langchain.agents import create_agent
from junctionary_langchain import JunctionaryPulseToolkit

toolkit = JunctionaryPulseToolkit(
    api_key=os.environ["JUNCTIONARY_API_KEY"],
)

# Works with any LangChain agent — tools are just BaseTools
agent = create_agent(
    model="claude-haiku-4-5",
    tools=toolkit.get_tools(),
    system_prompt="You are a market research assistant. Use Junctionary Pulse "
                  "tools for stock news; always cite sources from the briefing.",
)

result = agent.invoke({
    "messages": [{"role": "user",
                  "content": "What's the latest on Nvidia, and is sentiment improving?"}]
})
print(result["messages"][-1].content)

With a lower-level chain, call tools directly:

tools = {t.name: t for t in toolkit.get_tools()}

briefing = tools["get_briefing"].invoke({"pulse_id": "nvidia"})
history  = tools["get_briefing_history"].invoke({"pulse_id": "nvidia", "days": 14})

# async works too
briefing = await tools["get_briefing"].ainvoke({"pulse_id": "nvidia"})

Tools

Tool Arguments When the agent uses it
list_pulses — Discover which tickers have briefings; call first when unsure of a pulse_id
get_watchlist_digest — Start here every morning. One call returns today's headline, TL;DR, price, and story count for EVERY subscribed ticker — 1 API call instead of N
get_briefing pulse_id "What's happening with X today?" — today's full briefing (headline, TL;DR, stories, sources)
get_briefing_for_date pulse_id, date (YYYY-MM-DD) Past news, catching up on missed days, backtesting, training data (90-day backfill)
get_briefing_history pulse_id, days (1–90) Multi-day overview: headline + story count + sentiment label per day — scan this before pulling individual days
get_sentiment_trends pulse_id, days (1–90) "Is sentiment turning negative?" — numeric sentiment scores and volume trends
compare_tickers ticker_a, ticker_b, days (1–90) "How does NVDA compare to AMD?" — side-by-side sentiment scores, trend direction, and a plain-English verdict
get_earnings_date ticker "When does NVDA report?" — next earnings date for a ticker
resolve_ticker query Company name → ticker symbol ("Apple" → AAPL). Call first when you have a name but not a symbol
get_alerts tickers?, since? Intraday price-move alerts (not news — use get_briefing for news)

Reading the room: which tool when

  • "What's happening today?" / morning catch-up → get_watchlist_digest (1 call, everything)
  • "Latest news on TSLA" → get_briefing
  • "Catch me up on Apple this month" → get_briefing_history, then get_briefing_for_date for the interesting days
  • "Is NVDA sentiment improving?" → get_sentiment_trends
  • "NVDA vs AMD — which looks better?" → compare_tickers
  • "When does Apple report earnings?" → get_earnings_date
  • "What's the ticker for ServiceNow?" → resolve_ticker
  • "What happened with MSFT last Tuesday?" → get_briefing_for_date
  • "Did anything move today?" → get_alerts
  • "What do you cover?" → list_pulses

Token efficiency

get_watchlist_digest is the cheapest way to orient an agent: one HTTP call returns a compact row per ticker (headline, TL;DR, previous close, story count) instead of one full get_briefing call per ticker. For a 5-ticker subscription, that's roughly 1/10th the tokens of pulling five full briefings. Scan the digest first, then get_briefing only for the tickers that matter.

Error handling

Tools never raise into the agent loop. Failures come back as plain-text messages the agent can act on:

Situation Tool returns
Bad API key (401) Error: Invalid API key. Get a key at …
Ticker not in subscription (403) Error: Not entitled to this ticker …
Unknown ticker/date (404) Error: Not found. …
Rate limited (429) Error: Rate limited (120/min). Retry after N seconds.
Network failure Error: Could not reach the Junctionary Pulse API: …

Configuration

JunctionaryPulseToolkit(
    api_key="jp_...",                              # or JUNCTIONARY_API_KEY env var
    api_base="https://api.junctionarypulse.com",   # override for staging/tests
)

Tests

python3 -m pytest test_toolkit.py -v

All HTTP is mocked — no live API calls, no API key needed.

Metadata

Release files for junctionary-pulse-langchain 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for junctionary-pulse-langchain 0.1.1
File Size Uploaded Provenance Actions
junctionary_pulse_langchain-0.1.1.tar.gz 14.1 kB Without provenance Details for junctionary_pulse_langchain-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for junctionary-pulse-langchain 0.1.1
File Interpreter ABI Platform Actions
junctionary_pulse_langchain-0.1.1-py3-none-any.whl Python 3 none any Details for junctionary_pulse_langchain-0.1.1-py3-none-any.whl

Total release size: 27.6 kB

Release files / junctionary_pulse_langchain-0.1.1.tar.gz

Download URL junctionary_pulse_langchain-0.1.1.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
54558f39a8f0f86726f6cc9e248c8bd137717a8bbc5108809e561fe913edf3d4
BLAKE2b-256 checksum
How to use checksums
889b03517a2777e2997fd4158b722b622a1fdee8702813d604adc635b5183949
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Release files / junctionary_pulse_langchain-0.1.1-py3-none-any.whl

Download URL junctionary_pulse_langchain-0.1.1-py3-none-any.whl
Size 13.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9f35ef47e73ac2828fd8c62f7c3ee25c80c543fe18f8a7cdd01f88adf1c9a97
BLAKE2b-256 checksum
How to use checksums
75357956c1d341e5b9070f8992f1ab63506cb40091be45d6e547422974f234d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.3

Security for junctionary-pulse-langchain 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page