R and the Betfair Exchange Stream API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • MiqailMVP
    Junior Member
    • Jan 2017
    • 6

    #1

    R and the Betfair Exchange Stream API

    Hi, I've been playing around with R to do some betting through betfair.

    Using either the abettor or betfaiR package I was able to retrieve prices and place bets.
    But neither of those packages at first sight allow for streaming.

    The Exchange Streaming API provides low latency access to Betfair Exchange market data allowing you to subscribe to and efficiently track changes to market, price and order data.


    Of course I don't want to awkardly loop a request for prices to build my own live-streaming. I assume I will run into some data limits by doing so.

    Can anyone point me in the right direction of connecting to the Exchange Streaming with R. I want to be notified of an update in prices...
  • LiamP
    Junior Member
    • Oct 2015
    • 284

    #2
    There used to be a polling limit of 5 per second on MarketBook requests (every 200ms)

    Looks like you will need to work out how sockets work in R if you want to use streaming.

    Comment

    • MiqailMVP
      Junior Member
      • Jan 2017
      • 6

      #3
      Originally posted by LiamP View Post
      There used to be a polling limit of 5 per second on MarketBook requests (every 200ms)

      Looks like you will need to work out how sockets work in R if you want to use streaming.
      If that is the only limit, that is really good news. Once or twice a second would be live enough for me right now. Thanks for the hint. I will study sockets in R, although I've used them before so should be doable! Thanks again

      Comment

      • MiqailMVP
        Junior Member
        • Jan 2017
        • 6

        #4
        Originally posted by LiamP View Post
        There used to be a polling limit of 5 per second on MarketBook requests (every 200ms)

        Looks like you will need to work out how sockets work in R if you want to use streaming.
        I actually moved to Python using your BetfairLight. Very nice.
        Finally reached the point to start testing the streaming functions.
        Do you know if there is a way to test the Streaming API for free (delayed is fine)?

        Currently I get a:
        {"op":"status","id":2,"statusCode":"FAILURE","erro rCode":"NOT_AUTHORIZED","errorMessage":"AppKey is not configured for service","connectionClosed":true,"connectionId":"1 00-150417184019-314211"}

        Comment

        Working...
        X