Program set _ApiPS for Pinnacle s services API



Similar documents
ApiBD demo of using BetDAQ s services API

Package pinnacle.api

Creating Codes with Spreadsheet Upload

AutoTrading Fox Manual

Microsoft Access 2010 Part 1: Introduction to Access

Using SQL Server Management Studio

Virto Active Directory Service for SharePoint. Release Installation and User Guide

TXODDS Running Ball Feed US Sports Edition. User Guide

The most reliable cards bets in the Premier League. bets that paid out in 84%, 89% and 95% of games last season

COGNOS Query Studio Ad Hoc Reporting

Offline Remittance Processing Standalone, Service-Based, Multi-Client, Attorney Options

Merchant Reporting Tool

ConvincingMail.com Marketing Solution Manual. Contents

WS_FTP Professional 12

Table Of Contents. iii

The Bet Plan Bot Manual

CRM Migration Manager for Microsoft Dynamics CRM. User Guide

Business Insight Report Authoring Getting Started Guide

Business Objects InfoView Quick-start Guide

MS SQL Express installation and usage with PHMI projects

Context-sensitive Help Guide

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

FOOTBALL INVESTOR. Member s Guide 2014/15

Wakanda Studio Features

DocuSign for SharePoint

Office of History. Using Code ZH Document Management System

Introduction to Business Reporting Using IBM Cognos

WebDisk Essentials How to Post & Retrieve Files From Your Own Online Storage Area

Lab 9 Access PreLab Copy the prelab folder, Lab09 PreLab9_Access_intro

Settings 1 September 2015

Ohio University Computer Services Center August, 2002 Crystal Reports Introduction Quick Reference Guide

SharePoint AD Information Sync Installation Instruction

SharePoint Rollins College 2011

Information Server Documentation SIMATIC. Information Server V8.0 Update 1 Information Server Documentation. Introduction 1. Web application basics 2

DALHOUSIE NOTES ON PAYROLL EXPENSE DETAIL IN FINANCE SELF SERVICE. QUICK REFERENCE As of September 1, 2015

Utilities ComCash

Zanibal Plug-in For Microsoft Outlook Installation & User Guide Version 1.1

Bank Account 1 September 2015

UTRADE Online Trading Platform Demo

Novell ZENworks Asset Management 7.5

Adobe Dreamweaver - Basic Web Page Tutorial

NAB Trade Finance Online Customer User Guide

Call Recorder Quick CD Access System

Call Recorder User Guide

Rapid Assessment Key User Manual

Creating Database Tables in Microsoft SQL Server

Guide to the Disability Insurance Illustration System

A-AUTO 50 for Windows Setup Guide

Charter Business Phone. Online Control Panel Getting Started Guide. Document Version 1.0

Working with SQL Server Integration Services

DiskPulse DISK CHANGE MONITOR

Smart Web. User Guide. Amcom Software, Inc.

Supply Chain Finance WinFinance

WARNING DO NOT UNDER ANY CIRCUMSTANCE RUN MORE THAN ONE VERSION OF THE GREY HORSE BOT ON THE SAME MARKET.

M4 Systems. Advanced Timesheets and Expenses (ATS&E) User Guide

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

Quick Reference Guide PAYMENT GATEWAY (Virtual Terminal)

TimeValue Software Due Date Tracking and Task Management Software

Installation and Operation Manual Portable Device Manager, Windows version

F9 Integration Manager

Teradata SQL Assistant Version 13.0 (.Net) Enhancements and Differences. Mike Dempsey

Magento module Documentation

SIF Validation Tool. Wages Protection System Qatar Central Bank& Ministry of Labour And Social Affairs. End User Guide

123RF Corporate+ User s Guide

Note: With v3.2, the DocuSign Fetch application was renamed DocuSign Retrieve.

Accounting Manager. User Guide A31003-P1030-U

NJCU WEBSITE TRAINING MANUAL

User Manual Web DataLink for Sage Line 50. Version 1.0.1

How to Create and Send a Froogle Data Feed

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

M4 Systems. Remittance (ER) User Guide

MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC

Cyberex BCM-SFCM Configurator/Monitor User's Manual

MONAHRQ Installation Permissions Guide. Version 2.0.4

How to Login Username Password:

Ansur Test Executive. Users Manual

CAPIX Job Scheduler User Guide

The Welcome screen displays each time you log on to PaymentNet; it serves as your starting point or home screen.

Personal Cloud. Support Guide for Mac Computers. Storing and sharing your content 2

Installing LearningBay Enterprise Part 2

NDSR Utilities. Creating Backup Files. Chapter 9

File by OCR Manual. Updated December 9, 2008

Unified Communicator Advanced Training Handout

How To Import A File Into The Raise S Edge

Virtual Terminal & Online Portal

MAPPING THE WEBDRIVE REFERENCE GUIDE

Finance Reporting. Millennium FAST. User Guide Version 4.0. Memorial University of Newfoundland. September 2013

10 Step Guide to Getting Started with BOI Business On Line. Business On Line. 10 Step Guide to Getting Started. A BOL Setup Guide. ROI Only. v.

SerialMailer Manual. For SerialMailer 7.2. Copyright Falko Axmann. All rights reserved.

Importing and Exporting With SPSS for Windows 17 TUT 117

Capture Pro Software FTP Server System Output

Education Solutions Development, Inc. APECS Navigation: Business Systems Getting Started Reference Guide

DPD shipping module documentation. Magento module version 2.0.3

SnapLogic Tutorials Document Release: October 2013 SnapLogic, Inc. 2 West 5th Ave, Fourth Floor San Mateo, California U.S.A.

How to Use Motion Detection in ACTi Cameras

Global Search v 6.1 for Microsoft Dynamics CRM Online (2013 & 2015 versions)

Team Foundation Server 2012 Installation Guide

Transcription:

Program set _ApiPS for Pinnacle s services API 15th Feb 2015 Version 1.2.16 Support for API services of bookmaker Pinnacle Sports - program _ApiPS.EXE and auxiliary program _ApiPS_aut.EXE for getting of authorization string (based on username and password of players account at Pinnacle Sports) - for testing in "Command line" window - for retrieving from users program in various languages (C#/C++/Java/VB/Python ) - entry parameters for option of operation, filtering of data, structure XML/JSON/CSV - returned data in original structure of Pinnacles Api (XML/JSON) or in CSV-format Additional qualities - supplementation of original services and parameters API with additional : combined operations for getting of data sets for leagues+events or leagues+events+prices parameters for filtering of data volume during processing of operations (filters for names of league, period, markettype) - simply application, high speed (based on C++) Special DLL library for sportsbetting - DLL library for integration into programs of Visual Studio (C#, Basic,...) DLL_AnalTextStaSpo analysis of texts names of states, competitions, teams (common using for matching events in offer of different bookmakers) Demoversions in Visual C#, Visual Basic (including source codes) - description based on examples - source code for : - VISUAL C# + VISUAL BASIC : Windows Forms Applications with examples - forms for concrete operation(service) API or additional combined operation (display results for several examples of entry parameters or users experiments) - form frmotherbookie (see chapter 4.3. using of combination Analysis of Texts + Pinnacles API for matching offer of other bookie versus Pinnacle Sports with result: download in CSV structure - Pinnacles Odds for asked matches and types of bets) Similar conception program set _ApiBF (for API NG services of BetFair) - programs with demo ApiBD ( for API services of BetDAQ) program set for API of Matchbook : - see http://www.betoptim.com/index.aspx?lang=en&start=downinst In Building : 1) Program Bet_LIVE_Comparation comparation of current odds (prices, amounts) for concrete event from different sources API (preferred are LIVE/Inplay matches, prospective plan -> Trading) 2) Program Bet_Info.EXE Betfairs Api-NG in cooperation with database PostgreSQL for storage of current data 1

CONTENT : Program set _ApiPS for Pinnacle s services API... 1 1. INSTALLATION... 3 2. AUTHORIZATION string... 4 2.1. Batch for getting of Authorization string... 4 2.2. Auxiliary program _ApiPS_aut.EXE... 4 2.3. Getting of Authorization string in program code... 4 3. BASIC PROGRAM _ApiPS.EXE... 5 3.1. Testing of program _ApiPS.EXE in "Command Line" window... 5 3.2. Windows Forms Applications ( in Visual C# / Visual Basic )... 6 3.3. Usage of program _ApiPS.EXE in users program in other languages... 6 3.4. Entry parameters of program _ApiPS.EXE :... 7 3.5. Standard parameters of Pinnacles API :... 8 3.6. Additional parameters of _ApiPS.EXE for Pinnacles API :... 8 3.7. Additional Filtering of Leagues, Periods, Markets wildcards "*"... 10 3.8. Additional Filtering of Competitions(Leagues) _AT Analysis of texts... 10 4. USAGE of PROGRAM _ApiPS.EXE - Examples... 12 4.1. Original API operations of Pinnacle... 12 4.2. Combined operations of program _ApiPS.EXE... 14 4.3. Complete DEMO Download of Pinnacles Odds for requested matches with using "Analysis of Texts" ( for matching with offer of other bookie )... 15 5. Auxiliary program_apips_aut.exe, library DLL_AnalTextStaSpo.DLL... 19 5.1. Program _ApiPS_aut.EXE getting of Authorization string... 19 5.2. Library DLL_AnalTextStaSpo.dll - support for Analysis of texts... 19 6. Download, Update, Upgrade, Contact... 22 6.1. Update of files for Analysis of texts, of DLL_AnalTextStaSpo.dll... 22.... 22 Appendix A - Error Codes, Error Messages... 23 Appendix B - Parameter #4 (required values or other parameters for Filtering)... 24 Appendix C - Parameter #6 (additional parameters for Filtering)... 25 Appendix D - Operation Get_LeaguesEvents - structure of output CSV... 26 Appendix E - Operation GetFeed - structure of output CSV... 28.... 29 7. VERSIONs... 29 2

1. INSTALLATION 1) Download and store installation file ApiPS_Install.ZIP into any installation directory 2) Unpack Zip-file -> (Setup.EXE + ApiPS_Install.MSI) 3) Launch installation with Setup.EXE into installation directory f.e. D:\_Api_Install (can work together with program _ApiBF.EXE for API of Betfair, program for API of BetDAQ) or D:\Bet_Info (can work together with program Bet_Info.EXE) Subdirectories : a) _BAT.ApiPS batch files for testing in command line, detection of problems after installation b) _ApiBF (programs) _ApiPS_aut.EXE - for getting of authorization string (based on username and password of players account at Pinnacle Sports) _ApiPS.EXE program for calling of Pinnacles API services including additional parameters Notice: in one subfolder _ApiBF can be placed common files (libraries) used both with program _ApiBF.EXE and with program _ApiPS.EXE c) _AT data files for Analysis of texts - names of states, competitions, teams (can be updated with download from webpage www.betoptim.com see frm_update_at) registry key for Analysis of text AT?????X.TXT d) DOC._ApiPS documentation (this file *.PDF with description of programs) e) DATA storage of Authorization string (into file _Authorization.txt) default directory for storage of downloaded data files Subdirectories for DEMOversions : a) VisualBasic_BeFa_DEMO b) VisualCsharp_BeFa_DEMO These examples of usage are identical in programming languages C#/VB : to get versions number of program _ApiPS.EXE use of program _ApiPS_aut.EXE for obtaining of Authorization string single services Pinnacle API for obtaining of current offer Pinnacle Sports use of program _ApiPS.EXE for retrieving of original services Pinnacle API, obtaining of response, processing of response from XML/JSON to CSV structure retrieving of combined services sequence of original services with using of text filters (simple "wildcards" for name of league, of period, of markets) or with using AT (Analysis of texts detection of league/team name in steps state, league, team) Faster (for obtaining of prices) are combined operations demonstrated in Windows Forms Applications (Visual C#/Basic). 3

2. AUTHORIZATION string Head of request for calling API services Pinnacle Sports contains Authorization string. There are several ways how to get this string. 2.1. Batch for getting of Authorization string After installation is : 1) in subfolder _ApiBF auxiliary program _ApiPS_aut.EXE 2) in subfolder _BAT.ApiPS batch file _ApiPSaut1.BAT into parameter "username=my_username&password=my_password" has to be placed username and password of users account at Pinnacle Sports This batch file launches program _ApiPS_aut.EXE. Result is written to text file _Authorization.txt in subfolder DATA. Program _ApiPS.EXE can read Authorization string from this file (value of second parameter RA). 2.2. Auxiliary program _ApiPS_aut.EXE Launching of program _ApiPS.EXE : _ApiPS_aut.EXE "username=my_username&password=my_password" DATA\_Authorization.txt 1st parameter - username and password of users account at Pinnacle Sports 2nd parameter - specification of target file for authorization string. Absolute or relative path (from program directory f.e. D:\_Api_Install, one level above subfolder of program _ApiPS_aut.EXE - for default installation D:\_Api_Install\_ApiBF\_ApiPS_aut.EXE ). 2.3. Getting of Authorization string in program code - see Windows Forms Applications (Visual C#/Basic) including source code - function FuncAuthorization in module "mod_dataroutines.vb" / "mod_dataroutines.cs" 4

3. BASIC PROGRAM _ApiPS.EXE This program retrieves : a) concrete original API services of Pinnacle Sports b) additional combined operations (sequential callings of 2 API services Pinnacle, joining of results into 1 output file with CSV structure) - see frmget_leaguesevents, frmget_leagueseventsprices Output text file (response) of operations can be : a) XML/JSON original structure of response of API service b) CSV "comma separated values" For output structure CSV can be used additional parameters for filtering of output a) AT (Analysis of texts detection of state in first step and detection of league in second step - based on code of state and name of league) b) using of text filters (simple "wildcards" for name of league, of period, of markets) After getting of response of original Pinnacles service are applied Additional parameters for filtering and into output file are included only matching items. For combined operations are additional parameters for filtering used between simple operations this reduces number of downloads and increases speed of response. Program _ApiPS.EXE returns exit-code 0 (success) or <>0 (error). Error codes see Appendix A. One of parameters is specification of text file for output this file contains data (in case of success) or error message (in case of error). 3.1. Testing of program _ApiPS.EXE in "Command Line" window Retrieving of program _ApiPS.EXE with parameters can be saved in program batch *.BAT Simply example for retrieving of program _ApiPS.EXE is usage with parameter --VERSION - it returns string with current versions number of this program - see batch file _ApiPS_VER.bat in subdirectory _BAT.ApiPS Batch files can be retrieved from subdirectory of installing(program) directory - f.e. D:/_Api_Install/_BAT.ApiPS Another way is retrieving of program _ApiPS.EXE in "Command Line" with parameter : - f.e. D:/_Api_Install/_ApiBF/_ApiPS.EXE --VERSION Result of operation : a) "small" ( f.e. programs version number / error message ) - is displayed in row below the command for program _ApiPS.EXE b) "big" ( f.e. result of download) - displayed is only "error code" => to read content of output file 5

3.2. Windows Forms Applications ( in Visual C# / Visual Basic ) - see source code in subdirectories of installation(program) directory : For VisualBasic : D:/_Api_Install/VisualBasic_Pina_DEMO For Visual C# : D:/_Api_Install/VisualCsharp_Pina_DEMO This applications contain horizontal menu with columns : a) Pinnacle Login / Pinnacle Logout using of form frmloginpina for getting of Username and Password (for preparation of Authorization string with function FuncAuthorization in module mod_dataroutines) b) Operations Get????? - original API services of Pinnacle Sports + additional combined operations (frmget_leaguesevents, frmget_leagueseventsprices) c) Analysis of Texts - frmstates (identification of state) - frmleagues (identification of league/competition) - frmteams (identification of team) - frmotherbookie (Complete DEMO Download of Pinnacles Odds with using "Analysis of Texts" - for matching Pinnacle versus offer of other bookie see 4.3. ) d) Help - Update Files Analysis of Texts Principle of forms b), c) is : - 1 item of menu = 1 windows form = 1 operation API of Pinnacle / program _ApiPS - component NumericUpDownEXAMPLE allows cycling between examples Up/Down - every example is 1 combination of entry parameters (filled into fields) - clicking button "Download" starts operation - processing of entry parameters can be checked in routine butdownload_click - results of operation are displayed in component TextBox txtresult and saved in textfile with specification see TextBox txtspecoutput. User can test another "own" combinations of parameters and check results after clicking button "Download". 1-3 Radiobuttons are used for option of structure of output file : XML/JSON structure - preparation of parameters for Pinnacles API service - direct retrieving of API service CSV structure CSV - can be used additional parameters for filtering of output a) _AT (Analysis of texts detection of league based on detection of state in first step) b) using of text filters (simple "wildcards" for name of league, of period, of markets) 3.3. Usage of program _ApiPS.EXE in users program in other languages Program _ApiPS.EXE can be retrieved in other languages than Visual C# and Visual Basic entry parameters and exit codes (+ output files) are the same. 6

3.4. Entry parameters of program _ApiPS.EXE : 1) BASIC parameters of program _ApiPS.EXE for original services of Pinnacle: Parameter#1 = OPERATION (no distinction between lower/upper characters) --GetClientBalance / --GetCurrencies / --GetSports / --GetLeagues / --GetFeed Parameter#2 = Authorization string a) concrete string based on username and password of users account Pinnacle (getting with function of Microsoft Convert.ToBase64String or with program _ApiPS_aut.EXE or with function FuncAuthorization see source code) - see chapter 2. Authorization string b) value RA ("Read file _Authorization.txt") - Authorization string was stored in file DATA/_Authorization.txt - program _ApiPS can read Authorization string from this file Parameter#3 = URL address including original parameters of Pinnacle API service see chapter 4.1., 3.5. - concrete operations / services Parameter#4 = structure of output file CSV_ + additional parameters a) value CSV_ => CSV structure with quotation marks b) value CSV_qn => CSV structure without quotation marks (see Appendix B) c) value CSV_ par1=??? par2=???... d) value CSV_qn par1=??? par2=???... Parameter#5 = Specification of Output File a) default storage is in subdirectory DATA default extension is *.CSV_ default FileName is given by Parameter#1 (Operation) f.e. DATA/GetSports.CSV_ for --GetSports b) Relative PATH/filename.ext (from installation directory) f.e. DATA/GetSports.CSV_ c) Absolute Specification!!! DIRECTORY FOR OUTPUT FILE HAS TO EXIST (before retrieving of _ApiPS)!!! Comment Additional parameters: For operations --GetLeagues, --GetFeed can be used additional parameters (simple wildcards "*", Analysis of texts) for filtering of leagues, period, markets - see next paragraph 3.5. 2) ADDITIONAL Operations for Pinnacles API : Additional COMBINED OPERATIONS ( only Output structure *.CSV ) : frmget_leaguesevents - INFO: asked Leagues + their next Events Calling #1 Operation --GetLeagues - to get list of IDs for asked leagues ( 1 sport ) Calling #2 Operation --GetFeed - to get info about events(matches) RETURNS: text file in CSV structure - Leagues & Events & Teams frmget_leagueseventsprices - INFO: asked Leagues + next Events & Prices Calling #1 Operation --GetLeagues - to get list of IDs for asked leagues ( 1 sport ) Calling #2 Operation --GetFeed - to get info about events(matches) and prices for selected markets RETURNS: text file in CSV structure - Leagues & Events & Teams & Prices 7

3.5. Standard parameters of Pinnacles API : 1) sportid={sportid} --GetLeagues, --GetFeed, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#3 = URL address 2) leagueid={string} --GetFeed Program _ApiPS.EXE : -> Parameter#3 = URL address 3) oddsformat={feed_odds_format_type} --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : NOT USED 4) islive={0/1} --GetFeed, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#3 = URL address 5) currencycode={string} --GetFeed, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#3 = URL address 6) last={long} --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#3 = URL address 3.6. Additional parameters of _ApiPS.EXE for Pinnacles API : 1) sort={id/name} = sorting of sports, leagues by ID or NAME --GetSports, --GetLeagues Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 2) onlyinfeed={y/n} Y => process only leagues in feed / sports with league(s) in feed --GetSports, --GetLeagues, Get_LeaguesEvents Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 3) only1row={y/n} Y => returns only 1 string with leagues IDs NNN-NNN- -NNN for parameter leagueid of following operation GetFeed --GetLeagues Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 4) onlyevents={y/n} Y => returns only info about leagues and events (without prices) --GetFeed Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 5) from={} to={} limitation of startdatetime of event(match) with GMT time FORMAT YYYY-MM-DDTHH:MM:SS or Decimal number (hours from NOW) --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 6) oddsformat={american/decimal} => format of prices --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters 7) listleagues={string} => info about leagues Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#4 = CSV_ additional parameters Notice: {string} can be prepared with function mod_dataroutines.func_sportid_leagueids 8

8) competitionname --GetLeagues, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#6 = Additional Parameters for Filtering see chapter 3.7., Appendix C 9) periodname --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#6 = Additional Parameters for Filtering see chapter 3.7., Appendix C 10) marketname --GetFeed, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#6 = Additional Parameters for Filtering see chapter 3.7., Appendix C 11) Filter_AT --GetLeagues, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#6 = Additional Parameters for Filtering see chapter 3.8., Appendix C 12) prio --GetLeagues, Get_LeaguesEvents, Get_LeaguesEventsPrices Program _ApiPS.EXE : -> Parameter#6 = Additional Parameters for Filtering see chapter 3.8., Appendix C 9

3.7. Additional Filtering of Leagues, Periods, Markets wildcards "*" Volume of returned data can be decreased to asked leagues / periods / markets with filtering (based on names): Filtering string for NAME (of league / period / market ): entry text fields in forms of demoversion (Windows Form Application VB / C#) how to place filtering strings into Parameter #6 (see Appendix C) characters(lefts) + "*" (right) => NAME HAS TO START with this characters(lefts) "*" (left) + characters(right) => NAME HAS TO END with characters(right) "*" (left) + "characters" + "*" (right) => NAME HAS CONTAIN STRING "characters" (anywhere) No characters "*" in filtering string => NAME HAS BE EQUAL to filtering string Filtering is NOT "case sensitive" Examples : 1) For NAME OF LEAGUE filtering string "Premier*" MATCHING League with name "PREMIER league" Yes League with name "Barclays Premier league" No 2) For NAME OF PERIOD filtering string "MATCH *GAME*" MATCHING Period name "Match" Yes Event name "1ST HALF" No 3) For NAME OF MARKET filtering string "TOTAL* MONEYLINE" MATCHING Market name "TOTAL" Yes Market name "SPREAD" No Filtering strings WITH MORE SECTIONS : Separator of sections is character " " (Alt 124) Evaluation corresponds to LOGICAL OR - if 1 (any) section is matching => OK If SECTION STARTS WITH NOT and this condition is matched => Result is NOT OK 4) For NAME OF LEAGUE filtering string " *BUNDESLIGA* NOT*WOMEN* NOT*U1* " MATCHING League name "Bundesliga" Yes League name "Bundesliga 2" Yes League name "Bundesliga Women" No League name "Bundesliga U19" No Filtering strings (simply wildcards "*") can be used in following operations : ORIGINAL API services COMBINED operations _ApiPS.EXE a) --GetLeagues c) Get_LeagueEvents for League Name for League Name + Filter_AT + Priority + Filter_AT + Priority b) --GetFeed d) Get_LeagueEventsPrices for Period Name for League Name for Market Name for Period Name for Market Name + Filter_AT + Priority 3.8. Additional Filtering of Competitions(Leagues) _AT Analysis of texts Another way for filtering of competitions/leagues is _AT Analysis of texts. For 2 sports ( Football and Ice Hockey ) and (at betting) most used competitions (leagues, cups, championships...) are defined rules for their distinguishing (based on info about sport country name of competition). 10

The same rules for distinguishing of leagues (and teams) are used : 1) in programs _ApiPS.EXE (Pinnacle) and _ApiBF.EXE (Betfair) 2) in program Bet_Info.EXE (uses for data storage database PostgreSQL) 3) in DLL_AnalTextStaSpo.dll can be added to users program in programming languages Visual Basic, Visual C#, C++,... (every language that uses DLL libraries) Output from distinguishing are 3 ABBREVIATIONS : 1) STATE 3 chars in system ALPHA (ISO 3166-1 alpha-3) used by Betfair and also EUR / AFR / ASI / AME for continental competitions WOR (world) for competitions without connection with 1 country (incl. friendlies) 2) TYPE&LEVEL of competition max. 5 chars (1.L / 2.L / 3.L /... / CUP / CHxxx...) Full length of abbreviation 5 chars can distinguish f.e. in England CUPfa = England FA Cup, CUPca = England Capital One Cup,... 3) PARTICIPANTS (M=men, W=women, 2nd+3th character UnderNN...) W20 (for World Championship Women Under 20), M19 (for European Championship Men Under 19) Another returned information about Competition is PRIORITY (5=Maximal,...1=Minimal). For filtering can be used parameter Prio>=N f.e. for condition Prio>=4 are competitions with priority 1,2,3 ignored 3 ABBREVIATIONS for Competition + its Priority (1..5) - are returned with operations : a) --GetLeagues b) Get_LeaguesEvents c) Get_LeaguesEventsPrices - are returned if filtering string for _AT is not empty value; value of string has to be at least "FOO *,*,*" or "HOC *,*,*" (1 sport, no filtering) - for operation GetFeed (second operation in Get_LeaguesEvents, Get_LeaguesEventsPrices has to be passed parameter listleagues=~...~ with detailed info about leagues names, 3 abbreviations, priority...) - are returned in last 4 parameters in a row of league in CSV-files ("LEAGUE";...) see structure of output files CSV in Appendix D, E The same parameters ( 3 abbreviations + priority 1..5 ) are returned by library DLL_AnalTextStaSpo.dll (for including into programs in VB, C#,...) - as result of Analysis of texts based on info: a) sport (only FOO=football, HOC=Ice hockey) b) text name of state c) text name of competition This is typical description of competition (league) in offers of bookies. Library DLL_AnalTextStaSpo.dll can be used for matching of offers of other bookies with offer of Pinnacle (both competitions and teams => matches) can be tested in demoversions Windows Forms Applications for VB and C# - forms in column of menu "Analysis of Texts" frmstates, frmleagues, frmteams, frmotherbookie) Info about 3 abbreviations + priorities of ALL CURRENT competitions in Pinnacles offer can be retrieved : with operation GetLeagues with next values of parameter #6 : "FOO *,*,*" - for sport = Football/Soccer "HOC *,*,*" - for sport = Ice Hockey In returned CSV-file are only competitions/leagues (included in definition files of "Analysis of texts" and library DLL_AnalTextStaSpo.dll) - most used competitions, leagues, cups, championships... With "checked" option "only Leagues in FeedContent" is output reduced (only soccer or ice hockey leagues in current offer of Pinnacle Sports). 11

4. USAGE of PROGRAM _ApiPS.EXE - Examples Following commands can be retrieved : a) in "Command Line" window see chapter 3.1. Testing of program _ApiPS.EXE b) in Windows Form Applications see chapter 3.2 (VB, C#) c) in other programming languages As second parameter in calling of program _ApiPS can be passsed : a) RA (=> read Authorization string from text file DATA\_Authorization.txt) b) direct Authorization string 4.1. Original API operations of Pinnacle 1) API operation "GetClientBalance" - this operation returns info about balance of players account at Pinnacle sports Examples of command for retrieving : " _ApiPS --GetClientBalance RA "https://api.pinnaclesports.com/v1/client/balance" - default structure CSV (with ""), default output DATA/GetClientBalance.csv ApiPS --GetClientBalance RA "https://api.pinnaclesports.com/v1/client/balance" CSV_qn - structure CSV_ (without ""), default output DATA/GetClientBalance.csv ApiPS --GetClientBalance RA "https://api.pinnaclesports.com/v1/client/balance" " " DATA/GetClientBalanceMY.csv_ - default structure CSV (with ""), rel.path for output file GetClientBalanceMY.csv ApiPS --GetClientBalance RA "https://api.pinnaclesports.com/v1/client/balance" "CSV_qn" D:/GetClientBalanceMY.csv_ - structure CSV_(without ""), absolute path for output file GetClientBalanceMY.csv_!!! DIRECTORY FOR OUTPUT FILE HAS TO EXIST!!! 2) Api-NG operation "GetCurrencies" - this operation returns list of currencies (for players accounts at Pinnacle) Examples of command for retrieving : _ApiPS --GetCurrencies RA "https://api.pinnaclesports.com/v1/currencies" - default structure CSV (with ""), default output DATA/GetCurrencies.csv ApiPS --GetCurrencies RA "https://api.pinnaclesports.com/v1/currencies" "CSV_qn" - structure CSV_ (without ""), default output DATA/GetCurrencies.csv ApiPS --GetCurrencies RA "https://api.pinnaclesports.com/v1/currencies" " " DATA/GetCurrenciesMY.csv_ - default structure CSV (with ""), rel.path for output file GetCurrenciesMY.csv ApiPS --GetCurrencies RA "https://api.pinnaclesports.com/v1/currencies" "CSV_qn" D:/GetCurrenciesMY.csv_ - structure CSV_(without ""), absolute path for output file listcountriesmy.csv_ DIRECTORY FOR OUTPUT FILE HAS TO EXIST!!! 12

3) Api-NG operation "GetSports" - this operation returns list of sports with info "whether they currently have lines or not" (in current offer of Pinnacle Sports) Examples of command for retrieving : _ApiPS --GetSports RA "https://api.pinnaclesports.com/v1/sports" - default structure CSV (with ""), default output DATA/GetSports.csv ApiPS --GetSports RA "https://api.pinnaclesports.com/v1/sports" "CSV_qn" - structure CSV_ (without ""), default output DATA/GetSports.csv ApiPS --GetSports RA "https://api.pinnaclesports.com/v1/sports" " " DATA/GetSportsMY.csv_ - default structure CSV (with ""), rel.path for output file DATA/GetSportsMY.csv ApiPS --GetSports RA "https://api.pinnaclesports.com/v1/sports" "CSV_qn" D:/GetSportsMY.csv_ - structure CSV_(without ""), absolute path for output file GetSportsMY.csv ApiPS --GetSports RA "https://api.pinnaclesports.com/v1/sports" "CSV_qn onlyinfeed=y " D:/GetSportsMY.csv_ - structure CSV_(without ""), only sports with league(s) in feed!!! DIRECTORY FOR OUTPUT FILE HAS TO EXIST!!! 4) Api-NG operation "GetLeagues" - this operation returns list of leagues for selected sport with info "whether they currently have lines or not" (in current offer of Pinnacle Sports) Examples of command for retrieving : _ApiPS --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" - default structure CSV (with ""), 29=soccer, default output DATA/GetLeagues.csv ApiPS --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=19" "CSV_qn" - structure CSV_ (without ""), 19=ice hockey, default output DATA/GetLeagues.csv ApiPS --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" " " DATA/GetLeaguesMY.csv_ - default structure CSV (with ""), rel.path for output file DATA/GetLeaguesMY.csv ApiPS --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" "CSV_qn" D:/GetLeaguesMY.csv_ - structure CSV_(without ""), absolute path for output file GetLeaguesMY.csv ApiPS --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=33" "CSV_ onlyinfeed=y " D:/GetLeaguesMY.csv_ - structure CSV_, 33=Tennis, only leagues in feed!!! DIRECTORY FOR OUTPUT FILE HAS TO EXIST!!! For filtering of Competitions names can be used (in this operation) both simple wildcard "*" and _AT (Analysis of text)- place to parameter #6 see Appendix C. 13

5) Api-NG operation "GetFeed" - this operation returns current lines (offer of Pinnacle Sports) Examples of command for retrieving : _ApiPS --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" - default structure CSV (with ""), 29=soccer, default output DATA/GetFeed.csv ApiPS --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=19" "CSV_qn" - structure CSV_ (without ""), 19=ice hockey, default output DATA/GetFeed.csv ApiPS --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" " " DATA/GetFeedMY.csv_ - default structure CSV (with ""), relative path for output file DATA/GetFeedMY.csv ApiPS --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn" D:/GetFeedMY.csv_ - structure CSV_(without ""), 29=soccer, absolute path for output _ApiPS --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29&leagueid=1842-1980" "CSV_qn oddsformat=decimal from=0 to=7x24 " D:/GetFeedMY.csv_ - 1842=ENG PremierLeague, 1980=Bundesliga, from=0 (from NOW), to=7x24 (next 7 days) oddsformat=decimal!!! DIRECTORY FOR OUTPUT FILE HAS TO EXIST!!! 4.2. Combined operations of program _ApiPS.EXE Simple API operations of Pinnacle can be combined. Result of first operation is processed and used for parameters setting of second operation. See examples in Demo: Windows Forms Applications (Visual Basic, C#), chapter???. 1) Form frmget_leagueevents getting of events(matches) for asked leagues FIRST OPERATION : --GetLeagues Number of leagues in response can be reduced with standard parameter &islive=1 (only offer Inplay) and additional parameter onlyinfeed=y. Another ways for selection of leagues are : a) "Filter for League Name" see chapter 3.7. b) Filter_AT ("Analysis of Texts") + Priority>=? see chapter 3.8.. Returned string of first operation (stleaguescsvback) is entry value for function mod_dataroutines.func_sportid_leagueids(...). This function prepares for second operation value of parameter listleagues=~...~ - codes of leagues for parameter of second operation --GetFeed (leagueid) + detailed information about leagues for including into final output. SECOND OPERATION : --GetFeed Parameter onlyevents=y suppresses processing of info about prices in response => final result contains only info about leagues and events(matches). Number of events(matches) can be reduced with parameters from=??? to=???. Value for this parameters can be GMT time of start a) in format YYYY-MM-DDTHH:MM:SS or b) Decimal number = hours from NOW (or in symbolic expression f.e. "7x24" = 7 days) 14

2) Form frmget_leagueeventsprices getting of odds for asked leagues FIRST OPERATION : --GetLeagues Number of leagues in response can be reduced with standard parameter &islive=1 (only offer Inplay) and with parameter onlyinfeed=y (automatically). Another ways for selection of leagues are : a) "Filter for League Name" see chapter 3.7. b) Filter_AT ("Analysis of Texts") + Priority>=? see chapter 3.8.. Returned string of first operation (stleaguescsvback) is entry value for function mod_dataroutines.func_sportid_leagueids(...). This function prepares for second operation value of parameter listleagues=~...~ - codes of leagues for parameter of second operation --GetFeed (leagueid) + detailed information about leagues for including into final output. SECOND OPERATION : --GetFeed Number of events(matches) can be reduced with parameters from=??? to=???. Value for this parameters can be GMT time of start a) in format YYYY-MM-DDTHH:MM:SS or b) Decimal number = hours from NOW (or in symbolic expression f.e. "7x24" = 7 days) Number of odds(markets) can be reduced with : a) "Filter for Period" Empty=ALL or only selected values Match/Game/1st half/1st set (f.e. "Match 1st half") b) "Filter for MarketName" Empty=ALL or only selected values Moneyline/Spread/Total Content of output can be affected with parameters a) from=??? to=??? - number of events(matches) in output CSV-file b) oddsformat=??? - format of prices AMERICAN (default) or DECIMAL c) currencycode=??? - currency for values of "MaxBetAmounts" In standard parameter &last=???????? can be passed timestamp (of last download). 4.3. Complete DEMO Download of Pinnacles Odds for requested matches with using "Analysis of Texts" ( for matching with offer of other bookie ) Demoversions (Windows Applications in Visual Basic and Visual C# including source codes) contain form "frmotherbookie"; this form should demonstrate : CONNECTION OF DOWNLOADS OF ODDS FROM DIFFERENT SOURCES AND MATCHING OF CORRES- PONDING MATCHES, BETTYPES AND PRICES FOR PROCESSING OF VALUE BETS, SURE BETS Download of prices (of other bookie) is simulated in this example BY : TEXT FILE in subdirectory of installation folder DATA \ _LeaguesMatchesWEEK.TXT this file contains fixtures of several competitions in next weeks user can edit content of this file (correct current matches, teams for Premier league, Bundesliga or add interesting leagues) for testing of next steps demoversion downloads in next steps current offer (matches, odds, ) of Pinnacle (with API operations); success of matching is determined by currency of matches in text file _LeaguesMatchesWEEK.TXT 15

Example of content of text file _LeaguesMatchesWEEK.TXT (section for 1 league): COMP:FOO;England;Premier League;BWIN;01.-03.Nov 2014 Newcastle United;FC Liverpool; FC Everton;Swansea City; FC Arsenal;Burnley; Hull City;Southampton FC; FC Chelsea;Queens Park Rangers; Leicester City;West Bromwich Albion; Stoke City;West Ham United; Manchester City;Manchester Utd; Aston Villa;Tottenham Hotspur; Crystal Palace;Sunderland; First row describes COMPetition (FOO=Football, State=England, Name=Premier League). Remaining data-items are only for information (displayed in list of competitions for selection in combobox). Next rows should contain matches(names of teams) played in next hours, days. STEP #1 CHOICE of COMPETITION (LEAGUE) of OTHER BOOKIE In left upper corner is specification of Input text file and combobox for choice of competition in offer are competitions from text file (rows COMP:... ) : For selected competition are displayed : - content of row COMP in collapsed combobox - matches (following rows in text file) - in left box for matches STEP #2 LOOKING UP of COMPETITION (LEAGUE) in PINNACLEs current offer After mouse click (button "Search Competition") are displayed parameters of found competition (in system for "Analysis of texts" - abbreviations for state, league + description of competition/league). Text field below contains ID of found competition/league in Pinnacles database. Button "Search Competition" is after this step passivated. 16

STEP #3 MATCHING of EVENTS (MATCHES) in PINNACLEs current offer After mouse click (button "Search Matches") are displayed (for matches and teams in left blue box - from text file=from offer of other bookie) in the right green box "RESULTS MATCHES (Pinnacle)" corresponding events(matches) from current Pinnacles offer. In parenthesis are abbreviations of both teams. 17

Text fields in the right contain ID of events/matches in Pinnacles database (for matching in output file from step #4). Button "Search Matches" is after this step passivated. STEP #4 DOWNLOAD OF ODDS with Pinnacles API operation --GetFeed With empty fields for Filters (Period, MarketName) is download "full". How to filter odds see chapter 3.7. Two comboboxes can affect format of prices and currency of values "MaxBetAmounts". Checkbox "with Quotes" is option "whether to write values with quotation marks or not". Download starts with button "Search Bets". Result is written to text file *.CSV_ (structure see Appendix E), his content is displayed in form(window) for results. COMMENT : This procedure is DEMO in source code of windows application (Visual Basic / C#, in form frmotherbookie.vb / *.VC) are for concrete steps detailed commands. Real users application can execute downloads of prices without dividing into separated steps, procedure (matching with "Analysis of texts" with library DLL) can be repeated for different bookies. 18

5. Auxiliary program_apips_aut.exe, library DLL_AnalTextStaSpo.DLL 5.1. Program _ApiPS_aut.EXE getting of Authorization string This program can be used for getting of Authorization string for Pinnacles API services for examples of using _ApiPS.EXE (batch files and tests in command line). After installation is : 1) in subfolder _ApiPS auxiliary program _ApiPS_aut.EXE 2) in subfolder _BAT.ApiPS batch file _ApiPSaut1.BAT into parameter "username=my_username&password=my_password" has to be placed username and password of users account at Pinnacle Sports This batch file launches program _ApiPS_aut.EXE. Result is written to text file _Authorization.txt in subfolder DATA. Program _ApiPS.EXE can read authorization string from this file (value of second parameter RA). Parameters of program _ApiPS_aut.EXE Launching of program _ApiPS.EXE : _ApiPS_aut.EXE "username=my_username&password=my_password" DATA\_Authorization.txt 1st parameter - username and password of users account at Pinnacle Sports 2nd parameter - specification of target file for authorization string. Absolute or relative path (from program directory f.e. D:\_Api_Install, one level above subfolder of program _ApiPS_aut.EXE - for default installation D:\_Api_Install\_ApiBF\_ApiPS_aut.EXE ). 5.2. Library DLL_AnalTextStaSpo.dll - support for Analysis of texts clanaltextstate Class for States, basic variables, routines clanaltextsport Class for 1 Sport (his leagues, teams) 1) Info about versions number, STATIC functions : clanaltextstate.stversion (value f.e. "1.2.05") Function FuncEnText3toSPO(ByVal st_cod_spo3 As String) As ensporttyp parameter#1 = abbreviation of sport (3 characters) "FOO" / "HOC" RETURNS : value ensporttyp.ensportfoo / ensporttyp.ensporthoc Function FuncEnSPOtoText3(ByVal en_sport As ensporttyp) As String parameter#1 = value ensporttyp.ensportfoo / ensporttyp.ensporthoc RETURNS : abbreviation of sport (3 characters) "FOO" / "HOC" Dim ensport As DLL_AnalTextStaSpo.clAnalTextState.enSportTyp ensport = clanaltextstate.funcentext3tospo("foo") return value ensporttyp.ensportfoo stsport3 = clanaltextstate.funcenspototext3(ensport) return value "FOO" 2) How to get instances of classes : Dim enenglish As DLL_AnalTextStaSpo.clAnalTextState.enLanguageTyp = _ clanaltextstate.enlanguagetyp.enlanguageen Dim enfootball As DLL_AnalTextStaSpo.clAnalTextState.enSportTyp = _ clanaltextstate.ensporttyp.ensportfoo 19

Dim clanaltextstatemy As DLL_AnalTextStaSpo.clAnalTextState = _ New DLL_AnalTextStaSpo.clAnalTextState(enEnglish, stdirectoryat) Dim clanaltextsportfoo As DLL_AnalTextStaSpo.clAnalTextSport = _ New DLL_AnalTextStaSpo.clAnalTextSport(enFootball,clAnalTextStateMY) 3) How to Init classes (reading of data files Names States, Leagues, Teams) : Dim sterrmsgback As String = "", book As Boolean = True clanaltextstatemy.funcinitreadnames_states(sterrmsgback) If sterrmsgback <> "" Then MessageBox.Show("ERROR: Unsuccessful reading of file NAMES of STATES & vbcrlf & _ "( " & sterrmsgback & " )", "Error reading NAMES of STATES ", MessageBoxButtons.OK, MessageBoxIcon.Error) End If clanaltextsportfoo.funcininames_leaguesteams(false, sterrmsgback) If sterrmsgback <> "" Then book = False MessageBox.Show("ERROR: Unsuccessful Init Names - Football" & vbcrlf & _ "( " & sterrmsgback & " )", "Error reading Init Names (Leagues & Teams) ", MessageBoxButtons.OK, MessageBoxIcon.Error) End If 4) DYNAMIC Variables, Functions of Class clanaltextstate : Current language (of strings with description of State, League, Teams) clanaltextstatemy.enlanguagecurr As enlanguagetyp ( enlanguageen / enlanguagede / enlanguagecz / enlanguagexxx ) Directory of files for Analysis of texts stdirectoryat = clanaltextstatemy.stdirectoryat SEARCH of STATE - FOR CODE of State 3 chars RETURNS NAME OF STATE(in current language) Function FuncCodeSta3_ToStateDscr(ByVal stcod_sta3 As String, ByRef ststatedscr_back As String) As Boolean parameter#1 = code of state (Alpha 3) f.e. "ESP" parameter#2 = RETURN VALUE for state : Name of state in current language (f.e. Spain / Spanien / Spanelsko) RETURNS : value False/True (found?) SEARCH of STATE FOR TEXT(name) OF STATE ( code of region is OPTIONAL ) Function FuncSearchState(ByVal stcod_reg3 As String, ByVal ststate_text As String, ByRef stcod_sta3_back As String, ByRef ststatedscr_back As String) As Boolean parameter#1 = "" OR code of region(continent) ("EUR"/"AFR"/"ASI"/"AME") parameter#2 = TEXT FOR SEARCH of STATE parameter#3 = RETURN VALUE for State : Abbreviation 3 chars (Alpha 3) parameter#4 = RETURN VALUE for State : Name of state in current language RETURNS : value False/True (found?) Examples: see demoversion (Windows Forms Application VB/C#) - form frmstates 5) DYNAMIC Functions of Class clanaltextsport : SEARCH of LEAGUE FOR CODE of STATE (3 chars Alpha) + TEXT(name) OF LEAGUE ( code of League 5 chars only for known league getting of its parameters ) Function FuncSearchLeague(ByVal stcod_sta3 As String, ByVal stcod_lea5 As String, ByVal stleag_text As String, ByRef stleagdscr_back As String, ByRef stcod_wom3_back As String, ByRef stcod_csnprio_back As String) As String parameter#1 = "" OR code of state (from FuncSearchState 3 chars Alpha) parameter#2 = "" OR max. 5 chars f.e. "1.L"/"CUP"/"CH" (optional) parameter#3 = "" OR TEXT FOR SEARCH of LEAGUE parameter#4 = RETURN VALUE for League : Name of League in current language parameter#5 = RETURN VALUE for League : Code max. 3 chars (Men, Women, UnderNN) parameter#6 = RETURN VALUE for League : Code C(clubs)/S(states)/N(participants not defined + Priority 1 char "1".."5", maximal "5") RETURNS : string "State3,Leag5" f.e. "ENG,1.L" is return value for search text "England Premier League" 20

Examples: see demoversion (Windows Forms Application VB/C#) - form frmleagues Dim stleagdscrback As String = "", stcodewom3back As String = "" Dim stcodecsnprioback As String = "", ststate3league5 As String = "" ststate3league5 = clanaltextsportfoo.funcsearchleague("eng", "", "Championship", stleagdscrback, stcodewom3back, stcodecsnprioback) RETURNS : ststate3league5="eng,2.l", stleagdscrback="championship", stcodewom3back = "M", stcodecsnprioback = "c4" ststate3league5 = clanaltextsportfoo.funcsearchleague("eng", "3.L", "", stleagdscrback, stcodewom3back, stcodecsnprioback) RETURNS : ststate3league5="eng,3.l", stleagdscrback="league One", stcodewom3back = "M", stcodecsnprioback = "c3" ststate3league5 = clanaltextsportfoo.funcsearchleague("","","champions League UEFA", stleagdscrback, stcodewom3back, stcodecsnprioback) RETURNS : ststate3league5="eur,cupcz", stleagdscrback="uefa - Champions League", stcodewom3back = "M", stcodecsnprioback = "c5" Comments: - the same parameters for league/competition (f.e. "ENG,2.L,M") returns program _ApiPS (for Pinnacle) in additional operations in row for competition ("COMP" see Appendix D,E) - the same parameters returns also program _ApiBF (for Betfair) - the more correct values in parameters #1, #2 and #3, the better response of function - it is way how to search for league from users program a corresponding competition in current Pinnacles API competitions or how to get for different names of leagues (+states) in offers of different bookies => 1 league with the same identifiers (3+5 chars) SEARCH of TEAM FOR CODE of STATE (3 chars Alpha) + CODE of LEAGUE (3-5 chars) + TEXT Function FuncSearchTeam(ByVal stcod_sta3 As String, ByVal stcod_lea5 As String, ByVal stcod_wom3 As String, ByVal stteam_text As String, ByRef stteamdscr_back As String, ByRef stcod_sta3lea5_back As String) As String parameter#1 = "" OR code of state (from FuncSearchState 3 chars Alpha) parameter#2 = "" (max. 5 chars f.e. "1.L"/"CUP" optional from FuncSearchLeague) parameter#3 = "M" OR "W" OR... ("" = "M") parameter#4 = "" OR TEXT FOR SEARCH of TEAM parameter#5 = RETURN VALUE for Team : Name of Team (from DLL_AnalTextStaSpo.dll) parameter#6 = RETURN VALUE for Team : parameters of League RETURNS : abbreviation 5 characters identifier of Team (non-duplicate) Examples: see demoversion (Windows Forms Application VB/C#) - form frmteams Dim stteam5 As String, stteamdscrback As String="", stcodesta3lea5back As String="" stteam5 = clanaltextsportfoo.funcsearchteam("", "2.L", "", "Liverpool", stteamdscrback, stcodesta3lea5back) RETURNS : stteam5 = "LIVER" stteamdscrback="liverpool FC", stcodesta3lea5back = "ENG,1.L" stteam5 = clanaltextsportfoo.funcsearchteam("eur", "CUP", "", "Maribor", stteamdscrback, stcodesta3lea5back) RETURNS : stteam5 = "MARNK" stteamdscrback="maribor NK", stcodesta3lea5back = "SVN,1.L" stteam5 = clanaltextsportfoo.funcsearchteam("ita", "2.L", "", "Bergamo", stteamdscrback, stcodesta3lea5back) RETURNS : stteam5 = "BEATA" stteamdscrback="atalanta Bergamo", stcodesta3lea5back = "ITA,1.L" stteam5 = clanaltextsportfoo.funcsearchteam("ita", "3.L", "", "Atalanta", stteamdscrback, stcodesta3lea5back) RETURNS : stteam5 = "BEATA" stteamdscrback="atalanta Bergamo", stcodesta3lea5back = "ITA,1.L" 21

Comments: - the same identifiers for teams (f.e. "LIVER", "MARNK", "BEATA") returns program _ApiBF in combined operations in row for event=match ("EVEN") - teams Home & Away - the more correct values in parameters #1, #2, #3 and #4, the better response of function, but see first example for Liverpool + missing state "ENG" and incorrect league "2.L" (or Atalanta Bergamo in "2.L"/"3.L") is response correct - it is way how to search for match from users program a corresponding event(=match) in current Pinnacles API events or how to get for different names of 1 team in offers of different bookies the same identifier (5 chars) 6. Download, Update, Upgrade, Contact www.betoptim.com/en - WEBPAGE http://www.betoptim.com/index.aspx?lang=en&start=downinst - INSTALLATION service@betoptim.com - EMAIL 6.1. Update of files for Analysis of texts, of DLL_AnalTextStaSpo.dll Functionality of "Analysis of Texts" is based on data files (for "Names of States", "Names of Leagues" and "Names of Teams" + helping file for Correction of names Leagues/Competitions Pinnacle). Demoversions (Windows Applications in Visual Basic and Visual C# including source codes) contain form "frm_update_at" for update of this files see column Help of this applications current versions of this files are placed in webpage www.betoptim.com downloaded file is stored on users PC with date&time of internet version higher date&time current internet version indicates newer file for download form "frm_update_at" (or his clone) can be included into users program. 22

Appendix A - Error Codes, Error Messages 130...Err_AT_Key_Structure 131...Err_AT_Key_WrongEndDate 132...Err_AT_Key_ExpiredEndDate 135...Err_AT_UnsupportedSport 136...Err_AT_UnsupportedLanguage 141...Err_AT_InitStates 142...Err_AT_InitLeaguesFOO 143...Err_AT_InitLeaguesHOC 144...Err_AT_InitTeamsFOO 145...Err_AT_InitTeamsHOC 150...Err_AT_ReadCorrLeagues 151...Err_AT_Filter 155...Err_FilterName 159...Err_PrioMin 911...Error_UNKNOWN_OPERATION 912...Error_USERNAME 913...Error_PASSWORD 914...Error_AUTHORIZATION 918...Error_READ_OUTPUT 930...Error_ResponseApiPS 931...Error_RespAuthorization 933...Error_RespReadApiPS 956...ErrorCallProg_ApiPS 965...ErrApiPS_CSV_Option 966...ErrApiPS_CSVqn_Option 968...ErrApiPS_READ_OUTPUT 969...ErrApiPS_SAVE_OUTPUT 970...ErrApiPS_XML_Parse 971...ErrApiPS_XML_Xpath 973...ErrApiPS_GetFdTime 974...ErrApiPS_XPATHsport 975...ErrApiPS_GetSportId 976...ErrApiPS_XPATHleague 977...ErrApiPS_GetLeagueId 978...ErrApiPS_XPATHevent 979...ErrApiPS_GetEventId 980...ErrApiPS_XPATHperiod 981...ErrApiPS_GetPeriodId 982...ErrApiPS_GetPeriodSpread 983...ErrApiPS_GetPeriodTotals 991...ErrReq_NoServicePinnacle 996...ErrReq_NoValidOperPinnacle 23

Appendix B - Parameter #4 (required values or other parameters for Filtering) Prefix of parameter#4 "CSV_" => output structure CSV "with quotation marks" (separator of values = character ";", delimiter of values = character ") - "CSV_qn" => output structure CSV "without quotation marks" (separator of values = character ";", values without delimiter, in text values character ";" replaced with ",", character " replaced with ) List of additional parameters rest of string parameter#4 : LIST OF PARAMETERS in 1 STRING Parameters for _ApiPS > PROCESSING -> additional parameters for API operations SEPARATOR of individual parameters is character " " individual parameters are IDENTIFIER=value Overview IDENTIFIERS of additional parameters (for _ApiPS) see chapter 3.6. Examples how to include parameters (additional for _ApiPS.EXE) to parameter#4 : _ApiPS.EXE --GetSports RA "https://api.pinnaclesports.com/v1/sports" "CSV_ sort=name onlyinfeed=y " DATA/GetSports.CSV_ - only sports currently in feed, sorted by name _ApiPS.EXE --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" "CSV_qn sort=name onlyinfeed=y " DATA/GetLeagues.CSV_ - leagues for sport=29=soccer, only leagues currently in feed, sorted by name _ApiPS.EXE --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=19" "CSV_ onlyinfeed=y only1row=y " DATA/GetLeagues.CSV_ - leagues for sport=19=ice hockey, only leagues currently in feed, 1 row(string) _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn onlyevents=y from=0 to=7x24 " DATA/GetFeed.CSV_ - only matches for sport=29=soccer, in next 7 days _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn from=0 to=2x24 oddsformat=decimal " DATA/GetFeed.CSV_ - odds for sport=29=soccer, matches in next 2 days, format of prices european 24

Appendix C - Parameter #6 (additional parameters for Filtering) In parameter#6 can be passed to program _ApiPS.EXE additional filters - based on Names of Leagues(competitions), Period, Markets see chapter 3.7. Filtering with simple wildcards "*" - based on Analysis of texts see chapter 3.8. STRUCTURE OF parameter#6 : SEPARATOR of individual filters is group of characters "# # #" Filter for "Analysis of texts" has to be first filter Meaning of the filters see chapter 3.7. 1) Used only Filtering of competitions based on Analysis of texts (see 3.7.) f.e. Operation --GetLeagues filter only Germany : _ApiPS.EXE --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" "CSV_qn onlyinfeed=y " DATA/GetLeagues.CSV_ "FOO DEU,1.L,* DEU,2.L,*" _AT parameter#4 - output structure CSV, additional parameter onlyinfeed parameter#6 additional filtering - Analysis of competitions (names) (_AT) parameter#7 data files for Analysis of texts are in subdirectory "_AT" of program directory 2) Used only 1 or more filters for Names - wildcards "*" (see chapter 3.6.) a) + filter for competition name Operation --GetLeagues filter only Germany - Bundesliga 1, Bundesliga 2 without corners, women, U1?: _ApiPS.EXE --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" "CSV_qn onlyinfeed=y " DATA/GetLeagues.CSV_ "FOO DEU,1.L,M DEU,2.L,M# # #competitionname NOT*CORNERS* NOT*U1* NOT*WOMEN* " _AT b) only filter competition name _ApiPS.EXE --GetLeagues RA "https://api.pinnaclesports.com/v1/leagues?sportid=29" "CSV_qn sort=name onlyinfeed=y " DATA/GetLeagues.CSV_ "# # #competitionname *PREMIER* NOT*CORNERS* " _AT c) + filter for Period and Market Operation --GetFeed _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed? sportid=29&leagueid=1842-1980" "CSV_qn oddsformat=decimal " DATA/GetFeed.CSV_ "# # #competitionname NOT*CORNERS* # # #periodname *MATCH* # # #marketname MONEYLINE " _AT 3) Used List of Leagues + Filters (Competition, Period, Markets) _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn listleagues=~1980;england - Premier League;1;c;ENG;1.L;M;5~ oddsformat=decimal " DATA/GetFeed.CSV_ "# # #competitionname NOT*CORNERS* # # #periodname MATCH 1ST HALF # # #marketname MONEYLINE SPREAD " _AT - in parameter listleagues=~...~...~ list of leagues for selection + detailed info (is going to be included into output rows "LEAGUE") 25

Appendix D - Operation Get_LeaguesEvents - structure of output CSV Output only structure CSV Structure CSV 1 ROW with info about Competition, following rows for its events/matches (..., again 1 ROW of next competition,...) If was used Filter _AT (f.e. "FOO ENG,1.L,M... ") => into rows are filled parameters for Leagues/Competitions and for Team1, Team2 of Match (only for leagues / competitions defined in library for Analysis of Texts - DLL_AnalTextStaSpo.dll) See Demoversions : Windows Form Applications (in Visual Basic, C#) form "frmcompetitions_events.???" EXAMPLE OF CALLING : _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn onlyevents=y from=0 to=3x24 listleagues=~1980;england - Premier League;?;c;ENG;1.L;M;5~1842;Bundesliga;?;c;DEU;1.L;M;5~ " DATA/GetFeed.CSV_ "FOO ENG,1.L,* DEU,1.L,*" _AT - only matches for sport=29=soccer & England Premier League FDTIME;1418244076424; SPORT;29;Soccer LEAGUE;1842;Bundesliga;?;c;DEU;1.L;M;5 EVENT;419320778;2014-12-12T19:30:00;No;2;I EVENThome;Team1:TSG Hoffenheim;3325;HOFFE EVENTaway;Team2:Eintracht Frankfurt;3326;FREIN EVENT;419320781;2014-12-13T14:30:00;No;2;I EVENThome;Team1:Augsburg;3301;AUGSB EVENTaway;Team2:Bayern Munchen;3302;MNBAY EVENT;419320783;2014-12-13T14:30:00;No;0;I EVENThome;Team1:Hertha Berlin;3304;BEHER EVENTaway;Team2:Borussia Dortmund;3305;DOBOR EVENT;419320784;2014-12-13T14:30:00;No;2;I EVENThome;Team1:SC Freiburg;3307;FREIB EVENTaway;Team2:Hamburger SV;3308;HAMBA EVENT;419320786;2014-12-13T14:30:00;No;2;I EVENThome;Team1:Schalke 04;3310;SCHAL EVENTaway;Team2:Koln;3311;KO1FC EVENT;419320790;2014-12-13T14:30:00;No;2;I EVENThome;Team1:Werder Bremen;3313;BREME EVENTaway;Team2:Hannover 96;3314;HANNA EVENT;419320791;2014-12-13T17:30:00;No;2;I EVENThome;Team1:FSV Mainz 05;3316;MAINZ EVENTaway;Team2:VfB Stuttgart;3317;STUTT LEAGUE;1980;England - Premier League;?;c;ENG;1.L;M;5 EVENT;419319301;2014-12-13T15:00:00;No;2;I EVENThome;Team1:Burnley;2501;BURNL EVENTaway;Team2:Southampton;2502;SOUTH EVENT;419319305;2014-12-13T15:00:00;No;2;I EVENThome;Team1:Crystal Palace;2507;CRYPA EVENTaway;Team2:Stoke City;2508;STOKE 26

EVENT;419319308;2014-12-13T15:00:00;No;2;I EVENThome;Team1:Leicester City;2510;LEICE EVENTaway;Team2:Manchester City;2511;MACIT EVENT;419319310;2014-12-13T15:00:00;No;2;I EVENThome;Team1:Sunderland;2513;SUNDE EVENTaway;Team2:West Ham United;2514;WESHA EVENT;419319315;2014-12-13T17:30:00;No;2;I EVENThome;Team1:Arsenal;2519;ARSEN EVENTaway;Team2:Newcastle United;2520;NEWCA EVENT;419319314;2014-12-13T15:00:00;No;2;I EVENThome;Team1:W.B.A;2516;WESBR EVENTaway;Team2:Aston Villa;2517;ASTVI EVENT;419319302;2014-12-13T15:00:00;No;2;I EVENThome;Team1:Chelsea;2504;CHELS EVENTaway;Team2:Hull City;2505;HULL_ STRUCTURE OF OUTPUT : 1 ROW for SPORT : A) "SPORT" record (info about SPORT) item 1 = Sport-ID (Pinnacle) item 2 = Sport-Name (Pinnacle) 1 ROW for LEAGUE/COMPETITION : B) "LEAGUE" record (info about LEAGUE/COMPETITION) item 1 = League-ID (Pinnacle) item 2 = League-Name (Pinnacle) item 3 = League is in Feed(Line) (Pinnacle) 0=no / 1=yes /? item 4 = Participants (_ApiPS) - "s"=states, "c"=clubs, "n"=not defined item 5 = State (_ApiPS) 3 chars (Aplpha 3) item 6 = Competition (_ApiPS) 3-5 chars (Type&Level "1.L", "2.L",...) item 7 = Participants (_ApiPS) 1-3 chars (men/women/undernn) item 8 = Priority (_ApiPS) "1" to "5" (maximum "5") 1 ROW for EVENT/MATCH : C) "EVENT" record (info about EVENT/MATCH) item 1 = Event-ID (Pinnacle) item 2 = Event-StartDateTime yyyy-mm-ddthh:mm:ss (Pinnacle) item 3 = Event-Inplay(Live) Yes/No (Pinnacle) item 4 = Event-Lstatus (Pinnacle) item 5 = Event-Status (Pinnacle) N ROWs for EVENT-TEAMS/PARTICIPANTS : D) "EVENThome" / "EVENTaway"... item 1 = Team (Pinnacle) f.e. Team1:Manchester United item 2 = Team-ID (Pinnacle) item 3 = Team-Identifier 5 chars (_ApiPS) 27

Appendix E - Operation GetFeed - structure of output CSV Output with the same structure produces also another combined operation Get_LeaguesEventsPrices (in frmget_leagueseventsprices) this combined operation summarizes data from 2 original Pinnacles API operations (--GetLeagues and --GetFeed) sumarized output is returned in 1 file with structure CSV (separator ";", individual rows ("SPORT" for Sport, "LEAGUE" for League/Competition, "EVENT" for Event/Match, another rows "EVENT????" for runners=participants (home, away...), "PERIOD" for different parts of match + next rows with prices (MONEYLINE, SPREAD, TOTAL...) See Demoversions : Windows Form Applications (in Visual Basic, C#) forms "frmgetfeed.???", "frmget_leagueseventsprices.???", "frmotherbookie.???" EXAMPLE OF CALLING : _ApiPS.EXE --GetFeed RA "https://api.pinnaclesports.com/v1/feed?sportid=29" "CSV_qn listleagues=~1980;england - Premier League;?;c;ENG;1.L;M;5~ oddsformat=decimal " DATA/GetFeed.CSV_ "# # #competitionname NOT*CORNERS* " _AT FDTIME;1418244586446; SPORT;29;Soccer LEAGUE;1980;England - Premier League;?;c;ENG;1.L;M;5 EVENT;419319316;2014-12-14T13:30:00;No;2;I EVENThome;Team1:Manchester United;2522;MAUTD EVENTaway;Team2:Liverpool;2523;LIVER PERIOD;Match;0;2014-12- 14T13:30:00;USD;MoneyLine:2000;Spread:4000;TotalPoints:3000;TeamTotals:1500 MONEYLINE;home:1.787;draw:3.950;away:4.820 SPREAD;home:-0.75/2.020;away:0.75/1.917;Id: SPREAD;home:-1.25/2.790;away:1.25/1.498;Id:856855777 SPREAD;home:-1/2.420;away:1/1.645;Id:856855779 SPREAD;home:-0.5/1.787;away:0.5/2.180;Id:856855781 SPREAD;home:-0.25/1.559;away:0.25/2.620;Id:856855783 TOTAL;points:2.75;over:1.990;under:1.926;Id: TOTAL;points:2.25;over:1.559;under:2.570;Id:856855778 TOTAL;points:2.5;over:1.775;under:2.170;Id:856855780 TOTAL;points:3;over:2.320;under:1.676;Id:856855782 TOTAL;points:3.25;over:2.650;under:1.526;Id:856855784 TOTALteamHOME;total:1.5;over:1.758;under:2.150 TOTALteamAWAY;total:1;over:2.140;under:1.763 PERIOD;1st Half;1;2014-12-14T13:30:00;USD;Spread:2500;TotalPoints:2500 SPREAD;home:-0.25/1.952;away:0.25/1.971;Id: TOTAL;points:1;over:1.758;under:2.170;Id: EVENT;419319314;2014-12-13T15:00:00;No;2;I EVENThome;Team1:W.B.A;2516;WESBR EVENTaway;Team2:Aston Villa;2517;ASTVI PERIOD;1st Half;1;2014-12-13T15:00:00;USD;Spread:2500;TotalPoints:2500 SPREAD;home:-0.25/2.230;away:0.25/1.735;Id: TOTAL;points:0.75;over:1.806;under:2.110;Id: PERIOD;Match;0;2014-12- 13T15:00:00;USD;MoneyLine:2000;Spread:4000;TotalPoints:3000;TeamTotals:1500 MONEYLINE;home:2.120;draw:3.350;away:3.990 SPREAD;home:-0.5/2.120;away:0.5/1.833;Id: SPREAD;home:-1/3.350;away:1/1.365;Id:856463895 28

SPREAD;home:-0.75/2.520;away:0.75/1.599;Id:856463897 SPREAD;home:-0.25/1.813;away:0.25/2.140;Id:856463899 SPREAD;home:0/1.498;away:0/2.800;Id:856463901 TOTAL;points:2.25;over:2.120;under:1.813;Id: TOTAL;points:1.75;over:1.581;under:2.510;Id:856463896 TOTAL;points:2;over:1.794;under:2.140;Id:856463898 TOTAL;points:2.5;over:2.430;under:1.621;Id:856463900 TOTAL;points:2.75;over:2.930;under:1.439;Id:856463902 TOTALteamHOME;total:1.25;over:1.990;under:1.901 TOTALteamAWAY;total:0.75;over:1.885;under:2.000... STRUCTURE OF OUTPUT : 1 ROW for SPORT : A) "SPORT" record (info about SPORT) item 1 = Sport-ID (Pinnacle) item 2 = Sport-Name (Pinnacle) 1 ROW for LEAGUE/COMPETITION : B) "LEAGUE" record (info about LEAGUE/COMPETITION) item 1 = League-ID (Pinnacle) item 2 = League-Name (Pinnacle) item 3 = League is in Feed(Line) (Pinnacle) 0=no / 1=yes /? item 4 = Participants (_ApiPS) - "s"=states, "c"=clubs, "n"=not defined item 5 = State (_ApiPS) 3 chars (Aplpha 3) item 6 = Competition (_ApiPS) 3-5 chars (Type&Level "1.L", "2.L",...) item 7 = Participants (_ApiPS) 1-3 chars (men/women/undernn) item 8 = Priority (_ApiPS) "1" to "5" (maximum "5") 1 ROW for EVENT/MATCH : C) "EVENT" record (info about EVENT/MATCH) item 1 = Event-ID (Pinnacle) item 2 = Event-StartDateTime yyyy-mm-ddthh:mm:ss (Pinnacle) item 3 = Event-Inplay(Live) Yes/No (Pinnacle) item 4 = Event-Lstatus (Pinnacle) item 5 = Event-Status (Pinnacle) N ROWs for EVENT-TEAMS/PARTICIPANTS : D) "EVENThome" / "EVENTaway"... item 1 = Team (Pinnacle) f.e. Team1:Manchester United item 2 = Team-ID (Pinnacle) item 3 = Team-Identifier 5 chars (_ApiPS) 1 ROW for PERIOD : E) "PERIOD" record (info about PERIOD) item 1 = Period-Name (Match/Game/1st half/1st set/...) item 2 = Period-Number item 3 = Period-CutoffDateTime yyyy-mm-ddthh:mm:ss (Pinnacle) item 4 = CurrencyCode for MaxBetAmounts items 5, 6,... MaxBetAmounts N ROWs for MONEYLINE / SPREAD / TOTAL... :. 7. VERSIONs 15th Feb 2015 Version 1.2.16 29