Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to the Adanos Python SDK will be documented in this file.
Format: [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)

## [2.7.0] - 2026-08-09

### Added
- Synced generated model coverage with Adanos Market Sentiment API `1.49.0`, including Polymarket ticker `pulse`, daily bullish/bearish percentages, and structured compare/unsupported-asset errors.

### Changed
- Polymarket market-level `unique_traders` is nullable when retained wallet-level trades do not cover the requested window.
- X/Twitter trending `trend` now uses the documented `rising` / `falling` / `stable` enum.
- Documented stable per-UTC-day `trend_history` semantics from API `1.48.1`.

## [2.6.0] - 2026-06-23

### Added
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,11 @@ 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
- `unique_traders` can be `None` when retained wallet-level trades do not fully cover the requested window
- `pulse` on `stock()` provides a compact current interpretation; use its evidence and warnings as data-quality context
- `top_mentions` on `stock()` are representative sentiment evidence, with directional markets prioritized

Across platforms, each `trend_history` value represents its own UTC calendar day. The final value for a live window describes the current partial UTC day and is not expected to equal the top-level period `buzz_score`.

### Reddit Crypto

Expand Down
2 changes: 1 addition & 1 deletion src/adanos/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Adanos Market Sentiment API — Python SDK."""

__version__ = "2.6.0"
__version__ = "2.7.0"

from ._wrapper import AdanosClient, StockSentimentClient

Expand Down
5 changes: 3 additions & 2 deletions src/adanos/_generated/api/news_stocks/compare_news_stocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.compare_limit_error import CompareLimitError
from ...models.error_response import ErrorResponse
from ...models.historical_limit_error import HistoricalLimitError
from ...models.http_validation_error import HTTPValidationError
Expand Down Expand Up @@ -58,7 +59,7 @@ def _parse_response(
return response_200

if response.status_code == 400:
response_400 = cast(Any, None)
response_400 = CompareLimitError.from_dict(response.json())
return response_400

if response.status_code == 401:
Expand All @@ -79,7 +80,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from ...models.historical_limit_error import HistoricalLimitError
from ...models.http_validation_error import HTTPValidationError
from ...models.invalid_period_error import InvalidPeriodError
from ...models.unsupported_asset_error import UnsupportedAssetError
from ...models.news_stock_sentiment import NewsStockSentiment
from ...types import UNSET, Response, Unset

Expand Down Expand Up @@ -69,7 +70,7 @@ def _parse_response(
return response_403

if response.status_code == 404:
response_404 = cast(Any, None)
response_404 = UnsupportedAssetError.from_dict(response.json())
return response_404

if response.status_code == 422:
Expand All @@ -80,7 +81,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.compare_limit_error import CompareLimitError
from ...models.error_response import ErrorResponse
from ...models.historical_limit_error import HistoricalLimitError
from ...models.http_validation_error import HTTPValidationError
Expand Down Expand Up @@ -58,7 +59,7 @@ def _parse_response(
return response_200

if response.status_code == 400:
response_400 = cast(Any, None)
response_400 = CompareLimitError.from_dict(response.json())
return response_400

if response.status_code == 401:
Expand All @@ -79,7 +80,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ...models.http_validation_error import HTTPValidationError
from ...models.invalid_period_error import InvalidPeriodError
from ...models.polymarket_stock_detail_response import PolymarketStockDetailResponse
from ...models.unsupported_asset_error import UnsupportedAssetError
from ...types import UNSET, Response, Unset


Expand Down Expand Up @@ -69,7 +70,7 @@ def _parse_response(
return response_403

if response.status_code == 404:
response_404 = cast(Any, None)
response_404 = UnsupportedAssetError.from_dict(response.json())
return response_404

if response.status_code == 422:
Expand All @@ -80,7 +81,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.compare_limit_error import CompareLimitError
from ...models.crypto_compare_response import CryptoCompareResponse
from ...models.error_response import ErrorResponse
from ...models.historical_limit_error import HistoricalLimitError
Expand Down Expand Up @@ -58,7 +59,7 @@ def _parse_response(
return response_200

if response.status_code == 400:
response_400 = cast(Any, None)
response_400 = CompareLimitError.from_dict(response.json())
return response_400

if response.status_code == 401:
Expand All @@ -79,7 +80,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from ...models.historical_limit_error import HistoricalLimitError
from ...models.http_validation_error import HTTPValidationError
from ...models.invalid_period_error import InvalidPeriodError
from ...models.unsupported_asset_error import UnsupportedAssetError
from ...types import UNSET, Response, Unset


Expand Down Expand Up @@ -69,7 +70,7 @@ def _parse_response(
return response_403

if response.status_code == 404:
response_404 = cast(Any, None)
response_404 = UnsupportedAssetError.from_dict(response.json())
return response_404

if response.status_code == 422:
Expand All @@ -80,7 +81,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
5 changes: 3 additions & 2 deletions src/adanos/_generated/api/reddit_stocks/compare_stocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from ... import errors
from ...client import AuthenticatedClient, Client
from ...models.compare_limit_error import CompareLimitError
from ...models.compare_response import CompareResponse
from ...models.error_response import ErrorResponse
from ...models.historical_limit_error import HistoricalLimitError
Expand Down Expand Up @@ -58,7 +59,7 @@ def _parse_response(
return response_200

if response.status_code == 400:
response_400 = cast(Any, None)
response_400 = CompareLimitError.from_dict(response.json())
return response_400

if response.status_code == 401:
Expand All @@ -79,7 +80,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _parse_response_422(data: object) -> HTTPValidationError | InvalidPeriodErro
raise TypeError()
detail = data.get("detail")
error = str(detail.get("error", "")).lower().replace(" ", "_") if isinstance(detail, dict) else ""
if error != "invalid_period":
if error not in {"invalid_period", "data_unavailable"}:
raise TypeError()
response_422_type_0 = InvalidPeriodError.from_dict(data)

Expand Down
Loading