Skip to main content

nexus-langchain

NEXUS AI market intelligence tools for LangChain agents.

BTC Signal PyPI

Install

pip install nexus-langchain

Quick start (free tools — no wallet needed)

from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate
from nexus_langchain import get_nexus_tools

llm = ChatOpenAI(model="gpt-4o")
tools = get_nexus_tools(include_paid=False)  # Kalshi, Reputation, DNS — free

prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a financial analyst. Use NEXUS tools to answer questions."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)
result = executor.invoke({"input": "What does Kalshi say about the Fed's next rate decision?"})
print(result["output"])

Paid tools cost $0.001–$0.15 USDC per call via x402 on Base mainnet. Three ways to pay:

pip install nexus-langchain[autopay]
export WALLET_PRIVATE_KEY=0x...   # Base mainnet wallet with USDC

Option 2: Manual payment header

export NEXUS_PAYMENT_HEADER=<your-x402-payment-proof>

Option 3: See 402 response and pay once

Without a wallet, paid tools return payment details:

{
  "payment_required": true,
  "price_usdc": 0.05,
  "pay_to": "0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c",
  "network": "eip155:8453"
}

All tools

from nexus_langchain import (
    # Paid ($0.001–$0.15 USDC)
    NexusMarketSignal,   # BTC/ETH/SOL signal: BULLISH/BEARISH/NEUTRAL
    NexusAggregate,      # CoinGecko + QuantOracle + Kalshi consensus
    NexusWalletAML,      # AML risk score for any EVM/Solana address
    NexusSentiment,      # Sentiment: positive/negative/neutral
    NexusSearch,         # Web search + AI summary

    # Free (no payment needed)
    NexusKalshi,         # Kalshi prediction market consensus
    NexusReputation,     # Agent trust score 0-100
    NexusDNS,            # Route capability to best provider
)

Use individual tools

from langchain.agents import AgentExecutor, create_tool_calling_agent
from nexus_langchain import NexusMarketSignal, NexusKalshi, NexusWalletAML

tools = [NexusMarketSignal(), NexusKalshi(), NexusWalletAML()]
# ... pass to your agent as usual

Pricing

Tool Price Payment
nexus_market_signal $0.05 USDC x402 Base
nexus_aggregate $0.15 USDC x402 Base
nexus_wallet_aml $0.001 USDC x402 Base
nexus_sentiment $0.002 USDC x402 Base
nexus_search $0.02 USDC x402 Base
nexus_kalshi FREE —
nexus_reputation FREE —
nexus_dns FREE —

Payments go to 0xc91cE6291eDC0713ec753BAFBA002506ffb2b95c on Base mainnet.

Metadata

Release files for nexus-langchain 1.0.0

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

Source distribution (sdist)

Source distribution for nexus-langchain 1.0.0
File Size Uploaded Provenance Actions
nexus_langchain-1.0.0.tar.gz 4.7 kB Without provenance Details for nexus_langchain-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nexus-langchain 1.0.0
File Interpreter ABI Platform Actions
nexus_langchain-1.0.0-py3-none-any.whl Python 3 none any Details for nexus_langchain-1.0.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / nexus_langchain-1.0.0.tar.gz

Download URL nexus_langchain-1.0.0.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6c53bd59b13a2e6f2763f28a17f28e202adce2ca81e782e3ff04d7731a772cfa
BLAKE2b-256 checksum
How to use checksums
2f415bce14d0b451566598b8c58ca8976d6b34dd219d7477b5565b0e5f0ce9ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / nexus_langchain-1.0.0-py3-none-any.whl

Download URL nexus_langchain-1.0.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c32551917a78e01568fdc66483157bb26aec7840ae120815725350c414d8f282
BLAKE2b-256 checksum
How to use checksums
4029efec2a2b62799cfc7e4ee26d375ad6b38a0d67d1231f1d59d8d7dbc7248d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for nexus-langchain 1.0.0

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

1.0.0 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