Skip to main content

NEXUS AI market intelligence tools for LangChain — signals, Kalshi markets, wallet AML

Project description

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 (market signals, wallet AML, web search)

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

Option 1: Automatic micropayments (recommended)

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.

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_langchain-1.0.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_langchain-1.0.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file nexus_langchain-1.0.0.tar.gz.

File metadata

  • Download URL: nexus_langchain-1.0.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for nexus_langchain-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6c53bd59b13a2e6f2763f28a17f28e202adce2ca81e782e3ff04d7731a772cfa
MD5 b7999b9bc7cdefe7ac52979fd2910f46
BLAKE2b-256 2f415bce14d0b451566598b8c58ca8976d6b34dd219d7477b5565b0e5f0ce9ab

See more details on using hashes here.

File details

Details for the file nexus_langchain-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for nexus_langchain-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c32551917a78e01568fdc66483157bb26aec7840ae120815725350c414d8f282
MD5 649ddf703d82d9f64d9a62751e30f2ff
BLAKE2b-256 4029efec2a2b62799cfc7e4ee26d375ad6b38a0d67d1231f1d59d8d7dbc7248d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page