Access to InPlay statstics

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • krynica
    Junior Member
    • Oct 2017
    • 4

    #1

    Access to InPlay statstics

    Hello, is there API methods that allow to get statistics for ongoing football match, such as goal kicks, yellow cards etc.?
    What is the source for stats which Betfair presents in "live streaming" window?
    If Betfair does not share it, do you know feasible sources for such kind of data?
    Thank you
  • jabe
    Senior Member
    • Dec 2014
    • 705

    #2
    It's not part of the API.

    When you view the stats window in Betfair, it uses a URL which contains the Event Id of your chosen event.

    The URL below is from the Arsenal v Swansea game on 28/10/2017. The Event Id for that game was 28420933. You should be able to retrieve that data as an HTML file and you could use your own code to extract the data you want, or use something like HTMLAgility Pack.

    https://www.betfair.com/exchange/plu...aVisualization

    Comment

    • krynica
      Junior Member
      • Oct 2017
      • 4

      #3
      Thank you for suggestion, Jabe.
      I have already checked that and it appears that page uses some player. That player communicates with data source somehow internally, I see regular requests like https://splash.betfair.com/splashed?...isdiction=intl
      and I cannot see what is inside of response when player updates numbers of goal kicks or dangerous attacks.
      I have discovered also initial request which executed when user starts player in Match Statistics mode:
      https://www.betfair.com/inplayservic...&regionCode=UK
      but this request returns only basic statistics like goals, corners, csrds. I want to have more interesting stats like attacks, goal kicks, blocked shots etc., i.e. what player shows in Match Statistics view.

      Do you know if there any procedure to request for access to such data from Betfair team? Or how would you suggest to proceed?

      Thank you

      Comment

      • StefanBelo.
        Junior Member
        • Jan 2009
        • 105

        #4
        What Jebe suggested is one way to do it, here is another one:

        Football Match Data
        betfair bot platform, bfexplorer bot sdk

        Comment

        • krynica
          Junior Member
          • Oct 2017
          • 4

          #5
          It is another way to get basic statistics for the match - goals, cards, corners. But I am looking for a way to get more specific data, such as dangerous attacks, shots on goal, shots wide, blocked shots. That data is shown in Match Statistics view in live streaming area on betfair.
          If you have idea how to get access to this I will much appreciate.

          Comment

          • LiamP
            Junior Member
            • Oct 2015
            • 284

            #6
            Originally posted by krynica View Post
            It is another way to get basic statistics for the match - goals, cards, corners. But I am looking for a way to get more specific data, such as dangerous attacks, shots on goal, shots wide, blocked shots. That data is shown in Match Statistics view in live streaming area on betfair.
            If you have idea how to get access to this I will much appreciate.
            Hi Krynica,

            The data comes from OPTA, if you watch the network requests you see that they use socket.io for the transport protocol, I am in the process of reverse engineering it but haven't got anything to show yet.

            Comment

            • krynica
              Junior Member
              • Oct 2017
              • 4

              #7
              Hello Liam,
              It would be interesting to look at what you can get from socket.io reverse engineering.
              Yes, I saw Betfair is getting data from Opta, not really Betfair but widget which is loaded from performgroup.com.
              I thought about trying to emulate that widget, but have not tried that yet. Your idea about getting inside socket.io they use is nice.

              Comment

              • jabe
                Senior Member
                • Dec 2014
                • 705

                #8
                I'll take a look at the code and see if I can work out how it works. I wonder if the code is easily convertible into other languages from Javascript.

                Slightly off topic, my main program works out the score from the Correct Scores market, though obviously it fails once either team reaches four goals.

                Comment

                • LiamP
                  Junior Member
                  • Oct 2015
                  • 284

                  #9
                  Originally posted by jabe View Post
                  I'll take a look at the code and see if I can work out how it works. I wonder if the code is easily convertible into other languages from Javascript.

                  Slightly off topic, my main program works out the score from the Correct Scores market, though obviously it fails once either team reaches four goals.
                  You looked at using the inplayservice api Jabe?

                  https://github.com/liampauling/betfa...playservice.py

                  Be warned that sometimes incorrect scores are sent through but it’s what the website uses.

                  Comment

                  • jabe
                    Senior Member
                    • Dec 2014
                    • 705

                    #10
                    Originally posted by LiamP View Post
                    You looked at using the inplayservice api Jabe?

                    https://github.com/liampauling/betfa...playservice.py

                    Be warned that sometimes incorrect scores are sent through but it’s what the website uses.
                    I haven't, but I should. My program is working out what it needs to know, but I've still got other work to do it on it, so other stuff hasn't been a priority. I don't know where the time goes!

                    Comment

                    Working...
                    X