📡 Data Flow
1. Fetching Prediction Markets
// src/services/polymarket.js
const POLYMARKET_API_BASE = '/api/polymarket-proxy';
export async function fetchMarkets(options = {}) {
const { limit = 100, active = true, closed = false } = options;
const params = new URLSearchParams({
endpoint: '/markets',
limit: limit.toString(),
active: active.toString(),
closed: closed.toString(),
_t: Date.now().toString() // Cache buster
});
const response = await fetch(`${POLYMARKET_API_BASE}?${params}`, {
headers: { 'Accept': 'application/json' },
cache: 'no-cache'
});
const markets = await response.json();
return markets.filter(m => m.question && m.outcomePrices).map(normalizeMarket);
}2. Market Data Structure
3. LUMI Prediction Generation
Last updated
