diff --git a/index.html b/index.html
index a448404..ef2a04f 100644
--- a/index.html
+++ b/index.html
@@ -677,7 +677,7 @@ footer{margin-top:34px;padding-top:22px;border-top:1px solid var(--border);color
The hourly cycle
- - Fetch — page through hundreds of live markets and tag each by category.
+ - Fetch — page through every active Polymarket market and tag each by category.
- Score — rank every market 0–100 by conviction and estimate its edge vs. a fair-value model.
- Suggest — surface the strongest picks per category with a plain-English rationale.
- Compete — the strategy agents trade the same suggestions their own way, stop-loss weak positions, scale out through gain-stop tiers, exit stale or fading trades, then snapshot equity.
@@ -896,14 +896,17 @@ function normalizeMarket(raw){
days_to_resolution:daysUntil(raw.endDate),image:raw.image||"",
url:ev.slug?`https://polymarket.com/event/${ev.slug}`:""};
}
-async function fetchMarkets(pages=4,perPage=100){
+async function fetchMarkets(pages=Infinity,perPage=100,onProgress=null){
const all=[];
- for(let i=0;im&&m.question);
}
@@ -1591,7 +1594,7 @@ async function runDailyCycle(){
SNAP_TS=nowIso();
setStatus("fetching markets…",true);
try{
- const markets=await fetchMarkets(10,100);
+ const markets=await fetchMarkets(Infinity,100,count=>setStatus(`fetching all active markets (${count})…`,true));
setStatus("analyzing…",true);
const sugs=generateSuggestions(markets);
saveSuggestions(sugs);
@@ -2487,21 +2490,29 @@ async function searchPaperMarkets(){
PAPER_MARKET_OFFSET=0;PAPER_MARKET_QUERY=q;
await loadPaperMarketPage(true);
}
-async function loadPaperMarketPage(reset=false){
+async function loadPaperMarketPage(reset=false,loadAll=false){
const q=PAPER_MARKET_QUERY||(($("paperSearchInput")&&$("paperSearchInput").value)||"").trim();
setStatus("searching Polymarket...",true);
try{
if(reset){PAPER_SEARCH_RESULTS=[];PAPER_MARKET_OFFSET=0;}
- const params=new URLSearchParams({closed:"false",active:"true",archived:"false",include_tag:"true",limit:"100",offset:String(PAPER_MARKET_OFFSET),order:"volume24hr",ascending:"false"});
- if(q)params.set("search",q);
- const r=await fetch(`${GAMMA}/markets?${params}`);
- if(!r.ok)throw new Error("market load failed");
- const raw=await r.json();
- const next=raw.map(normalizeMarket).filter(Boolean).map(paperTradeFromMarket);
- PAPER_SEARCH_RESULTS=(PAPER_SEARCH_RESULTS||[]).concat(next);
- PAPER_MARKET_OFFSET+=raw.length;
+ let loaded=0,rawCount=0,keepGoing=true;
+ const limit=100,maxPages=loadAll?250:1;
+ for(let page=0;pagepaperMoveCash("deposit",$("pap
$("paperWithdrawBtn").addEventListener("click",()=>paperMoveCash("withdraw",$("paperMoneyAmount").value,$("paperPasswordInput").value));
$("buyAgentBtn").addEventListener("click",()=>paperBuyAgent($("buyAgentSelect").value,$("buyAgentAmount").value));
$("paperSearchBtn").addEventListener("click",()=>searchPaperMarkets());
-$("paperAllBtn").addEventListener("click",()=>{PAPER_MARKET_QUERY="";PAPER_SEARCH_RESULTS=[];loadPaperMarketPage(true);});
+$("paperAllBtn").addEventListener("click",()=>{PAPER_MARKET_QUERY="";PAPER_SEARCH_RESULTS=[];loadPaperMarketPage(true,true);});
$("paperMoreBtn").addEventListener("click",()=>loadPaperMarketPage(false));
$("paperClearSearchBtn").addEventListener("click",()=>{PAPER_SEARCH_RESULTS=null;PAPER_MARKET_OFFSET=0;PAPER_MARKET_QUERY="";renderPaperTab();});
$("paperLoginBtn").addEventListener("click",async()=>{
@@ -3078,7 +3097,7 @@ $("personalWithdrawBtn").addEventListener("click",()=>personalCapitalAction("WIT
$("personalBuyAgentBtn").addEventListener("click",()=>personalCapitalAction("BUY_AGENT"));
$("personalSellAgentBtn").addEventListener("click",()=>personalCapitalAction("SELL_AGENT"));
$("liveSearchBtn").addEventListener("click",()=>searchLiveMarkets());
-$("liveAllBtn").addEventListener("click",()=>{LIVE_MARKET_QUERY="";LIVE_SEARCH_RESULTS=[];loadLiveMarketPage(true);});
+$("liveAllBtn").addEventListener("click",()=>{LIVE_MARKET_QUERY="";LIVE_SEARCH_RESULTS=[];loadLiveMarketPage(true,true);});
$("liveMoreBtn").addEventListener("click",()=>loadLiveMarketPage(false));
$("liveClearSearchBtn").addEventListener("click",()=>{LIVE_SEARCH_RESULTS=[];LIVE_MARKET_OFFSET=0;LIVE_MARKET_QUERY="";renderLiveMarkets();});
$("recordConsentBtn").addEventListener("click",()=>recordLiveConsent());