Back
Python SDK
Pure Python 3.10+. No external dependencies. Perfect for bots, scanners, and trading systems.
pip install asahiBasic Usage
from asahi import classify, MemeTokenContext
ctx = MemeTokenContext(
token_mint="AsahiXyz...pump",
symbol="ASAHI",
price_usd=0.00082,
price_change_1h_pct=38.0,
price_change_24h_pct=180.0,
volume_1h=480_000,
volume_24h=1_200_000,
holder_count=4_200,
holder_count_prev=3_100,
market_cap_usd=560_000,
)
report = classify(ctx)
print(report.state) # NARRATIVE
print(report.narrative_score) # ~67.4
print(report.insight) # "Coherent narrative in motion..."Batch Analysis
from asahi import classify_batch, loudest
contexts = [
MemeTokenContext(symbol="ASAHI", ...),
MemeTokenContext(symbol="PUMP", ...),
MemeTokenContext(symbol="BONK", ...),
]
reports = classify_batch(contexts)
top = loudest(contexts) # context with highest narrative score
for report in reports:
if report.narrative_score >= 70:
print(f"Loud: {report.symbol} - {report.state}")Signal Breakdown
from asahi import classify, MemeTokenContext
ctx = MemeTokenContext(...)
report = classify(ctx)
# Access individual signals
print(f"Velocity: {report.signals.velocity}") # 82
print(f"Resonance: {report.signals.resonance}") # 71
print(f"Depth: {report.signals.depth}") # 68
print(f"Coherence: {report.signals.coherence}") # 55
print(f"Triggered: {report.triggered_count}/4")
print(f"Coherent: {report.is_coherent}")API Reference
MemeTokenContextToken data snapshot
token_mintSolana token mint addresssymbolToken symbolprice_change_1h_pct1h price change percentagevolume_1h / volume_24hVolume metricsholder_count / holder_count_prevHolder growth datamarket_cap_usdMarket cap in USDclassify(ctx)Main classification function
ctxMemeTokenContext inputreturnsNarrativeReport objectNarrativeReportClassification output
.narrative_scoreScore (0-100).stateNOISE / SIGNAL / NARRATIVE / VIRAL.insightHuman-readable insight.triggered_countNumber of triggered signals.is_coherentTrue if >= 2 signals triggeredTry it live in the Lab
Experiment with AsahiLM interactively