docs
Developers
Overview

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

MethodBest for
On-chain readsDirect contract reads via Viem/Wagmi for trustless data
REST APIServer-side integrations, dashboards, alerting
WebSocket feedReal-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.

ContractAddress
Ledger0x...
LedgerViews0x...
MarketMakerHub0x...
MockUSDC0x...

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