Package pinnacle.api



Similar documents
Package retrosheet. April 13, 2015

Package uptimerobot. October 22, 2015

Program set _ApiPS for Pinnacle s services API

TXODDS Running Ball Feed US Sports Edition. User Guide

TXAPI IN-RUNNING FEED TENNIS EDITION

Package pdfetch. R topics documented: July 19, 2015

Package TSfame. February 15, 2013

Package searchconsoler

Package sjdbc. R topics documented: February 20, 2015

Package OECD. R topics documented: January 17, Type Package Title Search and Extract Data from the OECD Version 0.2.

We have put together this beginners guide to sports betting to help you through your first foray into the betting world.

Package whoapi. R topics documented: June 26, Type Package Title A 'Whoapi' API Client Version Date Author Oliver Keyes

Package WikipediR. January 13, 2016

Package empiricalfdr.deseq2

Bet Types: Locating. This tutorial serves as a guide to locating the various bet types on the relevant bookmaker websites.

Package translater. R topics documented: February 20, Type Package

Using XACML Policies to Express OAuth Scope. Hal Lockhart Oracle June 27, 2013

Package RCassandra. R topics documented: February 19, Version Title R/Cassandra interface

Package dsmodellingclient

Package fimport. February 19, 2015

Package AzureML. August 15, 2015

Package cgdsr. August 27, 2015

REST Webservices API Reference Manual

SPARROW Gateway. Developer API. Version 2.00

Package packrat. R topics documented: March 28, Type Package

Fairsail REST API: Guide for Developers

Package R4CDISC. September 5, 2015

Package HadoopStreaming

Package missforest. February 20, 2015

IoT-Ticket.com. Your Ticket to the Internet of Things and beyond. IoT API

Package bizdays. March 13, 2015

Data Mailbox. support.ewon.biz. Reference Guide

Package tagcloud. R topics documented: July 3, 2015

Package plan. R topics documented: February 20, 2015

Riverbed Cascade Shark Common REST API v1.0

Package sendmailr. February 20, 2015

Package dsstatsclient

Package hive. January 10, 2011

Version ENCORE SYSTEMS LLC. Web Development and ecommerce Integration. PayPal NVP API Class Library User Guide

Package hoarder. June 30, 2015

Software Engineering I CS524 Professor Dr. Liang Sheldon X. Liang

Package jrvfinance. R topics documented: October 6, 2015

Package LexisPlotR. R topics documented: April 4, Type Package

Package optirum. December 31, 2015

ADDING A BET BONUS PROMO CODE TO YOUR ACCOUNT

MS ACCESS DATABASE DATA TYPES

Coveo Platform 7.0. Oracle Knowledge Connector Guide

SnapLogic Salesforce Snap Reference

cielo24 Documentation

SAML v2.0 for.net Developer Guide

Package dunn.test. January 6, 2016

API Reference Guide. API Version 1. Copyright Platfora 2016

Package erp.easy. September 26, 2015

Importing Lease Data into Forms Online

Package EasyHTMLReport

Online signature API. Terms used in this document. The API in brief. Version 0.20,

PeopleSoft. Travel and Expense Center. Expense Report. User Guide

COLLABORATION NAVIGATING CMiC

Change Compensation for a Position or Employee

Version ENCORE SYSTEMS LLC. Web Development and ecommerce Integration. PayPal SOAP API Class Library User Guide

Ansible Tower API Guide

Pervasive Data Integrator. Oracle CRM On Demand Connector Guide

LIVE BETTING ULTRA RULES

Google Content Extension

Coveo Platform 7.0. Salesforce Connector Guide

REST Webservices API Tutorial

Kofax Export Connector for Microsoft SharePoint

Package DCG. R topics documented: June 8, Type Package

vcloud Air Platform Programmer's Guide

Informatica Cloud Connector for SharePoint 2010/2013 User Guide

Package hazus. February 20, 2015

Sports Action & PlayNow Sports FAQ s

Dobbin Day - User Guide

Documentation to use the Elia Infeed web services

Process: Self Service

Package benford.analysis

SYSPRO App Store: Registration Guide

Integrated Billing Solutions with HP CSA 4.00

agileworkflow Manual 1. agileworkflow 2. The repository 1 of 29 Contents Definition

Lesson 07: MS ACCESS - Handout. Introduction to database (30 mins)

Package PKI. July 28, 2015

Package TimeWarp. R topics documented: April 1, 2015

Databases with Microsoft Access. Using Access to create Databases Jan-Feb 2003

Package RIGHT. March 30, 2015

Additional details >>> HERE <<<

AutoTrading Fox Manual

Getting Started with the icontact API

Contents. 2 Alfresco API Version 1.0

Global Transport Secure ecommerce. Web Service Implementation Guide

Package bigrf. February 19, 2015

Integration Client Guide

FOOTBALL INVESTOR. Member s Guide 2014/15

Client SuiteScript Developer s Guide

Grandstream Networks, Inc. UCM6100 Series IP PBX Appliance CDR and REC API Guide

xstation API Communication Protocol Documentation v. 2.2

enom, Inc. API response codes

1. Change Log Introduction Flow summary Flow Overview Premium SMS flow Pin Flow Redirect Flow...

HTTP and HTTPS Statistics Services

Transcription:

Package pinnacle.api September 18, 2015 Type Package Version 1.89 Title A Wrapper for the Pinnacle Sports API URL https://github.com/marcoblume/pinnacle.api Author Marco Blume, Nicholas Jhirad, Amine Gassem Maintainer Marco Blume <marco.blume@pinnaclesports.com> An R interface to the Pinnaclesports.com API. LazyData true License GPL-3 Imports dplyr, uuid, httr, RCurl, XML, rjson, jsonlite NeedsCompilation no Repository CRAN Date/Publication 2015-09-18 22:02:30 R topics documented: AcceptTermsAndConditions................................ 2 authorization........................................ 2 cbindnames......................................... 3 CheckTermsAndConditions................................. 3 GetBetsList......................................... 4 GetClientBalance...................................... 4 GetCredentials....................................... 5 GetCurrencies........................................ 5 GetFixtures......................................... 6 GetInrunning........................................ 7 GetLeagues......................................... 8 GetLeaguesByID...................................... 9 GetLine........................................... 9 GetOdds........................................... 11 GetSports.......................................... 11 1

2 authorization JSONtoDF.......................................... 12 PlaceBet........................................... 13 PlaceParlayBet....................................... 14 SetCredentials........................................ 16 showoddsdf........................................ 17 Index 18 AcceptTermsAndConditions Accept terms and conditions, only run once per session, must agree to terms or functions will not work Accept terms and conditions, only run once per session, must agree to terms or functions will not work AcceptTermsAndConditions(accepted = FALSE) accepted Default=FALSE, BOOLEAN authorization Authorization for the Pinnacle API Authorization for the Pinnacle API authorization(user = as.character(getcredentials()$[1]), pwd = as.character(getcredentials()$[2])) user pwd Pinnacle Username Pinnacle Password

cbindnames 3 cbindnames Combines elements of an object, keeping names Combines elements of an object, keeping names cbindnames(x) x takes a list of elements with names data.frame containing combined names CheckTermsAndConditions Prompts User for Terms and Conditions, otherwise stops running function Prompts User for Terms and Conditions, otherwise stops running function CheckTermsAndConditions() CheckTermsAndConditions()

4 GetClientBalance GetBetsList Get a list of running/settled bets Get a list of running/settled bets GetBetsList(betlist = c("settled", "RUNNING"), fromdate = as.posixlt(sys.date(), tz = "UTC") - 15 * 24 * 60 * 60, todate = as.posixlt(sys.date(), tz = "UTC") + 24 * 60 * 60) betlist fromdate todate Either SETTLED or RUNNING Default Behavior shows both Iso8061 Date Default: 15 days prior in UTC, as.posixct(sys.date(), tz = UTC )- 15*24*60*60 Iso8061 Date Default: 1 day ahead in UTC (to counter possible fencepost situations), as.posixct(sys.date(), tz = UTC ) + 24*60*60 A list of bets and associated details GetBetsList() GetClientBalance Get Client Balance Get Client Balance GetClientBalance(force = TRUE) force Default=TRUE, boolean if TRUE force a reload of the data if FALSE use cached data

GetCredentials 5 vector client balance parameter GetClientBalance() GetCredentials Get your credential values Get your credential values GetCredentials() A data.frame with your username and password GetCredentials() GetCurrencies Get the list of supported Currencies Get the list of supported Currencies GetCurrencies(force = FALSE) force Default=FALSE, boolean if TRUE force a reload of the data if FALSE use cached data

6 GetFixtures a data frame with these columns: Currency Code Exchange Rate to USD Currency Name GetCurrencies() GetFixtures Get Fixtures Get Fixtures GetFixtures(sportname, leagueids, since = NULL, islive = 0) sportname leagueids since islive The sport name for which to retrieve the fixtures integer vector with league IDs. Default=NULL, numeric This is used to receive incremental updates. Use the value of last from previous fixtures response. Default=FALSE, boolean if TRUE retrieves ONLY live events if FALSE retrieved all events returns a data frame with columns: SportID Last League LeagueID EventID StartTime HomeTeamName

GetInrunning 7 AwayTeamName Rotation Number Live Status Status Parlay Status GetFixtures(sportname = "Badminton",leagueIds = 191545) GetInrunning GetInrunning GetInrunning GetInrunning() A dataframe containing the current State of live events GetInrunning()

8 GetLeagues GetLeagues Get Leagues for Sport(s) by name Returns all Leagues for the Sport(s) GetLeagues(sports, force = FALSE, regex = FALSE) sports force regex character vector of sports names. Default=FALSE, boolean if TRUE force a reload of the data if FALSE use cached data Default=FALSE, boolean if TRUE, retreives sports id using regular expression on names a data frame having columns: LeagueID LinesAvailable HomeTeam AllowRoundRobin LeagueName GetLeagues("Badminton")

GetLeaguesByID 9 GetLeaguesByID Get Leagues for Sport(s) by ID Returns all Leagues for the Sport(s) GetLeaguesByID(sportid, force = FALSE) sportid force integer vector of sports IDs boolean whether to get new data (TRUE) or use cached data (FALSE) a data frame having columns: LeagueID LinesAvailable HomeTeam AllowRoundRobin LeagueName GetLeaguesByID(1) GetLine Get Lines (Use to get more detail on a single line, but the GetOdds or showoddsdf versions are intended for large amounts of data) Get Lines (Use to get more detail on a single line, but the GetOdds or showoddsdf versions are intended for large amounts of data) GetLine(sportId, leagueids, eventid, periodnumber, bettype, team = NULL, side = NULL, handicap = NULL, oddsformat = "AMERICAN")

10 GetLine sportid leagueids eventid periodnumber bettype team side handicap oddsformat The sport ID integer vector of leagueids. numeric xxxxx xxxxx xxxx xxxx xxx xxx xxx returns a data frame with columns: SportID Last League LeagueID EventID StartTime HomeTeamName AwayTeamName Rotation Number Live Status Status Parlay Status GetLine(sportId=1,leagueids=191545,eventId=495418854, periodnumber=0,team="team1",bettype="moneyline")

GetOdds 11 GetOdds Get Odds Get Odds GetOdds(sportname, leagueids, since = NULL, islive = 0, force = TRUE) sportname leagueids since islive force The sport name for which to retrieve the fixutres integer vector of leagueids. numeric This is used to receive incremental updates. Use the value of last from previous fixtures response. boolean if TRUE retrieves ONLY live events boolean if FALSE, functions using cached data will use the values since the last force list of lists GetOdds (sportname="badminton", leagueids=191545,,islive=0) GetSports Get Sports Returns all sports with the status whether they currently have lines or not GetSports(force = FALSE)

12 JSONtoDF force Default=FALSE, boolean if TRUE force a reload of the data if FALSE use cached data a data frame with these columns: SportID LinesAvailable SportName GetSports() JSONtoDF Sets the determined depth as a data.frame, and evades R s listdropping rules Sets the determined depth as a data.frame, and evades R s list-dropping rules JSONtoDF(x, depth = 5, flag = TRUE) x depth flag a list numeric value of the number of sublist whether to start with combining factors or binding rows a tree with the defined level as a dataframe

PlaceBet 13 PlaceBet Place Bet Place bet in the system PlaceBet(stake, sportid, eventid, periodnumber, lineid, bettype, altlineid = NULL, team = NULL, side = NULL, acceptbetterline = TRUE, winriskstake = "RISK", oddsformat = "AMERICAN") stake sportid eventid periodnumber lineid bettype altlineid team side numeric Wager amount in currency numeric the sport id numeric the vent id numeric Number of the period, see Pinnacle API manual numeric ID of the line BET_TYPE SPREAD MONEYLINE TOTAL_POINTS TEAM_TOTAL_POINTS numeric ID of the alternate line (lineid must also be included) Default = NULL,, see Pinnacle API manual TEAM1 TEAM2 DRAW Defaulat = NULL,, see Pinnacle API manual OVER UNDER acceptbetterline Default=TRUE,boolean Whether or not to accept a bet when there is a line change in favor of the client winriskstake oddsformat Default="RISK", either place the stake to RISK or to WIN WIN RISK Default="AMERICAN", Desired Odds Format AMERICAN

14 PlaceParlayBet DECIMAL HONGKONG INDONESIAN MALAY list containing : status If Status is PROCESSED_WITH_ERROR errorcode will be in the response errorcode PlaceBet (stake=10, sportid=1, eventid=495418854, periodnumber=0, lineid=222136736, bettype="moneyline", team="team2", acceptbetterline=true, winriskstake="win", oddsformat="american") PlaceParlayBet PlaceParlayBet Place parlay or round robin parlay bet in the system PlaceParlayBet(riskAmount, legslist, roundrobinoptions = c("parlay", "TwoLegRoundRobin", "ThreeLegRoundRobin", "FourLegRoundRobin", "FiveLegRoundRobin", "SixLegRoundRobin", "SevenLegRoundRobin", "EightLegRoundRobin")[1], oddsformat = "AMERICAN", acceptbetterline = TRUE)

PlaceParlayBet 15 riskamount legslist numeric Wager amount in currency A list of wagers, where each wager must be in named list format. Required named values are: legbettype, lineid, either team or side, and periodnumber. Optional named values are: altlineid, pitcher1muststart, or pitcher2muststart. See the API Manual for more info lineid altlineid OPTIONAL sportid eventid periodnumber legbettype MONEYLINE SPREAD TOTAL TEAMTOTAL team/side using one will invalidate the other pitcher1muststart OPTIONAL pitcher2muststart OPTIONAL roundrobinoptions one of the round robin options, default is Parlay oddsformat Parlay TwoLegRoundRobin ThreeLegRoundRobin FourLegRoundRobin FiveLegRoundRobin SixLegRoundRobin SevenLegRoundRobin EightLegRoundRobin default: AMERICAN AMERICAN DECIMAL HONGKONG INDONESIAN MALAY acceptbetterline : Default TRUE,boolean Whether or not to accept a bet when there is a line change in favor of the client list containing: status If Status is PROCESSED_WITH_ERROR errorcode will be in the response errorcode

16 SetCredentials parlay1 <- list(lineid = 222136736, sportid=1, eventid = 495418854, periodnumber=0, legbettype = "MONEYLINE", team = TEAM1 ) parlay2 <- list(lineid = 223187865, sportid=1, eventid = 496997901, periodnumber=0, legbettype = "TOTAL_POINTS", side = OVER ) legslist <- list(parlay1,parlay2) PlaceParlayBet(riskAmount=10, legslist=legslist, roundrobinoptions="parlay", oddsformat="american", acceptbetterline=true) SetCredentials Set your pinnaclesports.com user credentials Set your pinnaclesports.com user credentials SetCredentials(username, password) username password Your username Your password

showoddsdf 17 showoddsdf showoddsdf - Takes a GetOdds JSON response and turns it into a data.frame showoddsdf - Takes a GetOdds JSON response and turns it into a data.frame showoddsdf(sportname, leagueids = NULL, since = NULL, islive = 0, attachleaguenames = TRUE, force = TRUE) sportname leagueids since The sport name for which to retrieve the fixutres numeric vector of leagueids - can get as output from GetLeagues numeric This is used to receive incremental updates. Use the value of last from previous fixtures response. islive boolean if TRUE retrieves ONLY live events attachleaguenames boolean default set to true, will attach league names. force boolean default set to TRUE, forces a reload of the cache. bettable leagues a dataframe combining GetOdds and GetFixtures data, containing NA s where levels of factors do not have a value. Naming convention is as follows, Example: spread.altlineid.n is the altlineid associated with spread.hdp.(n+1) whereas spread.hdp refers to the mainline. spread.altlineid is the first alternate, and equivalent to spread.altlineid.0 showoddsdf(sportname="badminton",leagueids=191545)

Index AcceptTermsAndConditions, 2 authorization, 2 cbindnames, 3 CheckTermsAndConditions, 3 GetBetsList, 4 GetClientBalance, 4 GetCredentials, 5 GetCurrencies, 5 GetFixtures, 6 GetInrunning, 7 GetLeagues, 8 GetLeaguesByID, 9 GetLine, 9 GetOdds, 11 GetSports, 11 JSONtoDF, 12 PlaceBet, 13 PlaceParlayBet, 14 SetCredentials, 16 showoddsdf, 17 18