Skip to content

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adanos for Haystack

adanos-haystack adds Adanos stock and crypto market sentiment to Haystack pipelines and agents. It retrieves structured signals from Reddit, X / FinTwit, financial news, and Polymarket without adding trading or portfolio logic.

Installation

pip install adanos-haystack

Create an API key at adanos.org/register and provide it through the ADANOS_API_KEY environment variable.

Free, Hobby, and Professional accounts use the same component. Adanos applies the request quota and historical lookback available to the API key's plan. See pricing for the current limits.

Component

AdanosMarketSentiment supports:

  • sentiment for one stock or crypto asset
  • trending assets
  • aggregate market sentiment
  • comparison of multiple assets
  • asset search
  • dataset statistics

Stocks can use reddit, x, news, or polymarket. Crypto sentiment uses reddit.

from haystack_integrations.components.tools.adanos import AdanosMarketSentiment

sentiment = AdanosMarketSentiment()
result = sentiment.run(
    operation="sentiment",
    asset_type="stock",
    source="news",
    symbol="NVDA",
    from_date="2026-07-01",
    to_date="2026-07-07",
)

print(result["result"])

The component supports synchronous run and asynchronous run_async calls.

Pipeline

from haystack import Pipeline
from haystack_integrations.components.tools.adanos import AdanosMarketSentiment

pipeline = Pipeline()
pipeline.add_component("sentiment", AdanosMarketSentiment())

result = pipeline.run(
    {
        "sentiment": {
            "operation": "trending",
            "asset_type": "stock",
            "source": "reddit",
            "limit": 5,
        }
    }
)
print(result["sentiment"]["result"])

Agent Tool

Wrap the component with Haystack's ComponentTool so an Agent can choose the appropriate operation and inputs:

from haystack.tools import ComponentTool
from haystack_integrations.components.tools.adanos import AdanosMarketSentiment

adanos_tool = ComponentTool(
    component=AdanosMarketSentiment(),
    name="market_sentiment",
    description=(
        "Get current and historical stock or crypto market sentiment from Reddit, "
        "X / FinTwit, financial news, and Polymarket."
    ),
)

Pass adanos_tool to a Haystack Agent or a tool-capable Chat Generator.

Authentication And Errors

The API key is stored as a Haystack Secret and sent only in the X-API-Key request header. HTTP errors expose the status code and optional Adanos request ID, but never the API key or upstream response body.

Development

pip install hatch
hatch run fmt-check
hatch run test:all

License

Apache-2.0

About

Adanos stock and crypto market sentiment tools for Haystack pipelines and agents

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages