---
title: "エラー"
description: "エラー本文、すべてのステータスとコードとメッセージ、再試行すべき失敗。"
canonical: https://dino.markets/ja/docs/errors/
---

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

# エラー

エラー本文、すべてのステータスとコードとメッセージ、再試行すべき失敗。

## エラー本文

すべてのエラーは同じ3つのフィールドを持ちます。

```
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`は分岐に使える固定のコードです。`message`は人が読むためのもので、変わることがあります。`request_id`は`X-Request-Id`ヘッダーにも入っています。サポートに連絡するときに記載してください。エラーにクレジットはかかりません。

## コード

| ステータス | `error` | 発生する場合 | 再試行 |
| --- | --- | --- | --- |
| 400 | `invalid_request` | パラメータがない、不明、または範囲外 | 不可。リクエストを修正 |
| 401 | `unauthorized` | キーがない、誤っている、または無効化済み | 不可 |
| 404 | `not_found` | ルートがない、またはこのIDの試合がない | 不可 |
| 405 | `method_not_allowed` | メソッドが`GET`ではない | 不可 |
| 429 | `rate_limited` | リクエストが多すぎる | `Retry-After`の後に可 |
| 429 | `quota_exceeded` | キーの残りクレジットが呼び出しの費用より少ない | クレジットの更新後かプラン変更後 |
| 500 | `internal_error` | 当社側の障害 | 可 |
| 503 | `unavailable` | サービスの起動中、アカウントが一時的に利用できない、または大きなリクエストが同時に多く処理されている | `Retry-After`の後に可 |

チェックは、サービスの準備状況、メソッド、ルート、キー、パラメータ、試合、クレジットの順に行います。

## 不正なパラメータ

| `message`の先頭 | 原因 |
| --- | --- |
| `league is required unless event_ids is given.` | どちらも送られていない |
| `Unknown league value "xx".` | 有効なリーグがメッセージに続く |
| `Unknown markets value "foo".`または`markets is empty.` | 有効な市場が続く |
| `Unknown period value "h3".` | 有効なピリオドが続く |
| `alternates is not valid: "yes".` | `true`か`false`を送る |
| `Unknown books value "zz".` | 有効なブックメーカーが続く |
| `Unknown region value "zz".` | 有効な地域が続く |
| `Unknown status value "done".` | 有効なステータスが続く：`scheduled`、`live`、`finished`、`all` |
| `start_after is not valid: "...".`または`start_before is not valid: "...".` | 値がRFC 3339の時刻ではありません。`2026-11-30T00:00:00Z`のように送り、`+`のオフセットは`%2B`と書きます。 |
| `limit must be an integer from 1 to 100` | `limit`が範囲外 |
| `cursor is not valid.` | `next_cursor`は変更せずに送る |
| `Event id "abc" is not valid; ids are 32 characters.` | `event_ids`に不正な値がある |
| `Event id must be 32 characters.` | 1試合のルートに不正なID |
| `event_ids takes at most 100 ids.` | IDが多すぎる |

## キーがないか誤っている

```
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` | 原因 |
| --- | --- |
| `API key is missing. Send it as ...` | キーがない、またはURLにキーがある |
| `API key is invalid or not tied to a subscription.` | キーが誤っている |
| `API key has been deactivated.` | 無効化されたキー |

## 見つからない

存在しないルート：

```
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"
}
```

開始から72時間を過ぎた終了した試合、または存在したことのないID：

```
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"
}
```

## 誤ったメソッド

`GET`のみに対応します。`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"
}
```

## 制限とサーバー障害

| ステータス | `message` | ヘッダー |
| --- | --- | --- |
| 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` |

最後の503は、`alternates=true`、`game`以外の`period`、または選手の市場を求める`/v2/odds`の呼び出しで返ります。そうした呼び出しは1台のサーバーで同時に3件まで作られ、同時に来た4件目は拒否され、クレジットはかかりません。待ち時間の後に再試行するか、市場を減らすか、ピリオドを1つにしてください。

## 再試行

`429 rate_limited`、`500`、`503`は、待ち時間を徐々に延ばしてランダム化し、試行回数に上限を設けて再試行します。`Retry-After`が送られた場合は、少なくともその時間待ちます。`400`、`401`、`404`、`405`は先に修正してください。`quota_exceeded`は再試行しないでください。再試行が成功すると再びクレジットがかかります。レスポンスが失われた場合、最初の呼び出しがすでに数えられていることがあります。
