Exchange Stream API

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • hendrixback
    Junior Member
    • Jan 2015
    • 10

    #1

    Exchange Stream API

    Hello,

    I can use the Betfair API completely with PHP but now I was trying to use the stream API but I am having some issues.

    Can anyone please explain me a little bit about this API?

    Thank you
  • thehun10.
    Junior Member
    • Oct 2009
    • 5

    #2
    You need to be a bit more specific.
    What issues are you talking about.
    I'm assuming you have read the support documentation on streaming and applied for access to the streaming api?

    Comment

    • hendrixback
      Junior Member
      • Jan 2015
      • 10

      #3
      Hello thank you for your answer.

      Yes I read it but the example is for C# and I am not very comfortable with that.

      Whenever I want the current odd and size I run:

      function listMarketBook($marketId){

      $params = '{
      "marketIds":["' . $marketId . '"],
      "priceProjection":{
      "priceData":["EX_ALL_OFFERS"],
      "virtualise":"true",
      "exBestOffersOverrides": {
      "bestPricesDepth" : 1
      }
      }
      }';

      $jsonResponse = sportsApingRequest('listMarketBook', $params);

      echo json_encode($jsonResponse[0]->result);

      }

      And I know that with the Stream API I can make this request much faster. But I don't know how to do that on PHP.

      Any example will be very appreciated.

      Thank you for the fast response

      Comment

      Working...
      X