Announcement

Collapse
No announcement yet.

Where to start, what does the return data means

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Where to start, what does the return data means

    Hi everyone!

    I've always wanted to build a bot using the API. My preference language would be:

    * Node js
    * Ruby
    * PHP

    I do not know Python but.... can read it a little bit. Here's my question for IRE & GB horse racing in plays only:

    Using the API, can I detect when a market is about to close? Also, I do not understand the data returned when using the sample nodejs code: <see attached link> I get back: (Received: {"op":"mcm","id":15803027,"clk":"AMzGAwDQ0AIApa wF" ,"pt":1597316417058,"ct":"HEARTBEAT"}) -- what should I do with that?

    What do I want to achieve? I want to see a live in play stats of horse racing with the odds constantly changing, the same as Paddy Power's website.

  • #2
    Hi, I do not know the languages listed above (I'm getting very old it seems).
    To answer your first question "can I detect when a market is about to close?" Not really possible as one can't predict how fast the horses run and how close they are bunched among many other factors like false starts. Inplay prices are available using ListMarketBook,ListRunnerBook.

    I have not used Heartbeat as I think I don't have access to that feature. To make sure I don't overtax the server(s) I put a 200ms delay between queries
    As PHP is one of the most popular internet languages I would suggest using the code and examples available in github will aid you in your goal.

    You may be getting the above returned results because of compressing or crypting requests on the sent and returned data.

    For All commands and their structure see

    https://docs.developer.betfair.com/v...ts-operations/
    https://docs.developer.betfair.com/v...nt-operations/

    Edit - one more helpful (I hope) item. Sample PHP code can be found at

    https://github.com/betfair/API-NG-sa...ree/master/php
    Last edited by MarcusMel; 05-12-2020, 05:55 AM.

    Comment


    • #3
      You have quoted a heartbeat message from the market (mcm) stream, intrigued as to how you got this far?

      Comment

      Working...
      X