{
  "openapi": "3.1.0",
  "info": {
    "title": "LynxMetrics API",
    "version": "1",
    "description": "This page covers what applies to every API, such as authentication, the trial, limits and errors, and each API has its own page with the endpoints, the parameters and what every field in the response means.\n\nEach key works for one API only and starts with `sk-lynx`, so create a key in the dashboard for every API you use and send it in the `x-api-key` header, replacing `{api}` with its slug. A key for one API calling another gets `key_wrong_api`. In the dashboard each key is shown masked, with a button to copy it whenever you want and another to rotate it, which swaps the key for a new one and makes the old one stop working within moments.\n\nLimits come from the plan of the subscription the key belongs to, or from the trial plan while a trial key is valid: the maximum `limit`, the size of `sample` and how many days back `before` can go. A value above the maximum is lowered to the maximum, usage is counted per subscription and the numbers for each plan are in each API's documentation. Each plan also has a requests per minute limit, which applies to each subscription adding up all of its keys, so subscribing to the same API twice gives you two separate limits, and the trial uses the limit of its plan. You can burst up to that number at once, and your allowance refills gradually over the minute. Every response to an accepted key includes `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, which says in how many seconds the allowance is full again; the errors that come before the limit, such as an invalid key, the wrong API and an ended subscription, do not carry those headers, and going over the limit returns 429 `rate_limited` with `Retry-After`, telling you how many seconds to wait.\n\nEvery response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`, and a 429 also carries `Retry-After`.",
    "termsOfService": "https://lynxmetrics.com/en/terms",
    "contact": {
      "name": "LynxMetrics",
      "url": "https://lynxmetrics.com/en/contact"
    }
  },
  "externalDocs": {
    "description": "Documentation, with code examples in Python, Node.js and PHP",
    "url": "https://lynxmetrics.com/en/docs"
  },
  "servers": [
    {
      "url": "https://api.lynxmetrics.com"
    }
  ],
  "security": [
    {
      "apiKey": []
    }
  ],
  "tags": [
    {
      "name": "Catalog"
    },
    {
      "name": "Bac Bo Live",
      "description": "In Bac Bo Live, Player and Banker roll two dice each. Results, dice and tie multipliers.",
      "externalDocs": {
        "url": "https://lynxmetrics.com/en/docs/bacbo-live"
      }
    },
    {
      "name": "Lightning Baccarat",
      "description": "Rounds from Evolution's Lightning Baccarat table: Player and Banker cards, score, winner, pairs and naturals. Lightning multipliers not included.",
      "externalDocs": {
        "url": "https://lynxmetrics.com/en/docs/lightning-baccarat"
      }
    },
    {
      "name": "Baccarat 1",
      "description": "Rounds from Pragmatic Play's Baccarat 1 table: Player and Banker cards, score, winner, pairs and naturals.",
      "externalDocs": {
        "url": "https://lynxmetrics.com/en/docs/baccarat-1"
      }
    }
  ],
  "paths": {
    "/v1/apis": {
      "get": {
        "operationId": "listApis",
        "tags": [
          "Catalog"
        ],
        "summary": "Catalog of APIs, plans and trial",
        "description": "`GET /v1/apis` is open, no key needed, and lists the APIs with their category, status, each one's plans with price and limits and the trial rules in `trial`, and you can filter with `?category=`.",
        "security": [],
        "responses": {
          "200": {
            "description": "The catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "data": [
                    {
                      "slug": "bacbo-live",
                      "name": "Bac Bo Live",
                      "category": "live-casino",
                      "provider": "Evolution",
                      "status": "live",
                      "description": "In Bac Bo Live, Player and Banker roll two dice each. Results, dice and tie multipliers.",
                      "plans": [
                        {
                          "id": "pro",
                          "priceCents": 2190,
                          "currency": "BRL",
                          "maxResults": 250,
                          "maxStatsSample": 250,
                          "historyDays": 7,
                          "requestsPerMinute": 60,
                          "maxStreams": 1
                        },
                        {
                          "id": "business",
                          "priceCents": 4990,
                          "currency": "BRL",
                          "maxResults": 1000,
                          "maxStatsSample": 1000,
                          "historyDays": null,
                          "requestsPerMinute": 400,
                          "maxStreams": 5
                        }
                      ],
                      "trial": {
                        "plan": "pro",
                        "durationMinutes": 120,
                        "cooldownHours": 24,
                        "requiresVerifiedEmail": true,
                        "startsOnFirstRequest": true
                      }
                    }
                  ],
                  "categories": [
                    "live-casino"
                  ]
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          }
        }
      }
    },
    "/v1/bacbo-live/latest": {
      "get": {
        "operationId": "bacboLiveLatest",
        "tags": [
          "Bac Bo Live"
        ],
        "summary": "Latest Bac Bo Live round",
        "description": "The latest Bac Bo Live round, or null if there is none yet.",
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            },
            "description": "Seconds the response may wait for the next round, up to 20. It only waits if you already have the latest one: send its `ETag` in `if-none-match` or its `id` in `after`. When a round closes, the response comes right away with it; if the time runs out first, you get `304` (with ETag) or the same round (with `after`). It counts as a single request, and your client timeout must be longer than `wait`."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `id` of the last round you have. Only used together with `wait`, for clients that do not keep the `ETag`."
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "ETag of the last response you received."
          }
        ],
        "responses": {
          "200": {
            "description": "The latest round, or `data: null` when there is none yet.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/BacboLiveRound"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": {
                    "id": "v1794669483249",
                    "game": "bacbo-live",
                    "tableId": "BacBo00000000001",
                    "startedAt": "2026-11-14T15:17:48.079Z",
                    "settledAt": "2026-11-14T15:18:12.409Z",
                    "outcome": "tie",
                    "data": {
                      "player": {
                        "dice": [
                          4,
                          1
                        ],
                        "score": 5
                      },
                      "banker": {
                        "dice": [
                          1,
                          4
                        ],
                        "score": 5
                      },
                      "multiplier": 6
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/bacbo-live/results": {
      "get": {
        "operationId": "bacboLiveResults",
        "tags": [
          "Bac Bo Live"
        ],
        "summary": "Bac Bo Live rounds, paginated",
        "description": "Bac Bo Live rounds from newest to oldest. To fetch the next page, pass the response's `nextCursor` as `before`, and when it comes back `null` there are no more results.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 50
            },
            "description": "How many rounds to return, 50 by default and 1000 at most."
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Returns only rounds settled before this date, like the `nextCursor` of the previous page, and how far back you can go depends on the plan."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "To sync without repeating or skipping rounds, pass the `settledAt` or the `id` of the last round you already have, and the response brings only the rounds settled after it, from oldest to newest, up to `limit`. When the page comes back full, pass its `nextCursor` as the next `after`, and when it comes back `null` you are up to date. It also follows the plan's history limit and can be combined with `before`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of rounds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BacboLiveRound"
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "v1794669483249",
                      "game": "bacbo-live",
                      "tableId": "BacBo00000000001",
                      "startedAt": "2026-11-14T15:17:48.079Z",
                      "settledAt": "2026-11-14T15:18:12.409Z",
                      "outcome": "tie",
                      "data": {
                        "player": {
                          "dice": [
                            4,
                            1
                          ],
                          "score": 5
                        },
                        "banker": {
                          "dice": [
                            1,
                            4
                          ],
                          "score": 5
                        },
                        "multiplier": 6
                      }
                    }
                  ],
                  "nextCursor": "2026-11-14T15:18:12.409Z"
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/bacbo-live/stream": {
      "get": {
        "operationId": "bacboLiveStream",
        "tags": [
          "Bac Bo Live"
        ],
        "summary": "Bac Bo Live rounds live (Server-Sent Events)",
        "description": "Live Bac Bo Live rounds over a connection that stays open (SSE, Server-Sent Events): every round arrives the moment it is saved, with no polling on your side. It is the fastest path, because it removes the gap between your requests. It is plain HTTP, so it goes through proxies and CDNs and works with any client that can send a header and read continuously.\n\nEvents: `ready`, `round`, `phase`, `correction`, `gap`, `closed`, plus a comment line every 20 seconds. A reconnection recovers up to 50 missed rounds, and every connection ends after 6 hours. Full reference: https://lynxmetrics.com/en/docs/bacbo-live#stream",
        "parameters": [
          {
            "name": "phases",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?phases=1`. There are two notices per round, both carrying `ref`, `game`, `phase`, `at` and `sentAt`: `betting`, when the table returns to the wide shot and betting on the next round opens, and `resolving`, when it enters the round's resolution and betting has already closed — that one also carries `roundId`, the id the round will have in `round`, several seconds ahead of the result. To know which round a result belongs to you do NOT need this: the `round` event's `id`, the guaranteed order and `last-event-id` are enough. The phase is for binding earlier, and it is not a promise of a result — a cut close-up, a gap in the feed or an unsure read make us drop the round on purpose, and then no `round` ever comes with that `ref`."
          },
          {
            "name": "corrections",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?corrections=1`. It tells you that a round already delivered as `round` has changed: in Bac Bo, about once every 2,000 rounds the table re-shakes one cup after the dice had settled, and the die that was published no longer counts. It carries `data`, the round as it now stands (same `id` and same timestamps), `previous`, with the `outcome` and `data` that had been delivered, and `sentAt`. It has no event `id`, so `last-event-id` does not move. It arrives when that round ends on the table, from 30 seconds to 3 minutes after the `round`. Even if you don't ask for it, `/latest`, `/results` and `/stats` start returning the corrected round."
          },
          {
            "name": "last_event_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "When reconnecting, send the id of the last round you received in the `last-event-id` header — an SSE client that reconnects on its own already sends that header, and if you drive the reconnect yourself you send either the header or `?last_event_id=`, whichever suits you. `ready` comes back with `missed`: the rounds that settled while you were away, oldest to newest. The stream covers absences of up to 50 rounds; if more than that settled, it does not hand you the most recent ones and does not even try — `missed` comes `null` with `too_many_missed`, and you close the gap with `/results?after=`. `data` is still the latest settled round, which is normally the last item of `missed`. When recovery isn't possible, `missed` comes `null` and `resyncError` says why; the connection opens either way, because a reconnect must never fail over a stale cursor."
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Same as `last_event_id`, as the header an SSE client sends on its own."
          }
        ],
        "responses": {
          "200": {
            "description": "An open event stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/bacbo-live/stats": {
      "get": {
        "operationId": "bacboLiveStats",
        "tags": [
          "Bac Bo Live"
        ],
        "summary": "Bac Bo Live statistics over the latest rounds",
        "description": "Bac Bo Live statistics computed on the fly over the latest rounds.",
        "parameters": [
          {
            "name": "sample",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            },
            "description": "How many recent rounds to compute over, 100 by default and 1000 at most."
          }
        ],
        "responses": {
          "200": {
            "description": "The statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BacboLiveStats"
                    }
                  }
                },
                "example": {
                  "data": {
                    "total": 100,
                    "counts": {
                      "player": 46,
                      "banker": 45,
                      "tie": 9
                    },
                    "percentages": {
                      "player": 46,
                      "banker": 45,
                      "tie": 9
                    },
                    "currentStreak": {
                      "outcome": "banker",
                      "length": 3
                    },
                    "outcomes": {
                      "player": {
                        "count": 46,
                        "percent": 46,
                        "longestStreak": 5,
                        "sinceLast": 3
                      },
                      "banker": {
                        "count": 45,
                        "percent": 45,
                        "longestStreak": 6,
                        "sinceLast": 0
                      },
                      "tie": {
                        "count": 9,
                        "percent": 9,
                        "longestStreak": 1,
                        "sinceLast": 11
                      }
                    },
                    "sample": {
                      "from": "2026-11-14T14:27:05.112Z",
                      "to": "2026-11-14T15:18:12.409Z"
                    },
                    "tieMultipliers": {
                      "4": 5,
                      "6": 3,
                      "88": 1
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/lightning-baccarat/latest": {
      "get": {
        "operationId": "lightningBaccaratLatest",
        "tags": [
          "Lightning Baccarat"
        ],
        "summary": "Latest Lightning Baccarat round",
        "description": "The latest Lightning Baccarat round, or null if there is none yet.",
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            },
            "description": "Seconds the response may wait for the next round, up to 20. It only waits if you already have the latest one: send its `ETag` in `if-none-match` or its `id` in `after`. When a round closes, the response comes right away with it; if the time runs out first, you get `304` (with ETag) or the same round (with `after`). It counts as a single request, and your client timeout must be longer than `wait`."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `id` of the last round you have. Only used together with `wait`, for clients that do not keep the `ETag`."
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "ETag of the last response you received."
          }
        ],
        "responses": {
          "200": {
            "description": "The latest round, or `data: null` when there is none yet.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/LightningBaccaratRound"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": {
                    "id": "v1793314712000",
                    "game": "lightning-baccarat",
                    "tableId": "LightningBac0001",
                    "startedAt": "2026-10-29T22:58:36.000Z",
                    "settledAt": "2026-10-29T22:59:02.000Z",
                    "outcome": "banker",
                    "data": {
                      "player": {
                        "cards": [
                          "QH",
                          "TH",
                          "QD"
                        ],
                        "score": 0,
                        "pair": false
                      },
                      "banker": {
                        "cards": [
                          "AS",
                          "6H"
                        ],
                        "score": 7,
                        "pair": false
                      },
                      "natural": false
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/lightning-baccarat/results": {
      "get": {
        "operationId": "lightningBaccaratResults",
        "tags": [
          "Lightning Baccarat"
        ],
        "summary": "Lightning Baccarat rounds, paginated",
        "description": "Lightning Baccarat rounds from newest to oldest. To fetch the next page, pass the response's `nextCursor` as `before`, and when it comes back `null` there are no more results.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 50
            },
            "description": "How many rounds to return, 50 by default and 1000 at most."
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Returns only rounds settled before this date, like the `nextCursor` of the previous page, and how far back you can go depends on the plan."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "To sync without repeating or skipping rounds, pass the `settledAt` or the `id` of the last round you already have, and the response brings only the rounds settled after it, from oldest to newest, up to `limit`. When the page comes back full, pass its `nextCursor` as the next `after`, and when it comes back `null` you are up to date. It also follows the plan's history limit and can be combined with `before`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of rounds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/LightningBaccaratRound"
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "v1793314712000",
                      "game": "lightning-baccarat",
                      "tableId": "LightningBac0001",
                      "startedAt": "2026-10-29T22:58:36.000Z",
                      "settledAt": "2026-10-29T22:59:02.000Z",
                      "outcome": "banker",
                      "data": {
                        "player": {
                          "cards": [
                            "QH",
                            "TH",
                            "QD"
                          ],
                          "score": 0,
                          "pair": false
                        },
                        "banker": {
                          "cards": [
                            "AS",
                            "6H"
                          ],
                          "score": 7,
                          "pair": false
                        },
                        "natural": false
                      }
                    }
                  ],
                  "nextCursor": "2026-10-29T22:59:02.000Z"
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/lightning-baccarat/stream": {
      "get": {
        "operationId": "lightningBaccaratStream",
        "tags": [
          "Lightning Baccarat"
        ],
        "summary": "Lightning Baccarat rounds live (Server-Sent Events)",
        "description": "Live Lightning Baccarat rounds over a connection that stays open (SSE, Server-Sent Events): every round arrives the moment it is saved, with no polling on your side. It is the fastest path, because it removes the gap between your requests. It is plain HTTP, so it goes through proxies and CDNs and works with any client that can send a header and read continuously.\n\nEvents: `ready`, `round`, `phase`, `correction`, `gap`, `closed`, plus a comment line every 20 seconds. A reconnection recovers up to 50 missed rounds, and every connection ends after 6 hours. Full reference: https://lynxmetrics.com/en/docs/lightning-baccarat#stream",
        "parameters": [
          {
            "name": "phases",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?phases=1`. There are two notices per round, both carrying `ref`, `game`, `phase`, `at` and `sentAt`: `betting`, when the table returns to the wide shot and betting on the next round opens, and `resolving`, when it enters the round's resolution and betting has already closed — that one also carries `roundId`, the id the round will have in `round`, several seconds ahead of the result. To know which round a result belongs to you do NOT need this: the `round` event's `id`, the guaranteed order and `last-event-id` are enough. The phase is for binding earlier, and it is not a promise of a result — a cut close-up, a gap in the feed or an unsure read make us drop the round on purpose, and then no `round` ever comes with that `ref`."
          },
          {
            "name": "corrections",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?corrections=1`. It tells you that a round already delivered as `round` has changed: in Bac Bo, about once every 2,000 rounds the table re-shakes one cup after the dice had settled, and the die that was published no longer counts. It carries `data`, the round as it now stands (same `id` and same timestamps), `previous`, with the `outcome` and `data` that had been delivered, and `sentAt`. It has no event `id`, so `last-event-id` does not move. It arrives when that round ends on the table, from 30 seconds to 3 minutes after the `round`. Even if you don't ask for it, `/latest`, `/results` and `/stats` start returning the corrected round."
          },
          {
            "name": "last_event_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "When reconnecting, send the id of the last round you received in the `last-event-id` header — an SSE client that reconnects on its own already sends that header, and if you drive the reconnect yourself you send either the header or `?last_event_id=`, whichever suits you. `ready` comes back with `missed`: the rounds that settled while you were away, oldest to newest. The stream covers absences of up to 50 rounds; if more than that settled, it does not hand you the most recent ones and does not even try — `missed` comes `null` with `too_many_missed`, and you close the gap with `/results?after=`. `data` is still the latest settled round, which is normally the last item of `missed`. When recovery isn't possible, `missed` comes `null` and `resyncError` says why; the connection opens either way, because a reconnect must never fail over a stale cursor."
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Same as `last_event_id`, as the header an SSE client sends on its own."
          }
        ],
        "responses": {
          "200": {
            "description": "An open event stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/lightning-baccarat/stats": {
      "get": {
        "operationId": "lightningBaccaratStats",
        "tags": [
          "Lightning Baccarat"
        ],
        "summary": "Lightning Baccarat statistics over the latest rounds",
        "description": "Lightning Baccarat statistics computed on the fly over the latest rounds.",
        "parameters": [
          {
            "name": "sample",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            },
            "description": "How many recent rounds to compute over, 100 by default and 1000 at most."
          }
        ],
        "responses": {
          "200": {
            "description": "The statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/LightningBaccaratStats"
                    }
                  }
                },
                "example": {
                  "data": {
                    "total": 100,
                    "counts": {
                      "player": 44,
                      "banker": 47,
                      "tie": 9
                    },
                    "percentages": {
                      "player": 44,
                      "banker": 47,
                      "tie": 9
                    },
                    "currentStreak": {
                      "outcome": "banker",
                      "length": 2
                    },
                    "outcomes": {
                      "player": {
                        "count": 44,
                        "percent": 44,
                        "longestStreak": 4,
                        "sinceLast": 2
                      },
                      "banker": {
                        "count": 47,
                        "percent": 47,
                        "longestStreak": 7,
                        "sinceLast": 0
                      },
                      "tie": {
                        "count": 9,
                        "percent": 9,
                        "longestStreak": 1,
                        "sinceLast": 6
                      }
                    },
                    "sample": {
                      "from": "2026-11-14T14:20:31.204Z",
                      "to": "2026-11-14T15:18:27.939Z"
                    },
                    "pairs": {
                      "player": 7,
                      "banker": 8
                    },
                    "naturals": 31
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/baccarat-1/latest": {
      "get": {
        "operationId": "baccarat1Latest",
        "tags": [
          "Baccarat 1"
        ],
        "summary": "Latest Baccarat 1 round",
        "description": "The latest Baccarat 1 round, or null if there is none yet.",
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "maximum": 20
            },
            "description": "Seconds the response may wait for the next round, up to 20. It only waits if you already have the latest one: send its `ETag` in `if-none-match` or its `id` in `after`. When a round closes, the response comes right away with it; if the time runs out first, you get `304` (with ETag) or the same round (with `after`). It counts as a single request, and your client timeout must be longer than `wait`."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "The `id` of the last round you have. Only used together with `wait`, for clients that do not keep the `ETag`."
          },
          {
            "name": "If-None-Match",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "ETag of the last response you received."
          }
        ],
        "responses": {
          "200": {
            "description": "The latest round, or `data: null` when there is none yet.",
            "headers": {
              "ETag": {
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "$ref": "#/components/schemas/Baccarat1Round"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": {
                    "id": "v1793553361643",
                    "game": "baccarat-1",
                    "tableId": "pragmatic-baccarat-1",
                    "startedAt": "2026-11-01T17:15:58.000Z",
                    "settledAt": "2026-11-01T17:16:21.643Z",
                    "outcome": "player",
                    "data": {
                      "player": {
                        "cards": [
                          "JS",
                          "8H"
                        ],
                        "score": 8,
                        "pair": false
                      },
                      "banker": {
                        "cards": [
                          "2C",
                          "KC"
                        ],
                        "score": 2,
                        "pair": false
                      },
                      "natural": true
                    }
                  }
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/baccarat-1/results": {
      "get": {
        "operationId": "baccarat1Results",
        "tags": [
          "Baccarat 1"
        ],
        "summary": "Baccarat 1 rounds, paginated",
        "description": "Baccarat 1 rounds from newest to oldest. To fetch the next page, pass the response's `nextCursor` as `before`, and when it comes back `null` there are no more results.",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 50
            },
            "description": "How many rounds to return, 50 by default and 1000 at most."
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Returns only rounds settled before this date, like the `nextCursor` of the previous page, and how far back you can go depends on the plan."
          },
          {
            "name": "after",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "To sync without repeating or skipping rounds, pass the `settledAt` or the `id` of the last round you already have, and the response brings only the rounds settled after it, from oldest to newest, up to `limit`. When the page comes back full, pass its `nextCursor` as the next `after`, and when it comes back `null` you are up to date. It also follows the plan's history limit and can be combined with `before`."
          }
        ],
        "responses": {
          "200": {
            "description": "A page of rounds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data",
                    "nextCursor"
                  ],
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Baccarat1Round"
                      }
                    },
                    "nextCursor": {
                      "anyOf": [
                        {
                          "type": "string"
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  }
                },
                "example": {
                  "data": [
                    {
                      "id": "v1793553361643",
                      "game": "baccarat-1",
                      "tableId": "pragmatic-baccarat-1",
                      "startedAt": "2026-11-01T17:15:58.000Z",
                      "settledAt": "2026-11-01T17:16:21.643Z",
                      "outcome": "player",
                      "data": {
                        "player": {
                          "cards": [
                            "JS",
                            "8H"
                          ],
                          "score": 8,
                          "pair": false
                        },
                        "banker": {
                          "cards": [
                            "2C",
                            "KC"
                          ],
                          "score": 2,
                          "pair": false
                        },
                        "natural": true
                      }
                    }
                  ],
                  "nextCursor": "2026-11-01T17:16:21.643Z"
                }
              }
            }
          },
          "304": {
            "description": "Nothing changed since the ETag sent in `If-None-Match`."
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/baccarat-1/stream": {
      "get": {
        "operationId": "baccarat1Stream",
        "tags": [
          "Baccarat 1"
        ],
        "summary": "Baccarat 1 rounds live (Server-Sent Events)",
        "description": "Live Baccarat 1 rounds over a connection that stays open (SSE, Server-Sent Events): every round arrives the moment it is saved, with no polling on your side. It is the fastest path, because it removes the gap between your requests. It is plain HTTP, so it goes through proxies and CDNs and works with any client that can send a header and read continuously.\n\nEvents: `ready`, `round`, `phase`, `correction`, `gap`, `closed`, plus a comment line every 20 seconds. A reconnection recovers up to 50 missed rounds, and every connection ends after 6 hours. Full reference: https://lynxmetrics.com/en/docs/baccarat-1#stream",
        "parameters": [
          {
            "name": "phases",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?phases=1`. There are two notices per round, both carrying `ref`, `game`, `phase`, `at` and `sentAt`: `betting`, when the table returns to the wide shot and betting on the next round opens, and `resolving`, when it enters the round's resolution and betting has already closed — that one also carries `roundId`, the id the round will have in `round`, several seconds ahead of the result. To know which round a result belongs to you do NOT need this: the `round` event's `id`, the guaranteed order and `last-event-id` are enough. The phase is for binding earlier, and it is not a promise of a result — a cut close-up, a gap in the feed or an unsure read make us drop the round on purpose, and then no `round` ever comes with that `ref`."
          },
          {
            "name": "corrections",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Optional: it only arrives if you ask for it with `?corrections=1`. It tells you that a round already delivered as `round` has changed: in Bac Bo, about once every 2,000 rounds the table re-shakes one cup after the dice had settled, and the die that was published no longer counts. It carries `data`, the round as it now stands (same `id` and same timestamps), `previous`, with the `outcome` and `data` that had been delivered, and `sentAt`. It has no event `id`, so `last-event-id` does not move. It arrives when that round ends on the table, from 30 seconds to 3 minutes after the `round`. Even if you don't ask for it, `/latest`, `/results` and `/stats` start returning the corrected round."
          },
          {
            "name": "last_event_id",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "When reconnecting, send the id of the last round you received in the `last-event-id` header — an SSE client that reconnects on its own already sends that header, and if you drive the reconnect yourself you send either the header or `?last_event_id=`, whichever suits you. `ready` comes back with `missed`: the rounds that settled while you were away, oldest to newest. The stream covers absences of up to 50 rounds; if more than that settled, it does not hand you the most recent ones and does not even try — `missed` comes `null` with `too_many_missed`, and you close the gap with `/results?after=`. `data` is still the latest settled round, which is normally the last item of `missed`. When recovery isn't possible, `missed` comes `null` and `resyncError` says why; the connection opens either way, because a reconnect must never fail over a stale cursor."
          },
          {
            "name": "Last-Event-ID",
            "in": "header",
            "schema": {
              "type": "string"
            },
            "description": "Same as `last_event_id`, as the header an SSE client sends on its own."
          }
        ],
        "responses": {
          "200": {
            "description": "An open event stream.",
            "content": {
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    },
    "/v1/baccarat-1/stats": {
      "get": {
        "operationId": "baccarat1Stats",
        "tags": [
          "Baccarat 1"
        ],
        "summary": "Baccarat 1 statistics over the latest rounds",
        "description": "Baccarat 1 statistics computed on the fly over the latest rounds.",
        "parameters": [
          {
            "name": "sample",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 1000,
              "default": 100
            },
            "description": "How many recent rounds to compute over, 100 by default and 1000 at most."
          }
        ],
        "responses": {
          "200": {
            "description": "The statistics.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "data"
                  ],
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Baccarat1Stats"
                    }
                  }
                },
                "example": {
                  "data": {
                    "total": 100,
                    "counts": {
                      "player": 44,
                      "banker": 47,
                      "tie": 9
                    },
                    "percentages": {
                      "player": 44,
                      "banker": 47,
                      "tie": 9
                    },
                    "currentStreak": {
                      "outcome": "banker",
                      "length": 2
                    },
                    "outcomes": {
                      "player": {
                        "count": 44,
                        "percent": 44,
                        "longestStreak": 4,
                        "sinceLast": 2
                      },
                      "banker": {
                        "count": 47,
                        "percent": 47,
                        "longestStreak": 7,
                        "sinceLast": 0
                      },
                      "tie": {
                        "count": 9,
                        "percent": 9,
                        "longestStreak": 1,
                        "sinceLast": 6
                      }
                    },
                    "sample": {
                      "from": "2026-11-14T14:20:31.204Z",
                      "to": "2026-11-14T15:18:27.939Z"
                    },
                    "pairs": {
                      "player": 7,
                      "banker": 8
                    },
                    "naturals": 31
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "402": {
            "$ref": "#/components/responses/Error402"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "500": {
            "$ref": "#/components/responses/Error500"
          },
          "502": {
            "$ref": "#/components/responses/Error502"
          },
          "504": {
            "$ref": "#/components/responses/Error504"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "A key created in the dashboard. Each key opens a single API."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "bad_request",
                  "unauthorized",
                  "key_wrong_api",
                  "trial_expired",
                  "subscription_required",
                  "payment_pending",
                  "plan_limit",
                  "not_found",
                  "route_not_found",
                  "rate_limited",
                  "too_many_streams",
                  "internal_error",
                  "upstream_error",
                  "timeout"
                ]
              },
              "message": {
                "type": "string",
                "description": "Explanation in the language of the account that owns the key."
              }
            }
          }
        }
      },
      "BacboLiveRound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Round id, unique and stable. It is generated by us, not by the provider, so use it only to compare and as a cursor (in after and last-event-id), without parsing its content."
          },
          "game": {
            "type": "string",
            "description": "API slug, always \"bacbo-live\" here."
          },
          "tableId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Table id at the provider, or null when the source does not provide it."
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Round start in UTC, or null when the source does not provide it."
          },
          "settledAt": {
            "type": "string",
            "description": "Round end in UTC, which is the date used for ordering and for before."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "player",
              "banker",
              "tie"
            ],
            "description": "Who won the round: player, banker or tie."
          },
          "data": {
            "type": "object",
            "properties": {
              "player": {
                "type": "object",
                "properties": {
                  "dice": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 2,
                    "maxItems": 2,
                    "description": "The Player's two dice, from 1 to 6."
                  },
                  "score": {
                    "type": "number",
                    "description": "Sum of the Player's dice, from 2 to 12."
                  }
                },
                "required": [
                  "dice",
                  "score"
                ]
              },
              "banker": {
                "type": "object",
                "properties": {
                  "dice": {
                    "type": "array",
                    "items": {
                      "type": "number"
                    },
                    "minItems": 2,
                    "maxItems": 2,
                    "description": "The Banker's two dice, from 1 to 6."
                  },
                  "score": {
                    "type": "number",
                    "description": "Sum of the Banker's dice, from 2 to 12."
                  }
                },
                "required": [
                  "dice",
                  "score"
                ]
              },
              "multiplier": {
                "anyOf": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "null"
                  }
                ],
                "description": "Multiplier paid on a tie, such as 4, 6 or 88, and null when the round does not end in a tie."
              }
            },
            "required": [
              "player",
              "banker",
              "multiplier"
            ]
          }
        },
        "required": [
          "id",
          "game",
          "tableId",
          "startedAt",
          "settledAt",
          "outcome",
          "data"
        ]
      },
      "BacboLiveStats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "How many rounds were counted, equal to sample or fewer if there are not enough yet."
          },
          "counts": {
            "type": "object",
            "description": "Player wins, Banker wins and ties in the sample."
          },
          "percentages": {
            "type": "object",
            "description": "The same counts as percentages, with one decimal place."
          },
          "currentStreak": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The outcome repeating right now and for how many rounds, or null with no rounds."
          },
          "outcomes": {
            "type": "object",
            "description": "One block per outcome: count (how many times it came up), percent, longestStreak (the longest run in the sample) and sinceLast (rounds since the last time, with 0 for the most recent round and null if it did not come up in the sample). Same shape on every API."
          },
          "sample": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sample period: the settledAt of the oldest round (from) and of the newest (to), or null with no rounds."
          },
          "tieMultipliers": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "How many ties in the sample paid each multiplier, keyed by the multiplier."
          }
        },
        "required": [
          "total",
          "counts",
          "percentages",
          "currentStreak",
          "outcomes",
          "sample",
          "tieMultipliers"
        ]
      },
      "LightningBaccaratRound": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Round id, unique and stable. It is generated by us, not by the provider, so use it only to compare and as a cursor (in after and last-event-id), without parsing its content."
          },
          "game": {
            "type": "string",
            "description": "API slug, always \"lightning-baccarat\" here."
          },
          "tableId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Table id at the provider, or null when the source does not provide it."
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Round start in UTC, or null when the source does not provide it."
          },
          "settledAt": {
            "type": "string",
            "description": "Round end in UTC, which is the date used for ordering and for before."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "player",
              "banker",
              "tie"
            ],
            "description": "Who won the round: player, banker or tie."
          },
          "data": {
            "type": "object",
            "properties": {
              "player": {
                "type": "object",
                "properties": {
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The Player's cards in the order they were dealt, two or three, each one like KH: rank in A23456789TJQK (T is the ten) and suit in CDHS."
                  },
                  "score": {
                    "type": "number",
                    "description": "The Player's score, from 0 to 9: the sum of the cards modulo 10."
                  },
                  "pair": {
                    "type": "boolean",
                    "description": "true when the Player's first two cards have the same rank."
                  }
                },
                "required": [
                  "cards",
                  "score",
                  "pair"
                ]
              },
              "banker": {
                "type": "object",
                "properties": {
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The Banker's cards in the order they were dealt, in the same format as the Player's."
                  },
                  "score": {
                    "type": "number",
                    "description": "The Banker's score, from 0 to 9."
                  },
                  "pair": {
                    "type": "boolean",
                    "description": "true when the Banker's first two cards have the same rank."
                  }
                },
                "required": [
                  "cards",
                  "score",
                  "pair"
                ]
              },
              "natural": {
                "type": "boolean",
                "description": "true when either side made 8 or 9 with its first two cards, which ends the round with no third card."
              }
            },
            "required": [
              "player",
              "banker",
              "natural"
            ]
          }
        },
        "required": [
          "id",
          "game",
          "tableId",
          "startedAt",
          "settledAt",
          "outcome",
          "data"
        ]
      },
      "LightningBaccaratStats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "How many rounds were counted, equal to sample or fewer if there are not enough yet."
          },
          "counts": {
            "type": "object",
            "description": "Player wins, Banker wins and ties in the sample."
          },
          "percentages": {
            "type": "object",
            "description": "The same counts as percentages, with one decimal place."
          },
          "currentStreak": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The outcome repeating right now and for how many rounds, or null with no rounds."
          },
          "outcomes": {
            "type": "object",
            "description": "One block per outcome: count (how many times it came up), percent, longestStreak (the longest run in the sample) and sinceLast (rounds since the last time, with 0 for the most recent round and null if it did not come up in the sample). Same shape on every API."
          },
          "sample": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sample period: the settledAt of the oldest round (from) and of the newest (to), or null with no rounds."
          },
          "pairs": {
            "type": "object",
            "description": "How many rounds in the sample had a pair on the Player and on the Banker."
          },
          "naturals": {
            "type": "number",
            "description": "How many rounds in the sample ended in a natural."
          }
        },
        "required": [
          "total",
          "counts",
          "percentages",
          "currentStreak",
          "outcomes",
          "sample",
          "pairs",
          "naturals"
        ]
      },
      "Baccarat1Round": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Round id, unique and stable. It is generated by us, not by the provider, so use it only to compare and as a cursor (in after and last-event-id), without parsing its content."
          },
          "game": {
            "type": "string",
            "description": "API slug, always \"baccarat-1\" here."
          },
          "tableId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Table id at the provider, or null when the source does not provide it."
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "description": "Moment the cards of the round started to appear on the table, in UTC. On this API it is not when betting opened: it sits a few seconds before settledAt and can be equal to it, so do not use the difference between the two as the round duration."
          },
          "settledAt": {
            "type": "string",
            "description": "Round end in UTC, which is the date used for ordering and for before."
          },
          "outcome": {
            "type": "string",
            "enum": [
              "player",
              "banker",
              "tie"
            ],
            "description": "Who won the round: player, banker or tie."
          },
          "data": {
            "type": "object",
            "properties": {
              "player": {
                "type": "object",
                "properties": {
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The Player's cards in the order they were dealt, two or three, each one like KH: rank in A23456789TJQK (T is the ten) and suit in CDHS."
                  },
                  "score": {
                    "type": "number",
                    "description": "The Player's score, from 0 to 9: the sum of the cards modulo 10."
                  },
                  "pair": {
                    "type": "boolean",
                    "description": "true when the Player's first two cards have the same rank."
                  }
                },
                "required": [
                  "cards",
                  "score",
                  "pair"
                ]
              },
              "banker": {
                "type": "object",
                "properties": {
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "The Banker's cards in the order they were dealt, in the same format as the Player's."
                  },
                  "score": {
                    "type": "number",
                    "description": "The Banker's score, from 0 to 9."
                  },
                  "pair": {
                    "type": "boolean",
                    "description": "true when the Banker's first two cards have the same rank."
                  }
                },
                "required": [
                  "cards",
                  "score",
                  "pair"
                ]
              },
              "natural": {
                "type": "boolean",
                "description": "true when either side made 8 or 9 with its first two cards, which ends the round with no third card."
              }
            },
            "required": [
              "player",
              "banker",
              "natural"
            ]
          }
        },
        "required": [
          "id",
          "game",
          "tableId",
          "startedAt",
          "settledAt",
          "outcome",
          "data"
        ]
      },
      "Baccarat1Stats": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "How many rounds were counted, equal to sample or fewer if there are not enough yet."
          },
          "counts": {
            "type": "object",
            "description": "Player wins, Banker wins and ties in the sample."
          },
          "percentages": {
            "type": "object",
            "description": "The same counts as percentages, with one decimal place."
          },
          "currentStreak": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "The outcome repeating right now and for how many rounds, or null with no rounds."
          },
          "outcomes": {
            "type": "object",
            "description": "One block per outcome: count (how many times it came up), percent, longestStreak (the longest run in the sample) and sinceLast (rounds since the last time, with 0 for the most recent round and null if it did not come up in the sample). Same shape on every API."
          },
          "sample": {
            "anyOf": [
              {
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "description": "Sample period: the settledAt of the oldest round (from) and of the newest (to), or null with no rounds."
          },
          "pairs": {
            "type": "object",
            "description": "How many rounds in the sample had a pair on the Player and on the Banker."
          },
          "naturals": {
            "type": "number",
            "description": "How many rounds in the sample ended in a natural."
          }
        },
        "required": [
          "total",
          "counts",
          "percentages",
          "currentStreak",
          "outcomes",
          "sample",
          "pairs",
          "naturals"
        ]
      }
    },
    "responses": {
      "Error400": {
        "description": "`bad_request`: A parameter has an invalid format, such as a before date that is not ISO 8601.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error401": {
        "description": "`unauthorized`: Missing, invalid or revoked key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error402": {
        "description": "`payment_pending`: The payment for the subscription the key belongs to has been pending for more than 3 days.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error403": {
        "description": "`key_wrong_api`: The key belongs to another API.\n\n`trial_expired`: The trial key has ended, so subscribe to the trial API in your dashboard and the same key works again.\n\n`subscription_required`: The subscription the key belongs to isn't active.\n\n`plan_limit`: The request goes beyond what your plan on this API allows, such as older history.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error404": {
        "description": "`not_found`: This API doesn't exist or isn't live yet.\n\n`route_not_found`: This path doesn't exist.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error429": {
        "description": "`rate_limited`: Too many requests in a short time, so wait the seconds in Retry-After and try again.\n\n`too_many_streams`: The API has all /stream connections busy right now, so try again shortly. Going over your plan's connection count does not cause this error: the key's oldest connection is ended and the new one takes its place.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error500": {
        "description": "`internal_error`: Unexpected error on our side.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error502": {
        "description": "`upstream_error`: We couldn't read the data right now, so please try again shortly.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "Error504": {
        "description": "`timeout`: The request took more than 10 seconds, try again in a moment.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  }
}