Skip to main content

Python SDK for the Adanos Market Sentiment API

Project description

adanos

PyPI version

adanos is the public Python SDK for the Adanos Market Sentiment API.

It gives you typed access to:

  • Reddit stock sentiment
  • News sentiment and source-filtered rankings
  • X/Twitter stock sentiment
  • Polymarket stock activity and market attention
  • Reddit crypto sentiment

Links:

Package and import:

  • PyPI package: adanos
  • Python import: adanos

Install

python3 -m pip install adanos

Quick Start

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

trending = client.reddit.trending(limit=10)
tsla = client.reddit.stock("TSLA")
explanation = client.reddit.explain("TSLA")

print(trending[0].ticker)
print(tsla.buzz_score)
print(explanation.explanation)

What You Can Do

  • Rank trending stocks across Reddit, News, X, and Polymarket
  • Pull service-level market sentiment snapshots across every public namespace
  • Pull detailed ticker reports for a fixed lookback window
  • Search and compare tickers across datasets
  • Generate AI-written explanations for Reddit and News stock trends
  • Track Reddit crypto tokens via the same client
  • Use sync or async methods without changing the namespace structure

Namespaces

  • client.reddit.* for Reddit Stocks
  • client.news.* for News Stocks
  • client.x.* for X/Twitter Stocks
  • client.polymarket.* for Polymarket Stocks
  • client.crypto.* for Reddit Crypto
  • client.reddit_crypto.* is an alias for client.crypto.*
  • client.health() for root API health aggregated across services

Examples

Reddit Stocks

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

root_health = client.health()
trending = client.reddit.trending(limit=10)
sectors = client.reddit.trending_sectors(limit=10)
countries = client.reddit.trending_countries(limit=10)
tsla = client.reddit.stock("TSLA")
explanation = client.reddit.explain("TSLA")
results = client.reddit.search("Tesla", limit=10)
comparison = client.reddit.compare(["TSLA", "AAPL", "MSFT"])
market = client.reddit.market_sentiment()

News

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

news_trending = client.news.trending(source="reuters")
sectors = client.news.trending_sectors(source="reuters")
countries = client.news.trending_countries(source="reuters")
nvda = client.news.stock("NVDA")
explanation = client.news.explain("NVDA")
results = client.news.search("Nvidia", limit=10)
comparison = client.news.compare(["NVDA", "AAPL"])
market = client.news.market_sentiment()
stats = client.news.stats()
health = client.news.health()

X/Twitter

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

x_trending = client.x.trending(limit=20)
sectors = client.x.trending_sectors(limit=10)
countries = client.x.trending_countries(limit=10)
nvda = client.x.stock("NVDA")
explanation = client.x.explain("NVDA")
results = client.x.search("Nvidia", limit=10)
comparison = client.x.compare(["NVDA", "AMD"])
market = client.x.market_sentiment()
stats = client.x.stats()
health = client.x.health()

Polymarket

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

pm_trending = client.polymarket.trending(limit=20, type="stock")
sectors = client.polymarket.trending_sectors(limit=10)
countries = client.polymarket.trending_countries(limit=10)
aapl = client.polymarket.stock("AAPL")
results = client.polymarket.search("Apple", limit=10)
comparison = client.polymarket.compare(["AAPL", "TSLA"])
market = client.polymarket.market_sentiment()
stats = client.polymarket.stats()
health = client.polymarket.health()

Polymarket semantics:

  • buzz_score is activity-first and optimized for current market attention
  • total_liquidity is a windowed signal over the selected period
  • current_market_count is the live-only active-market breadth; market_count remains the selected-window breadth
  • top_mentions on stock() are relevance-sorted by trading activity first

Reddit Crypto

from adanos import AdanosClient

client = AdanosClient(api_key="sk_live_...")

trending = client.crypto.trending(limit=20)
btc = client.crypto.token("BTC")
mentions = client.crypto.mentions("BTC", from_="2026-05-01", to="2026-05-07", limit=10, offset=10)
results = client.crypto.search("bitcoin", limit=10)
comparison = client.crypto.compare(["BTC", "ETH"])
market = client.crypto.market_sentiment()
stats = client.crypto.stats()
health = client.crypto.health()

Available Methods

client.*

Method Description
health() Root API health aggregated across services

client.reddit.*

Method Description
trending(from_, to, days, limit, offset, type) Trending stocks by buzz score
trending_sectors(from_, to, days, limit, offset) Trending sectors
trending_countries(from_, to, days, limit, offset) Trending countries
stock(ticker, from_, to, days) Detailed sentiment for a ticker
mentions(ticker, from_, to, days, limit, offset, include_inherited) Raw Reddit mention rows
explain(ticker) AI-generated trend explanation
search(query, from_, to, days, limit) Search stocks by name or ticker with a summary block
compare(tickers, from_, to, days) Compare up to 10 stocks
market_sentiment(from_, to, days) Service-level Reddit market sentiment snapshot
stats() Dataset statistics
health() Public service health

Period options: use from_ and to as YYYY-MM-DD inclusive UTC dates for reproducible windows. The SDK serializes from_ as query parameter from. days remains available as a legacy v1-compatible shorthand. The API returns 422 if from, to, and days are all sent together. Responses keep period_days; retain requested dates client-side if you need them later.

client.news.*

Method Description
trending(from_, to, days, limit, offset, type, source) Trending stocks from news
trending_sectors(from_, to, days, limit, offset, source) Trending sectors from news
trending_countries(from_, to, days, limit, offset, source) Trending countries from news
stock(ticker, from_, to, days) Detailed news sentiment for a ticker
mentions(ticker, from_, to, days, limit, offset) Raw news mention rows
explain(ticker) AI-generated explanation from news context
search(query, from_, to, days, limit) Search stocks in the news dataset with a summary block
compare(tickers, from_, to, days) Compare up to 10 stocks in news
market_sentiment(from_, to, days) Service-level News market sentiment snapshot
stats() News dataset statistics
health() Public news service health

client.x.*

Method Description
trending(from_, to, days, limit, offset, type) Trending stocks on X/Twitter
trending_sectors(from_, to, days, limit, offset) Trending sectors
trending_countries(from_, to, days, limit, offset) Trending countries
stock(ticker, from_, to, days) Detailed X/Twitter sentiment
mentions(ticker, from_, to, days, limit, offset) Raw X/Twitter mention rows
explain(ticker) AI-generated explanation from X/Twitter context
search(query, from_, to, days, limit) Search stocks with a summary block
compare(tickers, from_, to, days) Compare stocks
market_sentiment(from_, to, days) Service-level X/Twitter market sentiment snapshot
stats() Dataset statistics
health() Public service health

client.polymarket.*

Method Description
trending(from_, to, days, limit, offset, type) Trending stocks on Polymarket with activity-first buzz and windowed liquidity
trending_sectors(from_, to, days, limit, offset) Trending sectors
trending_countries(from_, to, days, limit, offset) Trending countries
stock(ticker, from_, to, days) Detailed Polymarket activity, sentiment, and relevance-sorted market questions
mentions(ticker, from_, to, days, limit, offset) Raw Polymarket market snapshots
search(query, from_, to, days, limit) Search stocks with a summary block
compare(tickers, from_, to, days) Compare stocks with windowed Polymarket activity signals
market_sentiment(from_, to, days) Service-level Polymarket market sentiment snapshot
stats() Dataset statistics
health() Public service health

client.crypto.*

Method Description
trending(from_, to, days, limit, offset) Trending Reddit crypto tokens
token(symbol, from_, to, days) Detailed token sentiment and buzz
mentions(symbol, from_, to, days, limit, offset, include_inherited) Raw Reddit crypto mention rows
search(query, from_, to, days, limit) Search tokens by symbol or name with a summary block
compare(symbols, from_, to, days) Compare multiple tokens
market_sentiment(from_, to, days) Service-level Reddit Crypto market sentiment snapshot
stats() Dataset statistics
health() Public service health

Async Usage

Every namespace method also has an _async variant.

import asyncio

from adanos import AdanosClient


async def main() -> None:
    async with AdanosClient(api_key="sk_live_...") as client:
        trending = await client.reddit.trending_async(limit=10)
        tsla = await client.reddit.stock_async("TSLA")
        explanation = await client.news.explain_async("NVDA")
        print(trending[0].ticker)
        print(tsla.trend)
        print(explanation.explanation)


asyncio.run(main())

Authentication and Configuration

Get an API key at https://api.adanos.org/docs

from adanos import AdanosClient

client = AdanosClient(
    api_key="sk_live_...",
    base_url="https://api.adanos.org",
    timeout=60.0,
)

Notes:

  • api_key is required for protected endpoints
  • base_url lets you target another deployment or staging environment
  • timeout is passed through to the underlying httpx client
  • the SDK does not auto-load local CLI profiles or env-specific config files

Context management:

from adanos import AdanosClient

with AdanosClient(api_key="sk_live_...") as client:
    print(client.reddit.health())

Errors and Responses

  • Most SDK methods return typed models from the generated OpenAPI client
  • market_sentiment() methods return the live JSON payload directly so the new endpoint family is available before the next full generated refresh
  • Documented API errors are returned as typed error models
  • Undocumented statuses raise UnexpectedStatus
  • For long-lived processes, use with, async with, close(), or aclose() to release HTTP resources

Rate Limits

Typical platform limits:

Tier Monthly Requests Burst Limit
Free 250 100/min
Paid Unlimited 1000/min

See the live API docs for the current contract and plan details.

Migration from social-stock-sentiment

Version 1.0.0 starts the new adanos package line and renames both the PyPI package and the Python import path.

Old:

python3 -m pip install social-stock-sentiment
from stocksentiment import StockSentimentClient

New:

python3 -m pip install adanos
from adanos import AdanosClient

The client API and namespace layout stay the same. Most upgrades only need a dependency rename and an import rewrite.

AdanosClient is now the primary public client name. StockSentimentClient remains available as a compatibility alias.

If you adopted the pre-release adanos-python-sdk naming locally, switch that install/import pair too:

python3 -m pip uninstall adanos-python-sdk
python3 -m pip install adanos
from adanos import AdanosClient

Development

python3 -m pip install -e ".[dev]"
python3 -m pytest tests -q
python3 -m build

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

adanos-2.3.1.tar.gz (105.6 kB view details)

Uploaded Source

Built Distribution

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

adanos-2.3.1-py3-none-any.whl (267.0 kB view details)

Uploaded Python 3

File details

Details for the file adanos-2.3.1.tar.gz.

File metadata

  • Download URL: adanos-2.3.1.tar.gz
  • Upload date:
  • Size: 105.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adanos-2.3.1.tar.gz
Algorithm Hash digest
SHA256 499a4f9f25662272c1cc378cd3f56e46fb95f26151f9c1c59bdb452257ced3dd
MD5 f9e9aa42946cd31acedab738e5bbe183
BLAKE2b-256 1c7326616d801ef1014d5f504b04f265931d64a6917d81c905b135aacc150cb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for adanos-2.3.1.tar.gz:

Publisher: publish-pypi.yml on adanos-software/adanos-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file adanos-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: adanos-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 267.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for adanos-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa4f586b949ec30d7dc2da61bfef34b13bd69e0ff82321c7f7720860071383bb
MD5 5864332391920fdd1dac89630c1fe66b
BLAKE2b-256 d4c0297e254394cb2f49d45606ec08c1b7dee27f6cc77669371e4546cd33d329

See more details on using hashes here.

Provenance

The following attestation bundles were made for adanos-2.3.1-py3-none-any.whl:

Publisher: publish-pypi.yml on adanos-software/adanos-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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