forked from harveysburger/pinnaclewrapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# C# Wrapper for the PinnacleSports API | ||
|
||
A complete API client that builds on the <a href="http://www.pinnaclesports.com/en/api/manual">PinnacleSports API Documentation</a> | ||
|
||
I have cleaned up and extended the wrapper created by <a href="http://www.broculos.net/2014/04/pinnacle-sports-how-to-implement-rest.html">Nuno Freitas</a> to support the JSON functions (GetClientBalance, PlaceBet, GetLine, GetBets, GetInRunning). | ||
|
||
<strong>Usage:</strong> | ||
|
||
Here's an example of getting all lines for upcoming E-Sports matches (across all E-Sports leagues): | ||
|
||
var client = new PinnacleClient("username", "password", "AUD", OddsFormat.Decimal); | ||
var leagues = client.GetLeagues(12); // 12 is the E-Sports Sport Id. Use GetSports() to find others. | ||
var feed = client.GetFeed(12, leagues.Select(x => x.Id).ToArray()); | ||
|
||
Refreshing lines: | ||
|
||
According to the Pinnacle API Fair Use Policy GetFeed can be called every 5 seconds when supplying the timestamp parameter that's returned from GetFeed or every 60 seconds otherwise. | ||
|
||
Example (continuing from above): | ||
|
||
Thread.Sleep(5000); // wait 5 seconds between calls! | ||
var newFeed = client.GetFeed(12, leagues.Select(x => x.Id).ToArray(), feed.Timestamp); | ||
|
||
Enjoy! |