Skip to main content

langchain-renoun

LangChain tools for ReNoUn structural market regime classification.

Know when NOT to trade. ReNoUn analyzes market microstructure across 17 channels to classify the current regime as bounded, active, or unstable — then tells your agent whether to proceed, reduce, avoid, or monitor.

100% bounded regime accuracy across 265+ graded predictions.

Installation

pip install langchain-renoun

Quick Start

from langchain_renoun import ReNoUnRegimeTool

# Get a free API key (50 calls/day, no payment required)
from langchain_renoun import ReNoUnProvisionKeyTool
provisioner = ReNoUnProvisionKeyTool()
print(provisioner.invoke({"email": "you@example.com"}))

# Check BTC regime before trading
tool = ReNoUnRegimeTool(api_key="rn_agent_your_key_here")
result = tool.invoke({"symbol": "BTCUSDT"})
print(result)

Output:

Symbol: BTCUSDT
Regime: bounded
Action: proceed
DHS: 0.72
Confidence: 0.85
Constellation: CLOSED_LOOP
Exposure: 0.80
Envelope: ±2.0%
Detail: Structure healthy. Position size: 80% of intended.
Description: Range-bound, <2% move expected
Stability: 0.78 (halflife: 240min, risk: low, urgency: normal)

Tools

ReNoUnRegimeTool

Pre-trade risk check for a single asset. Call this before any crypto trade.

from langchain_renoun import ReNoUnRegimeTool

tool = ReNoUnRegimeTool(api_key="rn_agent_...")
result = tool.invoke({"symbol": "ETHUSDT", "timeframe": "4h"})

Returns: regime, action, DHS health score, stability estimate, position sizing, news alerts, transition warnings.

ReNoUnBatchRegimeTool

Portfolio-level risk check across multiple assets.

from langchain_renoun import ReNoUnBatchRegimeTool

tool = ReNoUnBatchRegimeTool(api_key="rn_agent_...")
result = tool.invoke({
    "symbols": ["BTCUSDT", "ETHUSDT", "SOLUSDT"],
    "timeframe": "1h"
})

Returns: per-asset regime + portfolio-level action. If 2+ assets are unstable, portfolio action is avoid.

ReNoUnProvisionKeyTool

Self-provision a free API key. No payment required.

from langchain_renoun import ReNoUnProvisionKeyTool

tool = ReNoUnProvisionKeyTool()
result = tool.invoke({"email": "agent@example.com", "agent_name": "my-trading-bot"})

Returns: API key with 50 free calls/day.

Use with LangChain Agents

from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate
from langchain_renoun import ReNoUnRegimeTool, ReNoUnBatchRegimeTool

# Set up tools
tools = [
    ReNoUnRegimeTool(api_key="rn_agent_..."),
    ReNoUnBatchRegimeTool(api_key="rn_agent_..."),
]

# Create agent
llm = ChatOpenAI(model="gpt-4o")
prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a crypto trading assistant. Always check the market regime before recommending trades."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

agent = create_tool_calling_agent(llm, tools, prompt)
executor = AgentExecutor(agent=agent, tools=tools)

result = executor.invoke({"input": "Should I buy ETH right now?"})

Regime Reference

Regime Meaning Typical Action
bounded Range-bound, low volatility expected proceed at full size
active Trending or recovering, moderate moves proceed or reduce size
unstable Structure fragmenting, high risk avoid — skip the trade

API Details

  • Base URL: https://web-production-817e2.up.railway.app
  • Auth: Bearer token (Authorization: Bearer rn_agent_...)
  • Free tier: 50 calls/day, no payment required
  • Rate limit: 1000 calls/hour
  • Cache: 60-second regime cache per symbol/timeframe
  • No external dependencies beyond langchain-core (uses stdlib urllib)

Links

Release files for langchain-renoun 0.1.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 langchain-renoun 0.1.0
File Size Uploaded
langchain_renoun-0.1.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for langchain-renoun 0.1.0
File Interpreter ABI Platform
langchain_renoun-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.4 kB

Release files / langchain_renoun-0.1.0.tar.gz

Download URL langchain_renoun-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f2446e2be30845ee42f5962fff60573a0c2d23c0e6107153ac9f0b4edb7fcabc
BLAKE2b-256 checksum
How to use checksums
62347838980024ba464f0176f1e12a8886e271d10c967ed7a4aa8e9cdb3e6bdb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / langchain_renoun-0.1.0-py3-none-any.whl

Download URL langchain_renoun-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
918462c0dd93d1599ca852cd4ecc0ca2b8a1f5eabd5b9d35bccfd65a51fc4c54
BLAKE2b-256 checksum
How to use checksums
47a3fc47ba4749edaec19644468477a993cd910b416a84fc4513500b12a3a765
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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