Developer Overview
SentiDex exposes its attention index and market data for integration into third-party products. This section covers the available interfaces.
What you can build
- Dashboards — embed live attention scores and position prices
- Alerts — trigger notifications when attention shifts above a threshold
- Quant strategies — consume the index feed as an input signal
- Aggregators — include SentiDex data alongside other prediction market sources
Integration options
| Method | Best for |
|---|---|
| On-chain reads | Direct contract reads via Viem/Wagmi for trustless data |
| REST API | Server-side integrations, dashboards, alerting |
| WebSocket feed | Real-time streaming of price and attention updates |
Contract addresses (Sepolia)
Contract addresses are generated at deploy time and updated here after each deployment. Check deployments.json in the contracts repo for the latest.
| Contract | Address |
|---|---|
Ledger | 0x... |
LedgerViews | 0x... |
MarketMakerHub | 0x... |
MockUSDC | 0x... |
Reading data on-chain
The primary read contract is LedgerViews. It aggregates market and position state into UI-friendly snapshot structs, avoiding the need for multiple fragmented calls.
import { createPublicClient, http } from 'viem'
import { sepolia } from 'viem/chains'
import { LEDGER_VIEWS_ABI } from './abis'
const client = createPublicClient({ chain: sepolia, transport: http() })
const snapshot = await client.readContract({
address: LEDGER_VIEWS_ADDRESS,
abi: LEDGER_VIEWS_ABI,
functionName: 'getMarketSnapshot',
args: [marketId],
})Next steps
- See the full API Reference for endpoint documentation
- ABIs and deployment data are available in the contracts repository (opens in a new tab)