Skip to main content

LangChain tools for Cerebrus Pulse crypto intelligence API

Project description

LangChain Cerebrus Pulse

LangChain tools for Cerebrus Pulse — real-time crypto intelligence for AI agents. 50+ Hyperliquid perpetuals via x402 micropayments.

Install

pip install langchain-cerebrus-pulse

Quick Start

from langchain_cerebrus_pulse import (
    CerebrusListCoinsTool,
    CerebrusPulseTool,
    CerebrusSentimentTool,
    CerebrusFundingTool,
    CerebrusBundleTool,
    CerebrusScreenerTool,
    CerebrusOITool,
    CerebrusSpreadTool,
    CerebrusCorrelationTool,
    CerebrusLiquidationsTool,
    CerebrusStressTool,
    CerebrusCexDexTool,
    CerebrusBasisTool,
    CerebrusDepegTool,
)

# Add to your agent's tools
tools = [
    CerebrusListCoinsTool(),      # Free
    CerebrusPulseTool(),          # $0.025/query
    CerebrusScreenerTool(),       # $0.06/query — scan all coins
    CerebrusLiquidationsTool(),   # $0.03/query — liquidation heatmap
    CerebrusStressTool(),         # $0.015/query — market stress index
    CerebrusCexDexTool(),         # $0.02/query — CEX-DEX divergence
    CerebrusBasisTool(),          # $0.02/query — Chainlink basis
    CerebrusDepegTool(),          # $0.01/query — USDC peg health
    CerebrusSentimentTool(),      # $0.01/query
    CerebrusFundingTool(),        # $0.01/query
    CerebrusOITool(),             # $0.01/query
    CerebrusSpreadTool(),         # $0.008/query
    CerebrusCorrelationTool(),    # $0.03/query
    CerebrusBundleTool(),         # $0.05/query
]

With a LangChain Agent

from langchain_openai import ChatOpenAI
from langchain.agents import AgentExecutor, create_tool_calling_agent
from langchain_core.prompts import ChatPromptTemplate
from langchain_cerebrus_pulse import (
    CerebrusListCoinsTool, CerebrusPulseTool,
    CerebrusLiquidationsTool, CerebrusStressTool,
)

llm = ChatOpenAI(model="gpt-4o")
tools = [
    CerebrusListCoinsTool(),
    CerebrusPulseTool(),
    CerebrusLiquidationsTool(),
    CerebrusStressTool(),
]

prompt = ChatPromptTemplate.from_messages([
    ("system", "You are a crypto analyst with access to real-time Hyperliquid data via Cerebrus Pulse."),
    ("human", "{input}"),
    ("placeholder", "{agent_scratchpad}"),
])

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

result = executor.invoke({"input": "Where are the BTC liquidation clusters and what's the cascade risk?"})
print(result["output"])

Available Tools (14)

Tool Cost Description
CerebrusListCoinsTool Free List 50+ available Hyperliquid perpetuals
CerebrusPulseTool $0.025 Technical analysis (RSI, EMAs, Bollinger, trend, regime, confluence)
CerebrusScreenerTool $0.06 Scan 50+ coins: signals, trends, vol regime, confluence
CerebrusLiquidationsTool $0.03 Liquidation heatmap by leverage tier with cascade risk
CerebrusStressTool $0.015 Cross-chain market stress index (8 chains)
CerebrusCexDexTool $0.02 CEX-DEX price divergence (Coinbase vs Chainlink/Uniswap)
CerebrusBasisTool $0.02 Chainlink basis: HL perp oracle vs Chainlink spot
CerebrusDepegTool $0.01 USDC collateral health via Chainlink oracle
CerebrusSentimentTool $0.01 Market sentiment (fear/greed, momentum, funding bias)
CerebrusFundingTool $0.01 Funding rates with historical data
CerebrusOITool $0.01 Open interest: delta, percentile, trend, divergence
CerebrusSpreadTool $0.008 Spread: slippage estimates at various sizes, liquidity score
CerebrusCorrelationTool $0.03 BTC-alt correlation matrix with regime classification
CerebrusBundleTool $0.05 All data combined (9% discount)

Links

Disclaimer

Cerebrus Pulse provides market data and technical indicators for informational purposes only. Nothing provided by these tools or the underlying API constitutes financial advice, investment advice, or trading advice. AI-generated analysis, signals, and sentiment labels are algorithmic outputs — not recommendations to buy, sell, or hold any asset. Cryptocurrency trading involves substantial risk of loss. You are solely responsible for your own trading decisions.

License

MIT

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

langchain_cerebrus_pulse-0.3.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

langchain_cerebrus_pulse-0.3.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file langchain_cerebrus_pulse-0.3.2.tar.gz.

File metadata

File hashes

Hashes for langchain_cerebrus_pulse-0.3.2.tar.gz
Algorithm Hash digest
SHA256 b202c324b70e832b3cbb7cc721fcdb9966e22d165c46179ad33a163f3901e9cc
MD5 8459e65e8ea3a4c24eadd4c0439b56f2
BLAKE2b-256 6f8e70ee5b739f541fd74915d4712e572dfbe836bd969b94509916c2816421e3

See more details on using hashes here.

File details

Details for the file langchain_cerebrus_pulse-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for langchain_cerebrus_pulse-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 46c07ea8ff8b6cd1da32e8411c66d20743022597976597b5aa38c0660e89f3bf
MD5 98ad19ec51089b8357109dfeea98a8c4
BLAKE2b-256 019b41f4cd76d4de68b2bfbba3ecad1091f2ca60a6989cde5a7a077232b1c388

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