Install
Install from crates.io after publishing:
Or use the GitHub repo before the crate is published:
[]
= { = "https://github.com/odds-api/odds-api-rust", = "v0.1.0" }
For local development from the GitHub repo:
Quickstart
use ;
async
The SDK reads ODDS_API_KEY and ODDS_API_BASE_URL from the environment:
let client = from_env?;
let sports = client.list_sports.await?;
Common methods
list_sportslist_bookmakerslist_leaguessearch_eventsget_eventget_event_bookmakersget_odds_snapshotget_odds_historyfind_best_oddscompare_bookmakersfind_arbitragefind_positive_evget_line_movementsearch_racing_eventsget_racing_eventget_racing_oddsget_resultsget_api_metadataget_meget_usageget_limitsget_market_schema
Examples
examples/basic.rs
examples/arbitrage_scanner.rs
Run an example:
Why use this SDK?
odds-api-rust keeps the Python and Go SDKs' small, mock-friendly shape while using idiomatic Rust:
- async requests with
reqwest ODDS_API_KEYandODDS_API_BASE_URLsupport- API key auth with
X-API-Key - optional bearer token support
- typed error variants for auth, rate limits, validation, and server errors
- helper methods for common sports, racing, odds, betting, account, and metadata workflows
- generic
getandpostmethods for endpoints not covered yet
Safety
Arbitrage and positive EV examples are betting research workflows, not guaranteed-profit systems. Always account for stale odds, limits, delays, suspensions, voids, jurisdiction, and execution risk.
Links
- Website: https://odds-api.net
- API: https://api.odds-api.net/v1
- OpenAPI: https://github.com/odds-api/odds-api/blob/main/openapi.yaml
- Main repo: https://github.com/odds-api/odds-api
- Rust package docs: https://docs.rs/odds-api