---
title: "الأخطاء"
description: "جسم الخطأ، وكل حالة ورمز مع رسائله، وأي الإخفاقات تُعاد محاولتها."
canonical: https://dino.markets/ar/docs/errors/
---

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

# الأخطاء

جسم الخطأ، وكل حالة ورمز مع رسائله، وأي الإخفاقات تُعاد محاولتها.

## جسم الخطأ

لكل خطأ الحقول الثلاثة نفسها.

```
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` | لا يوجد هذا المسار، أو لا مباراة بهذا المعرّف | لا |
| 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.` | معرّف خاطئ في مسار المباراة الواحدة |
| `event_ids takes at most 100 ids.` | معرّفات كثيرة جدًا |

## مفتاح مفقود أو خاطئ

```
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 ...` | لا مفتاح، أو مفتاح في الرابط |
| `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 ساعة من بدئها، أو معرّف لم يكن لدينا قط:

```
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 الأخير من طلبات `/v2/odds` التي تطلب `alternates=true` أو `period` غير `game` أو سوق لاعب. يُبنى ثلاثة منها فقط في وقت واحد على كل خادم؛ والرابع في اللحظة نفسها يُرفض ولا يكلّف رصيدًا. أعد المحاولة بعد الانتظار، أو اطلب أسواقًا أقل أو فترة واحدة.

## إعادة المحاولة

أعد المحاولة عند `429 rate_limited` و`500` و`503` بانتظار متزايد وعشوائي وبحد لعدد المحاولات، وانتظر `Retry-After` على الأقل عندما يُرسل. أصلح `400` و`401` و`404` و`405` أولًا. لا تُعد المحاولة عند `quota_exceeded`. إعادة المحاولة الناجحة تكلّف رصيدًا مرة أخرى، وإذا ضاعت استجابة فقد يكون الطلب الأول احتُسب بالفعل.
