PinnacleWrapper 2.0.0

A complete API client that builds on the PinnacleSports API.
This library started off as a cleaned up version by anderj017 of the PinnacleAPI wrapper created by Nuno Freitas and has been extended and tweaked by various people since.

There is a newer version of this package available.
See the version list below for details.
Install-Package PinnacleWrapper -Version 2.0.0
dotnet add package PinnacleWrapper --version 2.0.0
<PackageReference Include="PinnacleWrapper" Version="2.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PinnacleWrapper --version 2.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

C# Wrapper for the PinnacleSports API

A complete API client that builds on the PinnacleSports API Documentation

Update

  • First version published on nuget.org
  • Library now targeting .netstandard 2.0 so should work from both .Net Framework 4.7.2 and .Net Core 2.2
  • You can override the default api version, v1, for the Fixtures and Odds API
  • PinnacleClient constructor now has an optional baseUrl parameter, default value https://api.pinnacle.com
  • GetFeed functionalities removed as they are deprecated by Pinnacle, use GetFixtures and GetOdds instead. If you need GetFeed revert to v1.0 of this library.

References

These references are available via NuGet.

  • Newtonsoft.Json
  • Microsoft.AspNet.WebApi.Client package

Usage

Here's an example of getting all lines for upcoming Tennis matches (across all leagues):

var client = new PinnacleClient("username", "password", "AUD", OddsFormat.Decimal);
var fixtures = client.GetFixtures(new GetFixturesRequest(33));	// 33 is the Tennis SportId. This gets all Events currently offered
var odds = client.GetOdds(new GetOddsRequest(12)); // this retrieves the odds that correspond to each fixture.

Refreshing lines:

Use the "since" parameter with GetFixtures (update current events) and GetOdds (get latest odds).

Example (continuing from above):

Thread.Sleep(5000);  // wait between calls one way or another. Calling the API too aggressively may get you blocked from using the API.
var oddsChanges = await _client.GetOdds(new GetOddsRequest(12, odds.Last));   

This library started off as a cleaned up version by anderj017 of the Pinnacle API wrapper created by Nuno Freitas and has been extended and tweaked by various people since.

The initial location of this wrapper was https://github.com/anderj017/pinnaclewrapper

Enjoy!

C# Wrapper for the PinnacleSports API

A complete API client that builds on the PinnacleSports API Documentation

Update

  • First version published on nuget.org
  • Library now targeting .netstandard 2.0 so should work from both .Net Framework 4.7.2 and .Net Core 2.2
  • You can override the default api version, v1, for the Fixtures and Odds API
  • PinnacleClient constructor now has an optional baseUrl parameter, default value https://api.pinnacle.com
  • GetFeed functionalities removed as they are deprecated by Pinnacle, use GetFixtures and GetOdds instead. If you need GetFeed revert to v1.0 of this library.

References

These references are available via NuGet.

  • Newtonsoft.Json
  • Microsoft.AspNet.WebApi.Client package

Usage

Here's an example of getting all lines for upcoming Tennis matches (across all leagues):

var client = new PinnacleClient("username", "password", "AUD", OddsFormat.Decimal);
var fixtures = client.GetFixtures(new GetFixturesRequest(33));	// 33 is the Tennis SportId. This gets all Events currently offered
var odds = client.GetOdds(new GetOddsRequest(12)); // this retrieves the odds that correspond to each fixture.

Refreshing lines:

Use the "since" parameter with GetFixtures (update current events) and GetOdds (get latest odds).

Example (continuing from above):

Thread.Sleep(5000);  // wait between calls one way or another. Calling the API too aggressively may get you blocked from using the API.
var oddsChanges = await _client.GetOdds(new GetOddsRequest(12, odds.Last));   

This library started off as a cleaned up version by anderj017 of the Pinnacle API wrapper created by Nuno Freitas and has been extended and tweaked by various people since.

The initial location of this wrapper was https://github.com/anderj017/pinnaclewrapper

Enjoy!

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.1.0 99 6/6/2019
2.1.0-beta 82 5/30/2019
2.0.0 81 5/25/2019