---
title: "Errori"
description: "Il corpo dell'errore, ogni stato e codice con i suoi messaggi e quali errori riprovare."
canonical: https://dino.markets/it/docs/errors/
---

> Index of every dino.markets page and doc for AI readers: [llms.txt](https://dino.markets/llms.txt)

# Errori

Il corpo dell'errore, ogni stato e codice con i suoi messaggi e quali errori riprovare.

## Il corpo dell’errore

Ogni errore ha gli stessi tre campi.

```
curl -s -G "https://api.dino.markets/v2/odds" \
  -d league=nba -d limit=0 \
  -H "Authorization: Bearer $DINO_API_KEY"
```

400 Bad Request

```
{
  "error": "invalid_request",
  "message": "limit must be an integer from 1 to 100; the default is 25.",
  "request_id": "req_d2fc23deaa31bd58aff76f3c"
}
```

`error` è un codice stabile su cui basare la gestione. `message` è per le persone e può cambiare. `request_id` è anche nell’header `X-Request-Id`; citalo quando scrivi all’assistenza. Un errore non costa crediti.

## Codici

| Stato | `error` | Quando | Riprovare |
| --- | --- | --- | --- |
| 400 | `invalid_request` | Un parametro manca, è sconosciuto o fuori intervallo | No, correggi la richiesta |
| 401 | `unauthorized` | La chiave manca, è errata o disattivata | No |
| 404 | `not_found` | Rotta inesistente, o nessuna partita con questo id | No |
| 405 | `method_not_allowed` | Il metodo non è `GET` | No |
| 429 | `rate_limited` | Troppe richieste | Sì, dopo `Retry-After` |
| 429 | `quota_exceeded` | La chiave ha meno crediti di quanto costa la chiamata | Dopo il rinnovo dei crediti o un cambio di piano |
| 500 | `internal_error` | Un guasto dalla nostra parte | Sì |
| 503 | `unavailable` | Il servizio è in avvio, gli account non sono disponibili per poco, o troppe richieste grandi vengono servite insieme | Sì, dopo `Retry-After` |

I controlli avvengono in quest’ordine: il servizio è pronto, il metodo, la rotta, la chiave, i parametri, la partita, poi i crediti.

## Parametri errati

| Il `message` inizia con | Causa |
| --- | --- |
| `league is required unless event_ids is given.` | Non è stato inviato nessuno dei due |
| `Unknown league value "xx".` | Nel messaggio seguono le leghe valide |
| `Unknown markets value "foo".` o `markets is empty.` | Seguono i mercati validi |
| `Unknown period value "h3".` | Seguono i periodi validi |
| `alternates is not valid: "yes".` | Invia `true` o `false` |
| `Unknown books value "zz".` | Seguono i bookmaker validi |
| `Unknown region value "zz".` | Seguono le regioni valide |
| `Unknown status value "done".` | Seguono gli stati validi: `scheduled`, `live`, `finished`, `all` |
| `start_after is not valid: "...".` o `start_before is not valid: "...".` | Il valore non è un orario RFC 3339. Invia `2026-11-30T00:00:00Z` e scrivi un offset `+` come `%2B`. |
| `limit must be an integer from 1 to 100` | `limit` è fuori intervallo |
| `cursor is not valid.` | Invia `next_cursor` senza modifiche |
| `Event id "abc" is not valid; ids are 32 characters.` | Un valore errato in `event_ids` |
| `Event id must be 32 characters.` | Un id errato sulla rotta di una singola partita |
| `event_ids takes at most 100 ids.` | Troppi id |

## Chiave mancante o errata

```
curl -s "https://api.dino.markets/v2/odds?league=nba"
```

401 Unauthorized

```
 or in the x-api-key header; the apiKey query parameter is not accepted on /v2.",
  "request_id": "req_d3d432806099cab5a336380e"
}">{
  "error": "unauthorized",
  "message": "API key is missing. Send it as Authorization: Bearer <key> or in the x-api-key header; the apiKey query parameter is not accepted on /v2.",
  "request_id": "req_d3d432806099cab5a336380e"
}
```

| `message` | Causa |
| --- | --- |
| `API key is missing. Send it as ...` | Nessuna chiave, o una chiave nell’URL |
| `API key is invalid or not tied to a subscription.` | Chiave errata |
| `API key has been deactivated.` | Una chiave revocata |

## Non trovato

Una rotta sconosciuta:

```
curl -s "https://api.dino.markets/v2/nothing" \
  -H "Authorization: Bearer $DINO_API_KEY"
```

404 Not Found

```
{
  "error": "not_found",
  "message": "No such route.",
  "request_id": "req_1b9452db27085ca9a02a0977"
}
```

Una partita finita più di 72 ore dopo il suo inizio, o un id che non abbiamo mai avuto:

```
curl -s "https://api.dino.markets/v2/events/00000000000000000000000000000000/odds" \
  -H "Authorization: Bearer $DINO_API_KEY"
```

404 Not Found

```
{
  "error": "not_found",
  "message": "Event not found. It may have concluded; get current ids from /v2/events.",
  "request_id": "req_50075f7ad136112fd6ed700e"
}
```

## Metodo errato

È servito solo `GET`. Lo indica l’header `Allow`.

```
curl -s -D - -X POST "https://api.dino.markets/v2/leagues" \
  -H "Authorization: Bearer $DINO_API_KEY"
```

405 Method Not Allowed

```
allow: GET
cache-control: no-store
content-type: application/json; charset=utf-8
x-request-id: req_c04acfc031018c7809b5593d

{
  "error": "method_not_allowed",
  "message": "Only GET is supported.",
  "request_id": "req_c04acfc031018c7809b5593d"
}
```

## Limiti e guasti del server

| Stato | `message` | Header |
| --- | --- | --- |
| 429 | `Rate limited. Space requests out over several seconds and try again.` | `Retry-After: 1` |
| 429 | `This call costs 1 credit and the key has 0 left. ...` |  |
| 429 | `Usage quota has been reached. Upgrade the plan or wait for the quota to reset.` |  |
| 500 | `Something went wrong on our side. Try again in a moment.` |  |
| 503 | `The service is starting up. Try again in a few seconds.` | `Retry-After: 10` |
| 503 | `Accounts are unavailable. Try again in a few seconds.` | `Retry-After: 5` |
| 503 | `Too many large requests are being answered right now. Try again in a few seconds, or ask for less: fewer markets, no alternates, one period.` | `Retry-After: 2` |

L’ultimo 503 arriva dalle chiamate a `/v2/odds` che chiedono `alternates=true`, un `period` diverso da `game` o un mercato sul giocatore. Su ogni server ne vengono costruite tre alla volta; una quarta nello stesso momento viene rifiutata e non costa alcun credito. Riprova dopo l’attesa, oppure chiedi meno mercati o un solo periodo.

## Riprovare

Riprova `429 rate_limited`, `500` e `503` con un’attesa crescente e casuale e un limite di tentativi, e attendi almeno quanto indicato da `Retry-After` quando c’è. Correggi prima `400`, `401`, `404` e `405`. Non riprovare `quota_exceeded`. Un nuovo tentativo riuscito costa di nuovo un credito, e se una risposta è andata persa la prima chiamata potrebbe essere già stata conteggiata.
