On the wire · 04:49:07 UTC Live 550 · Prematch 14,382 · Markets 56,950 Vol. I · No. 5 · Friday 13 November 2026 wss://pinnfeed.io/v1/stream
PinnFeed
Risposta · Google Sheets · trigger

Aggiornare le quote Pinnacle in Google Sheets con un timer

Aggiornato il · PinnFeed · 1 min di lettura

Risposta: usa Apps Script UrlFetchApp su GET /v1/odds, poi installa un trigger temporale (ogni 15 minuti). Script completo: guida Google Sheets. Basta il piano Free (30 s di ritardo, 1.000 req/giorno).

Snippet del trigger#

const KEY = PropertiesService.getScriptProperties().getProperty("PINNFEED_KEY");
const SPORT = "soccer";

function refreshOdds() {
  const url = "https://pinnfeed.io/v1/odds"
    + "?sport=" + encodeURIComponent(SPORT)
    + "&market=moneyline&main=true&limit=30";
  const res = UrlFetchApp.fetch(url, {
    headers: { "x-api-key": KEY, accept: "application/json" },
    muteHttpExceptions: true,
  });
  if (res.getResponseCode() !== 200) throw new Error(res.getContentText());
  const events = JSON.parse(res.getContentText()).events || [];
  const sheet = SpreadsheetApp.getActive().getSheetByName("Odds");
  const rows = [["home", "away", "home_dec", "away_dec", "fair_home", "updated"]];
  for (const ev of events) {
    const m = (ev.markets || []).find((x) => x.type === "moneyline");
    if (!m) continue;
    const by = Object.fromEntries((m.outcomes || []).map((o) => [o.name, o]));
    rows.push([
      ev.home, ev.away,
      by.home?.decimal, by.away?.decimal, by.home?.fair,
      new Date().toISOString(),
    ]);
  }
  sheet.clearContents();
  sheet.getRange(1, 1, rows.length, rows[0].length).setValues(rows);
}

/** Run once from the editor to install the 15-minute trigger. */
function installTrigger() {
  ScriptApp.getProjectTriggers().forEach((t) => ScriptApp.deleteTrigger(t));
  ScriptApp.newTrigger("refreshOdds").timeBased().everyMinutes(15).create();
}

Conserva la chiave in Impostazioni progetto → Proprietà script, mai nelle celle. Per Excel, vedi Power Query (EN). Il push live richiede ancora Builder (99 €/mese). Piani a pagamento: prova di 3 giorni; carta richiesta, addebitata dopo il giorno 3 salvo disdetta.

Contenuto educativo per maggiorenni (18+): non pronostici né promesse di guadagno. In Italia scommetti solo con operatori autorizzati ADM.

Domande frequenti#

15 minuti consumano la quota Free?#

96 chiamate/giorno se il trigger è da solo — sotto il tetto Free di 1.000/giorno. Aggiungi sport con cautela.

IMPORTDATA può farlo?#

IMPORTDATA non può inviare x-api-key. Usa Apps Script (questa pagina) o la risposta IMPORTDATA solo con un proxy pubblico che controlli tu — noi non ne forniamo uno.

Il piano WebSocket: Builder, 99 €/mese.

Quote Pinnacle in tempo reale su un unico WebSocket: tutti i 13 sport, tutti i mercati, quote eque senza margine e quote di chiusura. 3 giorni gratis, disdici con un clic.

Form K-1 · Free API key

Get your free API key.

One field. No password, no card: enter your email, click the link we send, and your key is on screen.

By continuing you agree to the Terms and Privacy Policy.

One free key per email. Link valid for 20 minutes.