Feed filter_outcome_mints results straight into markets/batch:
filter_outcome_mints → markets/batch
// `tokenMints` is the list of SPL token mint addresses found in a wallet// (the `mint` field on each entry from connection.getParsedTokenAccountsByOwner).// These are NOT wallet addresses; they're token mint addresses.// See the Track Positions recipe for how to fetch them from a wallet.const tokenMints: string[] = [ "SPL_TOKEN_MINT_1_HERE", "SPL_TOKEN_MINT_2_HERE",];// Step 1: filter down to just the outcome token mintsconst filterRes = await fetch(`${DFLOW_METADATA_API_URL}/api/v1/filter_outcome_mints`, { method: "POST", headers, body: JSON.stringify({ addresses: tokenMints }),}).then((r) => r.json());const outcomeMints: string[] = filterRes.outcomeMints ?? [];if (outcomeMints.length > 0) { // Step 2: fetch the full market object for each in one call const batchRes = await fetch(`${DFLOW_METADATA_API_URL}/api/v1/markets/batch`, { method: "POST", headers, body: JSON.stringify({ mints: outcomeMints.slice(0, 100) }), }).then((r) => r.json()); for (const market of batchRes.markets) { console.log(market.ticker, market.title, market.status); }}