Betfair 9.0.1-alpha-3

This is a prerelease version of Betfair.
dotnet add package Betfair --version 9.0.1-alpha-3
                    
NuGet\Install-Package Betfair -Version 9.0.1-alpha-3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Betfair" Version="9.0.1-alpha-3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Betfair" Version="9.0.1-alpha-3" />
                    
Directory.Packages.props
<PackageReference Include="Betfair" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Betfair --version 9.0.1-alpha-3
                    
#r "nuget: Betfair, 9.0.1-alpha-3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Betfair@9.0.1-alpha-3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Betfair&version=9.0.1-alpha-3&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Betfair&version=9.0.1-alpha-3&prerelease
                    
Install as a Cake Tool

.NET Core GitHub license NuGet downloads

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%)

Mutation testing badge

Betfair

Fast and simple classes for interacting with the Betfair API and Stream.

I'm passionate about this library and love hearing from users! Join our Discussions to ask questions, share your experiences, or suggest new features. Your feedback helps make this library better for everyone.

Full documentation.

Installation

Available on NuGet

dotnet add package Betfair

or

PM> Install-Package Betfair

How to Subscribe to a Market Stream

Create a Subscription. Then use a MarketFilter to start a stream.
Full subscription documentation.

var credentials = new Credentials("USERNAME", "PASSWORD", "APP_KEY");
using var subscription = new Subscription(credentials);

await subscription.Subscribe(new StreamMarketFilter().WithMarketIds("MARKET_ID"));
await foreach (var change in subscription.ReadLines(default))
{
	// Handle changes
}

How to List Today's Horse Races

var credentials = new Credentials("USERNAME", "PASSWORD", "APP_KEY");

using var client = new BetfairApiClient(credentials);

var filter = new ApiMarketFilter()
    .WithMarketTypes(MarketType.Win)
    .WithCountries(Country.UnitedKingdom, Country.Ireland)
    .WithEventTypes(EventType.HorseRacing)
    .FromMarketStart(DateTimeOffset.UtcNow)
    .ToMarketStart(DateTimeOffset.UtcNow.AddDays(1));

var query = new MarketCatalogueQuery()
    .Include(MarketProjection.Event)
    .Include(MarketProjection.MarketStartTime)
    .Include(MarketProjection.MarketDescription)
    .Include(MarketProjection.RunnerDescription)
    .OrderBy(MarketSort.FirstToStart)
    .Take(200);

var marketCatalogues = await client.MarketCatalogue(filter, query);

Or use the helper extension.

var filter = new ApiMarketFilter()
    .TodaysCard();

var query = new MarketCatalogueQuery()
    .Include(MarketProjection.Event)
    .Include(MarketProjection.MarketStartTime)
    .Include(MarketProjection.MarketDescription)
    .Include(MarketProjection.RunnerDescription)
    .OrderBy(MarketSort.FirstToStart)
    .Take(200);

var marketCatalogues = await client.MarketCatalogue(filter, query);
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
9.0.1-alpha-3 189 8/27/2025
9.0.1-alpha-2 123 8/21/2025
9.0.1-alpha-1 524 7/22/2025
9.0.1-alpha 234 6/19/2025
9.0.0-alpha 138 6/19/2025
8.3.5 237 5/7/2025
8.3.4 594 7/25/2024
8.3.3 115 7/25/2024
8.3.2 117 7/24/2024
8.3.1 220 7/3/2024
8.3.0 134 6/23/2024
8.2.2 137 6/16/2024
8.2.1 276 5/5/2024
8.2.0 147 4/20/2024
8.1.0 154 2/3/2024
8.0.14 202 12/15/2023
8.0.13 138 12/15/2023
8.0.12 153 12/14/2023
8.0.11 165 12/8/2023
8.0.10 128 12/8/2023
8.0.9 138 12/8/2023
8.0.7 136 12/8/2023
8.0.6 136 12/8/2023
8.0.5 136 12/7/2023
8.0.4 136 12/6/2023
8.0.2 131 12/6/2023
8.0.1 155 12/3/2023
8.0.0 149 12/2/2023