LangChain tools for ReNoUn structural market regime classification
Project description
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 stdliburllib)
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file langchain_renoun-0.1.0.tar.gz.
File metadata
- Download URL: langchain_renoun-0.1.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2446e2be30845ee42f5962fff60573a0c2d23c0e6107153ac9f0b4edb7fcabc
|
|
| MD5 |
5e6c585d8e02ea462dae230addac185b
|
|
| BLAKE2b-256 |
62347838980024ba464f0176f1e12a8886e271d10c967ed7a4aa8e9cdb3e6bdb
|
File details
Details for the file langchain_renoun-0.1.0-py3-none-any.whl.
File metadata
- Download URL: langchain_renoun-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
918462c0dd93d1599ca852cd4ecc0ca2b8a1f5eabd5b9d35bccfd65a51fc4c54
|
|
| MD5 |
6265c0a5dee8092ef47731cd5d1c4e9e
|
|
| BLAKE2b-256 |
47a3fc47ba4749edaec19644468477a993cd910b416a84fc4513500b12a3a765
|