|
| 1 | +--- |
| 2 | +title: "Cerebrus Pulse integration" |
| 3 | +description: "Integrate with the Cerebrus Pulse crypto intelligence tools using LangChain Python." |
| 4 | +--- |
| 5 | + |
| 6 | +This guide provides a quick overview for getting started with the Cerebrus Pulse [tools](/oss/langchain/tools). For detailed documentation of all available tools and parameters, head to the [Cerebrus Pulse API reference](https://cerebruspulse.xyz/api/pulse). |
| 7 | + |
| 8 | +## Overview |
| 9 | + |
| 10 | +[Cerebrus Pulse](https://cerebruspulse.xyz) provides real-time crypto market intelligence tools for Hyperliquid perpetuals. All tools use [x402](https://www.x402.org/) USDC micropayments on Base — no API keys required. |
| 11 | + |
| 12 | +### Integration details |
| 13 | + |
| 14 | +| Class | Package | Serializable | JS support | Version | |
| 15 | +| :--- | :--- | :---: | :---: | :---: | |
| 16 | +| CerebrusPulseTool | [`langchain-cerebrus-pulse`](https://pypi.org/project/langchain-cerebrus-pulse/) | ❌ | ❌ |  | |
| 17 | + |
| 18 | +### Available tools |
| 19 | + |
| 20 | +| Tool | Description | Price | |
| 21 | +|------|-------------|-------| |
| 22 | +| `CerebrusPulseTool` | Multi-timeframe technical analysis (RSI, EMAs, ATR, Bollinger Bands, VWAP, Z-score, trend, regime, confluence) | $0.02 USDC | |
| 23 | +| `CerebrusSentimentTool` | Market sentiment analysis (fear/greed index, momentum, funding bias) | $0.01 USDC | |
| 24 | +| `CerebrusFundingTool` | Funding rate analysis with historical data | $0.01 USDC | |
| 25 | +| `CerebrusBundleTool` | Combined pulse + sentiment + funding analysis (20% discount vs individual) | $0.04 USDC | |
| 26 | +| `CerebrusScreenerTool` | Scan 30+ coins for top trading signals | $0.04 USDC | |
| 27 | +| `CerebrusOITool` | Open interest analysis | $0.01 USDC | |
| 28 | +| `CerebrusSpreadTool` | Spread and liquidity analysis | $0.008 USDC | |
| 29 | +| `CerebrusCorrelationTool` | BTC-alt correlation matrix | $0.03 USDC | |
| 30 | +| `CerebrusListCoinsTool` | List all supported coins | Free | |
| 31 | +| `CerebrusHealthTool` | API health check | Free | |
| 32 | + |
| 33 | +### Key features |
| 34 | + |
| 35 | +- **No API keys** — payments handled via x402 USDC micropayments on Base |
| 36 | +- **Real-time data** — live Hyperliquid perpetual market data |
| 37 | +- **Multi-timeframe** — supports 1m, 5m, 15m, 1h, 4h, 1d timeframes |
| 38 | +- **Agent-native** — tools return structured data optimized for LLM consumption |
| 39 | + |
| 40 | +--- |
| 41 | + |
| 42 | +## Setup |
| 43 | + |
| 44 | +### Credentials |
| 45 | + |
| 46 | +No API keys are needed. Cerebrus Pulse uses the [x402 protocol](https://www.x402.org/) for USDC micropayments on Base. Your HTTP client handles payment negotiation automatically. |
| 47 | + |
| 48 | +It's also helpful (but not needed) to set up LangSmith for best-in-class observability/<Tooltip tip="Log each step of a model's execution to debug and improve it">tracing</Tooltip> of your tool calls. To enable automated tracing, set your [LangSmith](/langsmith/home) API key: |
| 49 | + |
| 50 | +```python Enable tracing icon="flask" |
| 51 | +import os |
| 52 | +os.environ["LANGSMITH_API_KEY"] = "your-langsmith-api-key" |
| 53 | +os.environ["LANGSMITH_TRACING"] = "true" |
| 54 | +``` |
| 55 | + |
| 56 | +### Installation |
| 57 | + |
| 58 | +Install the `langchain-cerebrus-pulse` package: |
| 59 | + |
| 60 | +<CodeGroup> |
| 61 | + ```python pip |
| 62 | + pip install -U langchain-cerebrus-pulse |
| 63 | + ``` |
| 64 | + ```python uv |
| 65 | + uv add langchain-cerebrus-pulse |
| 66 | + ``` |
| 67 | +</CodeGroup> |
| 68 | + |
| 69 | +--- |
| 70 | + |
| 71 | +## Instantiation |
| 72 | + |
| 73 | +```python Initialize tool instance icon="robot" |
| 74 | +from langchain_cerebrus_pulse import CerebrusPulseTool |
| 75 | + |
| 76 | +tool = CerebrusPulseTool() |
| 77 | +``` |
| 78 | + |
| 79 | +--- |
| 80 | + |
| 81 | +## Invocation |
| 82 | + |
| 83 | +### Directly |
| 84 | + |
| 85 | +The `CerebrusPulseTool` accepts a coin symbol and one or more timeframes: |
| 86 | + |
| 87 | +```python Call tool icon="rocket" |
| 88 | +result = tool.invoke({"coin": "BTC", "timeframes": "1h,4h"}) |
| 89 | +print(result) |
| 90 | +``` |
| 91 | + |
| 92 | +### Using other tools |
| 93 | + |
| 94 | +```python Sentiment and funding icon="chart-line" |
| 95 | +from langchain_cerebrus_pulse import CerebrusSentimentTool, CerebrusFundingTool |
| 96 | + |
| 97 | +sentiment = CerebrusSentimentTool() |
| 98 | +print(sentiment.invoke({"coin": "ETH"})) |
| 99 | + |
| 100 | +funding = CerebrusFundingTool() |
| 101 | +print(funding.invoke({"coin": "BTC"})) |
| 102 | +``` |
| 103 | + |
| 104 | +### Bundle analysis |
| 105 | + |
| 106 | +Get combined pulse, sentiment, and funding data at a 20% discount: |
| 107 | + |
| 108 | +```python Bundle tool icon="layer-group" |
| 109 | +from langchain_cerebrus_pulse import CerebrusBundleTool |
| 110 | + |
| 111 | +bundle = CerebrusBundleTool() |
| 112 | +result = bundle.invoke({"coin": "BTC", "timeframes": "1h,4h"}) |
| 113 | +``` |
| 114 | + |
| 115 | +### Market screener |
| 116 | + |
| 117 | +Scan all supported coins for top trading signals: |
| 118 | + |
| 119 | +```python Screener icon="magnifying-glass" |
| 120 | +from langchain_cerebrus_pulse import CerebrusScreenerTool |
| 121 | + |
| 122 | +screener = CerebrusScreenerTool() |
| 123 | +top_signals = screener.invoke({}) |
| 124 | +``` |
| 125 | + |
| 126 | +### As a ToolCall |
| 127 | + |
| 128 | +Invoke the tool with a model-generated `ToolCall`, in which case a `ToolMessage` will be returned: |
| 129 | + |
| 130 | +```python ToolCall icon="briefcase" |
| 131 | +# This is usually generated by a model, but we'll create a tool call directly for demo purposes. |
| 132 | +model_generated_tool_call = { |
| 133 | + "args": {"coin": "BTC", "timeframes": "1h,4h"}, |
| 134 | + "id": "1", |
| 135 | + "name": tool.name, |
| 136 | + "type": "tool_call", |
| 137 | +} |
| 138 | +tool.invoke(model_generated_tool_call) |
| 139 | +``` |
| 140 | + |
| 141 | +### Within an agent |
| 142 | + |
| 143 | +Use Cerebrus Pulse tools in a LangChain agent for autonomous crypto market analysis: |
| 144 | + |
| 145 | +```python Agent with tools icon="robot" |
| 146 | +from langchain_cerebrus_pulse import ( |
| 147 | + CerebrusPulseTool, |
| 148 | + CerebrusSentimentTool, |
| 149 | + CerebrusFundingTool, |
| 150 | + CerebrusScreenerTool, |
| 151 | +) |
| 152 | +from langchain.agents import create_agent |
| 153 | + |
| 154 | +tools = [ |
| 155 | + CerebrusPulseTool(), |
| 156 | + CerebrusSentimentTool(), |
| 157 | + CerebrusFundingTool(), |
| 158 | + CerebrusScreenerTool(), |
| 159 | +] |
| 160 | + |
| 161 | +agent = create_agent( |
| 162 | + model="claude-sonnet-4-6", |
| 163 | + tools=tools, |
| 164 | +) |
| 165 | + |
| 166 | +result = agent.invoke( |
| 167 | + {"messages": [{"role": "user", "content": "Analyze BTC market conditions across multiple timeframes and check overall market sentiment"}]} |
| 168 | +) |
| 169 | +``` |
| 170 | + |
| 171 | +--- |
| 172 | + |
| 173 | +## API reference |
| 174 | + |
| 175 | +- [Cerebrus Pulse API Documentation](https://cerebruspulse.xyz/api/pulse) |
| 176 | +- [GitHub Repository](https://github.com/0xsl1m/langchain-cerebrus-pulse) |
| 177 | +- [PyPI Package](https://pypi.org/project/langchain-cerebrus-pulse/) |
| 178 | +- [x402 Protocol](https://www.x402.org/) |
0 commit comments