Reference
Python SDK
Python client for the Scanna API, with async, LangChain, and OpenAI function-calling helpers.
Pre-release
The scanna package is pre-release (0.1.x) and not yet published to PyPI. The
interface below is what ships; publishing is coming soon. Until then you can
build against the REST API directly.
A Python client for the Scanna API with sync and async clients, plus LangChain and OpenAI function-calling integrations.
pip install scannafrom scanna import ScannaClient
client = ScannaClient(api_key="sk_...")
# Trending markets
hot = client.get_hot(limit=5)
for m in hot.markets:
print(f"{m.question}: heat={m.heat_score:.2f}")
# Mispricing signal
pred = client.get_live_predict(market_id="0x...")
print(f"Market: {pred.market_price}, Model: {pred.predicted_probability}, Divergence: {pred.divergence}")Async
from scanna import AsyncScannaClient
async with AsyncScannaClient(api_key="sk_...") as client:
hot = await client.get_hot(limit=5)LangChain
pip install scanna[langchain]from scanna.integrations.langchain import get_all_tools
tools = get_all_tools(api_key="sk_...")
# Use with any LangChain agentOpenAI function calling
Scanna ships OpenAI function-calling helpers so an assistant can call the API as
tools. Methods mirror the REST API: get_hot,
get_heat, get_signals, get_predict, get_live_predict, get_risk_score,
get_arbitrage, get_insider_score, get_clusters, get_smart_money,
get_divergence, and get_export.