{"id":29053636,"url":"https://github.com/efcasado/uof_api","last_synced_at":"2025-06-27T01:07:20.187Z","repository":{"id":239031448,"uuid":"787588360","full_name":"efcasado/uof_api","owner":"efcasado","description":"An Elixir client for Betradar's Unified Odds Feed (UOF) API","archived":false,"fork":false,"pushed_at":"2025-03-28T10:50:05.000Z","size":439,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-03T22:01:54.850Z","etag":null,"topics":["betradar","elixir","sports-betting","uof"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/efcasado.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-16T20:07:11.000Z","updated_at":"2025-03-28T10:50:07.000Z","dependencies_parsed_at":"2024-05-20T19:50:00.790Z","dependency_job_id":"af669ace-03f5-4382-aa9f-a90af4c14d09","html_url":"https://github.com/efcasado/uof_api","commit_stats":null,"previous_names":["efcasado/uof_api"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/efcasado/uof_api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efcasado%2Fuof_api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efcasado%2Fuof_api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efcasado%2Fuof_api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efcasado%2Fuof_api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/efcasado","download_url":"https://codeload.github.com/efcasado/uof_api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/efcasado%2Fuof_api/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262170241,"owners_count":23269607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["betradar","elixir","sports-betting","uof"],"created_at":"2025-06-27T01:07:16.874Z","updated_at":"2025-06-27T01:07:20.128Z","avatar_url":"https://github.com/efcasado.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"![UOF API](https://github.com/efcasado/uof_api/raw/main/assets/readme_logo.png)\n\n[![Build Status](https://github.com/efcasado/uof_api/actions/workflows/elixir.yml/badge.svg?branch=main)](https://github.com/efcasado/uof_api/actions)\n[![Package Version](https://img.shields.io/hexpm/v/uof_api.svg)](https://hex.pm/packages/uof_api)\n\n\n# UOF API\n\n\u003e [!IMPORTANT]\n\u003e This is an **unofficial client** for Betradar's Unified Odds Feed (UOF) HTTP API.\n\u003e Betradar offers official Java and .NET SDKs. You can read more about these\n\u003e [here](https://sdk.sportradar.com).\n\nElixir client for Betradar's Unified Odds Feed (UOF) HTTP API.\n\nThis project implements Betradar's Custom Bet, Probability, Recovery and Sports\nAPIs, which can be found in the `UOF.API.{CustomBet, Probability, Recovery,\nSports}` modules, respectively.\n\n\n## Get Started\n\n### Configuration\n\nTo be able to interact with Betradar's API, you first need to configure a valid\n`authentication token` and the `base url` of the Betradar environment you want\nto use.\n\n```elixir\n:ok = Application.put_env(:uof_api, :base_url, \"\u003cbetradar-uof-base-url\u003e\")\n:ok = Application.put_env(:uof_api, :auth_token, \"\u003cbetradar-uof-auth-token\u003e\")\n```\n\n### Usage\n\nFetch all available fixtures.\n\n```elixir\nfixtures = UOF.API.Sports.fixtures\n```\n\nGiven a list fixtures, count how many of them there are.\n\n```elixir\nEnum.count(fixtures)\n# =\u003e 51591\n```\n\nOr inspect a random fixture from the list.\n\n```elixir\nfixture = Enum.random(fixtures)\n# =\u003e\n# %UOF.API.Mappings.SportEvent{\n#   liveodds: nil,\n#   status: \"not_started\",\n#   next_live_time: nil,\n#   id: \"sr:match:46657257\",\n#   scheduled: \"2024-12-01T23:00:00+00:00\",\n#   start_time_tbd: true,\n#   venue: %UOF.API.Mappings.Venue{\n#     id: \"sr:venue:69401\",\n#     name: \"Estadio Claudio Chiqui Tapia\",\n#     capacity: 4400,\n#     city_name: \"Barracas\",\n#     country_name: \"Argentina\",\n#     map_coordinates: \"-34.646901,-58.396364\",\n#     country_code: \"ARG\"\n#   },\n#   season: %UOF.API.Mappings.Season{\n#     id: \"sr:season:114317\",\n#     name: \"Liga Profesional 2024\",\n#     start_date: \"2024-05-04\",\n#     end_date: \"2024-12-16\",\n#     year: \"2024\",\n#     tournament_id: \"sr:tournament:155\"\n#   },\n#   tournament_round: %UOF.API.Mappings.TournamentRound{\n#     betradar_id: 68,\n#     betradar_name: nil,\n#     type: \"group\",\n#     name: nil,\n#     cup_round_matches: nil,\n#     cup_round_match_number: nil,\n#     other_match_id: nil,\n#     number: \"25\",\n#     group: nil,\n#     group_id: nil,\n#     group_long_name: \"Liga Profesional\",\n#     phase: \"regular season\"\n#   },\n#   tournament: %UOF.API.Mappings.Tournament{\n#     id: \"sr:tournament:155\",\n#     name: \"Liga Profesional\",\n#     current_season: nil,\n#     season_coverage: nil,\n#     sport: %UOF.API.Mappings.Sport{id: \"sr:sport:1\", name: \"Soccer\"},\n#     category: %UOF.API.Mappings.Category{\n#       id: \"sr:category:48\",\n#       name: \"Argentina\",\n#       country_code: \"ARG\"\n#     }\n#   },\n#   competitors: [\n#     %UOF.API.Mappings.Competitor{\n#       id: \"sr:competitor:65668\",\n#       name: \"Barracas Central\",\n#       state: nil,\n#       country: \"Argentina\",\n#       country_code: \"ARG\",\n#       abbreviation: \"BAR\",\n#       qualifier: \"home\",\n#       virtual: nil,\n#       gender: \"male\",\n#       short_name: \"Barracas\",\n#       sport: nil,\n#       category: nil,\n#       references: [\n#         %UOF.API.Mappings.Reference{name: \"betradar\", value: \"17080628\"}\n#       ]\n#     },\n#     %UOF.API.Mappings.Competitor{\n#       id: \"sr:competitor:7628\",\n#       name: \"CA Tigre\",\n#       state: nil,\n#       country: \"Argentina\",\n#       country_code: \"ARG\",\n#       abbreviation: \"TIG\",\n#       qualifier: \"away\",\n#       virtual: nil,\n#       gender: \"male\",\n#       short_name: \"Tigre\",\n#       sport: nil,\n#       category: nil,\n#       references: [\n#         %UOF.API.Mappings.Reference{name: \"betradar\", value: \"1048782\"}\n#       ]\n#     }\n#   ]\n# }\n```\n\nWe can also list of the different statuses reported by all the currently\navailable fixtures\n\n```elixir\nfixtures\n|\u003e Enum.map(\u0026(\u00261.status))\n|\u003e Enum.uniq\n# =\u003e [\"not_started\", \"cancelled\", \"postponed\", \"closed\"]\n```\n\nSimilarly, we can easily get a list of the different sports the currently\navailable fixtures belong to\n\n```elixir\nfixtures\n|\u003e Enum.map(\u0026(\u00261.tournament.sport.name))\n|\u003e Enum.uniq\n# =\u003e\n# [\n#   \"Soccer\",\n#   \"Handball\",\n#   \"American Football\",\n#   \"Rugby\",\n#   \"Basketball\",\n#   \"Volleyball\",\n#   \"Cricket\",\n#   \"Baseball\",\n#   \"Table Tennis\",\n#   \"Tennis\",\n#   \"Futsal\",\n#   \"Aussie Rules\",\n#   \"Ice Hockey\",\n#   \"Speedway\",\n#   \"Field hockey\",\n#   \"Waterpolo\",\n#   \"Pesapallo\",\n#   \"Boxing\",\n#   \"MMA\",\n#   \"Bowls\",\n#   \"ESport Call of Duty\",\n#   \"Gaelic Hurling\",\n#   \"Darts\",\n#   \"ESport Counter-Strike\",\n#   \"Rink Hockey\",\n#   \"ESport Arena of Valor\",\n#   \"Basketball 3x3\",\n#   \"Lacrosse\",\n#   \"ESport King of Glory\",\n#   \"Gaelic Football\",\n#   \"ESport League of Legends\",\n#   \"Squash\",\n#   \"eSoccer\",\n#   \"Snooker\",\n#   \"ESport Dota\",\n#   \"Cycling\"\n# ]\n```\n\nOr, count how many fixtures there are for each sport\n\n```elixir\nfixtures\n|\u003e Enum.reduce(%{}, fn(f, acc) -\u003e Map.update(acc, f.tournament.sport.name, 1, \u0026(\u00261 + 1)) end)\n# =\u003e\n# %{\n#   \"Handball\" =\u003e 776,\n#   \"Basketball\" =\u003e 2832,\n#   \"Cricket\" =\u003e 673,\n#   \"Speedway\" =\u003e 133,\n#   \"ESport Call of Duty\" =\u003e 50,\n#   \"Futsal\" =\u003e 383,\n#   \"Boxing\" =\u003e 65,\n#   \"Gaelic Football\" =\u003e 2,\n#   \"Waterpolo\" =\u003e 67,\n#   \"Rugby\" =\u003e 1168,\n#   \"Gaelic Hurling\" =\u003e 19,\n#   \"Baseball\" =\u003e 13428,\n#   \"Darts\" =\u003e 70,\n#   \"Soccer\" =\u003e 26913,\n#   \"MMA\" =\u003e 102,\n#   \"Table Tennis\" =\u003e 535,\n#   \"Lacrosse\" =\u003e 9,\n#   \"Tennis\" =\u003e 751,\n#   \"Ice Hockey\" =\u003e 300,\n#   \"eSoccer\" =\u003e 492,\n#   \"Cycling\" =\u003e 32,\n#   \"ESport Counter-Strike\" =\u003e 99,\n#   \"ESport Arena of Valor\" =\u003e 1,\n#   \"Squash\" =\u003e 75,\n#   \"ESport King of Glory\" =\u003e 7,\n#   \"Field hockey\" =\u003e 152,\n#   \"Pesapallo\" =\u003e 433,\n#   \"Bowls\" =\u003e 130,\n#   \"Rink Hockey\" =\u003e 8,\n#   \"ESport League of Legends\" =\u003e 4,\n#   \"ESport Dota\" =\u003e 4,\n#   \"Basketball 3x3\" =\u003e 48,\n#   \"American Football\" =\u003e 1172,\n#   \"Snooker\" =\u003e 4,\n#   \"Aussie Rules\" =\u003e 265,\n#   \"Volleyball\" =\u003e 389\n# }\n```\n\nWhen we fetch the list of all available fixtures, we only get limited\ninformation for each of the returned fixtures. We can use other available\nfunction to retrieve more details.\n\nThe example below illustrates how much more information there is available\nabout the teams competing in a football game.\n\n```elixir\nfixture = Enum.random(fixtures)\ncompetitor = Enum.random(fixture.competitors)\n{:ok, competitor} = UOF.API.Sports.competitor(competitor.id)\n# =\u003e\n# {:ok,\n#  %UOF.API.Mappings.CompetitorProfile{\n#    competitor: %UOF.API.Mappings.Competitor{\n#      id: \"sr:competitor:65668\",\n#      name: \"Barracas Central\",\n#      state: nil,\n#      country: \"Argentina\",\n#      country_code: \"ARG\",\n#      abbreviation: \"BAR\",\n#      qualifier: nil,\n#      virtual: nil,\n#      gender: \"male\",\n#      short_name: \"Barracas\",\n#      sport: %UOF.API.Mappings.Sport{id: \"sr:sport:1\", name: \"Soccer\"},\n#      category: %UOF.API.Mappings.Category{\n#        id: \"sr:category:48\",\n#        name: \"Argentina\",\n#        country_code: \"ARG\"\n#      },\n#      references: []\n#    },\n#    venue: %UOF.API.Mappings.Venue{\n#      id: \"sr:venue:69401\",\n#      name: \"Estadio Claudio Chiqui Tapia\",\n#      capacity: 4400,\n#      city_name: \"Barracas\",\n#      country_name: \"Argentina\",\n#      map_coordinates: \"-34.646901,-58.396364\",\n#      country_code: \"ARG\"\n#    },\n#    manager: %UOF.API.Mappings.Manager{\n#      id: \"sr:player:1989503\",\n#      name: \"Orfila, Alejandro\",\n#      nationality: \"Uruguay\",\n#      country_code: \"URY\"\n#    },\n#    jerseys: [\n#      %UOF.API.Mappings.Jersey{\n#        type: \"home\",\n#        base: \"ffffff\",\n#        sleeve: \"ff0000\",\n#        number: \"cf0d04\",\n#        stripes: true,\n#        horizontal_stripes: false,\n#        squares: false,\n#        split: false,\n#        shirt_type: \"short_sleeves\"\n#      },\n#      %UOF.API.Mappings.Jersey{\n#        type: \"away\",\n#        base: \"1f242f\",\n#        sleeve: \"ffffff\",\n#        number: \"c2880b\",\n#        stripes: false,\n#        horizontal_stripes: false,\n#        squares: false,\n#        split: false,\n#        shirt_type: \"short_sleeves\"\n#      },\n#      %UOF.API.Mappings.Jersey{\n#        type: \"goalkeeper\",\n#        base: \"d91c7e\",\n#        sleeve: \"000000\",\n#        number: \"000000\",\n#        stripes: false,\n#        horizontal_stripes: false,\n#        squares: false,\n#        split: false,\n#        shirt_type: \"short_sleeves\"\n#      },\n#      %UOF.API.Mappings.Jersey{\n#        type: \"third\",\n#        base: \"c60000\",\n#        sleeve: \"ffffff\",\n#        number: \"d5b225\",\n#        stripes: false,\n#        horizontal_stripes: false,\n#        squares: true,\n#        split: false,\n#        shirt_type: \"short_sleeves\"\n#      }\n#    ],\n#    players: [\n#      %UOF.API.Mappings.Player{\n#        type: \"midfielder\",\n#        date_of_birth: \"1998-01-30\",\n#        nationality: \"Argentina\",\n#        country_code: \"ARG\",\n#        height: 179,\n#        weight: nil,\n#        jersey_number: nil,\n#        full_name: \"Lucas Lopez\",\n#        gender: \"male\",\n#        id: \"sr:player:2227176\",\n#        name: \"López, Lucas\"\n#      },\n#      %UOF.API.Mappings.Player{\n#        type: \"goalkeeper\",\n#        date_of_birth: \"2000-04-30\",\n#        nationality: \"Argentina\",\n#        country_code: \"ARG\",\n#        height: 186,\n#        weight: nil,\n#        jersey_number: nil,\n#        full_name: \"Rafael Ferrario\",\n#        gender: \"male\",\n#        id: \"sr:player:1713131\",\n#        name: \"Ferrario, Rafael\"\n#      },\n#      %UOF.API.Mappings.Player{\n#        type: \"defender\",\n#        date_of_birth: \"1998-03-03\",\n#        nationality: \"Argentina\",\n#        country_code: \"ARG\",\n#        height: 183,\n#        weight: 73,\n#        jersey_number: 2,\n#        full_name: \"Nicolas Capraro\",\n#        gender: \"male\",\n#        id: \"sr:player:2539015\",\n#        name: \"Capraro, Nicolas\"\n#      },\n#      # truncated to improve readability\n#      # (...)\n#      %UOF.API.Mappings.Player{\n#        type: \"midfielder\",\n#        date_of_birth: \"2000-09-18\",\n#        nationality: \"Argentina\",\n#        country_code: \"ARG\",\n#        height: 175,\n#        weight: nil,\n#        jersey_number: 79,\n#        full_name: \"Maximiliano Andres Puig\",\n#        gender: \"male\",\n#        id: \"sr:player:2296877\",\n#        name: \"Puig, Maximiliano\"\n#      }\n#    ]\n#  }}\n```\n\n## Contributing\n\nThis project uses [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/).\n\nThe list of supported commit types can be found [here](https://github.com/insurgent-lab/conventional-changelog-preset?tab=readme-ov-file#commit-types).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefcasado%2Fuof_api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fefcasado%2Fuof_api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fefcasado%2Fuof_api/lists"}