Reference
TypeScript SDK
Typed TypeScript client for the Scanna API (@scanna/sdk).
Pre-release
@scanna/sdk is pre-release (0.1.x) and not yet published to npm. The interface
below is what ships; package publishing is coming soon. Until then you can build
against the REST API directly.
A zero-dependency TypeScript client for the Scanna API, with dual ESM + CJS output and full types.
npm install @scanna/sdkimport { ScannaClient } from '@scanna/sdk';
const scanna = new ScannaClient({ apiKey: 'sk_...' });
// Trending markets
const hot = await scanna.getHot({ limit: 5 });
for (const m of hot.markets) {
console.log(`${m.question}: heat=${m.heat_score.toFixed(2)}`);
}
// Mispricing signal
const pred = await scanna.getLivePredict({ marketId: '0x...' });
console.log(`Market: ${pred.market_price}, Model: ${pred.predicted_probability}, Divergence: ${pred.divergence}`);Methods
| Method | Endpoint | Description |
|---|---|---|
getHot() | GET /hot | Trending markets by heat score |
getHeat() | POST /heat | Single-market deep dive |
getSignals() | GET /signals | 6-factor signal analysis |
getPredict() | GET /predict | AI prediction (resolved model) |
getLivePredict() | GET /live-predict | Live mispricing signal |
getRiskScore() | GET /risk-score | Market risk grade (A–F) |
getArbitrage() | GET /arbitrage | Arbitrage scanner |
getInsiderScore() | GET /insider-score | Wallet insider risk (0–100) |
getClusters() | GET /clusters | Wallet entity clustering |
getSmartMoney() | GET /smart-money | Smart money leaderboard |
getDivergence() | GET /divergence | Cross-venue price gaps |
getExport() | GET /export | ML training data |
getHealth() | GET /health | Health check |
Error handling
import { ScannaClient, AuthError, NotFoundError, RateLimitError } from '@scanna/sdk';Errors are typed, so you can catch AuthError, NotFoundError, and
RateLimitError distinctly.