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

Refrescar cuotas Pinnacle en Google Sheets con un timer

Actualizado el · PinnFeed · 1 min de lectura

Respuesta: Usa Apps Script UrlFetchApp contra GET /v1/odds e instala un trigger por tiempo (cada 15 minutos). Script completo: guía Sheets. Free basta (30 s de retraso, 1.000 req/día).

Solo el 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);
}

function installTrigger() {
  ScriptApp.getProjectTriggers().forEach((t) => ScriptApp.deleteTrigger(t));
  ScriptApp.newTrigger("refreshOdds").timeBased().everyMinutes(15).create();
}

Guarda la clave en propiedades del script, nunca en celdas. Excel: Power Query. Push en vivo: Builder (99 €/mes). Planes de pago: 3 días de prueba; se requiere tarjeta y se cobra después del día 3 salvo que canceles. Contenido educativo para adultos (18+).

Preguntas que hace la gente#

¿15 minutos agotan el Free?#

96 llamadas/día si solo dispara el trigger — bajo el tope de 1.000/día.

¿Sirve IMPORTDATA?#

IMPORTDATA no envía x-api-key. Usa Apps Script (esta página).

El plan WebSocket: Builder, 99 €/mes.

Cuotas de Pinnacle en tiempo real por un único WebSocket: los 13 deportes, todos los mercados, cuotas justas sin margen y cuotas de cierre. 3 días gratis y cancelas 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.