Fast and simple classes for interacting with the Betfair API and Stream.
Available on NuGet
dotnet add package Betfair
or
PM> Install-Package Betfair
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
}