trustwothy results from api.ng ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bnl
    Junior Member
    • Nov 2012
    • 108

    #1

    trustwothy results from api.ng ?

    Hi!
    Having a bot that plays on horses,
    has lead me to divide the markets into separate geographic areas.

    So, I ask Betfair for events, and markets once a minute.
    When I get a new (to me unknown) event, I put it into a database,
    knowing that events does not change countries.

    Then, I use the eventid in both markets and events to join them together when
    I decide if this is a market for me or not.

    South Africa has been ruled out as a market for me. Thus I do not bet on those races.
    So, I get an event, stateing it is GB. Fine, GB is ok.
    (Swedish summertime below)

    Code:
    2013-09-08 13:09:51.460 Main. : posting {"method":"SportsAPING/v1.0/listMarketCatalogue", "jsonrpc":"2.0", "id":15, "params":{"filter":{"inPlayOnly":false, "exchangeIds":["1"], "marketBettingTypes":["ODDS"], "marketTypeCodes":["WIN", "PLACE"], "eventTypeIds":["7", "4339"], "marketStartTime":{"to":"2013-09-08T11:10:02.452Z", "from":"2013-09-08T11:09:51.452Z"}, "marketCountries":[]}, "locale":"en", "marketProjection":["MARKET_DESCRIPTION", "RUNNER_DESCRIPTION", "EVENT", "EVENT_TYPE", "MARKET_START_TIME"], "maxResults":"30", "sort":"FIRST_TO_START"}}
    2013-09-08 13:09:51.504 Main. : Got reply
    2013-09-08 13:09:51.504 Main. : {"id":15, "jsonrpc":"2.0", "result":[{"marketId":"1.110903339", "event":{"id":"27063249", "name":"Borrow (RSA) 8th Sep", "countryCode":"GB", "openDate":"2013-09-08T11:10:00.000Z", "timezone":"Africa/Johannesburg", "venue":"Borrowdale"}, "eventType":{"id":"7", "name":"Horse Racing"}, "runners":[{"sortPriority":1, "handicap":0.00000E+00, "selectionId":7641179, "runnerName":"1. Rocket Runner"}, {"sortPriority":2, "handicap":0.00000E+00, "selectionId":7641180, "runnerName":"2. Heron Boy"}, {"sortPriority":3, "handicap":0.00000E+00, "selectionId":7641181, "runnerName":"3. Positivity"}, {"sortPriority":4, "handicap":0.00000E+00, "selectionId":4765597, "runnerName":"4. Rocket Science"}, {"sortPriority":5, "handicap":0.00000E+00, "selectionId":7396144, "runnerName":"5. Cheatin Heart"}, {"sortPriority":6, "handicap":0.00000E+00, "selectionId":4322931, "runnerName":"6. Graceful Anna"}, {"sortPriority":7, "handicap":0.00000E+00, "selectionId":860539, "runnerName":"7. Havana Bay"}, {"sortPriority":8, "handicap":0.00000E+00, "selectionId":7641182, "runnerName":"8. Soar To Singapore"}, {"sortPriority":9, "handicap":0.00000E+00, "selectionId":7641183, "runnerName":"9. Suede Sensation"}], "description":{"clarifications":"NR: (RSA) <br> 9. Suede Sensation(9.3%,10:25)", "rules":"<b>MARKET INFORMATION</b><br><br>For further information please see <a href=http://content.betfair.com/aboutus/content.asp?sWhichKey=Rules%20and%20Regulations#undefined.do style=color:0163ad; text-decoration: underline; target=_blank>Rules & Regs</a>.<br><br>Who will finish 1st, 2nd or 3rd in this race? NON RUNNERS DO NOT CHANGE THE PLACE TERMS. Should the number of runners be equal to or less than the number of places available as set out above in these rules all bets will be void. CARD NUMBERS ARE A GUIDE ONLY. BETS ARE PLACED ON A NAMED HORSE. Betfair Non-Runner Rule applies. Dead heat rules apply. <br><br><b>This market will be CLOSED at the off</b> with unmatched bets cancelled once the Betfair SP reconciliation process has been completed (if applicable). This market will initially be settled on a First Past the Post basis. However we will re-settle all bets should the official result differ from any initial settlement.<br><br>Customers should be aware that:<ol><li>information (such as jockey silks, saddlecloth numbers etc) is provided \"as is\" and is for guidance only. Betfair does not guarantee the accuracy of this information and use of it to place bets is entirely at your own risk.</li></ol><b>For betting, form and results you can check www.tabgold.co.za.</b>", "discountAllowed":true, "bspMarket":false, "rulesHasDate":true, "marketType":"PLACE", "marketBaseRate":5.00000E+00, "wallet":"UK wallet", "persistenceEnabled":true, "turnInPlayEnabled":false, "suspendTime":"2013-09-08T11:10:00.000Z", "marketTime":"2013-09-08T11:10:00.000Z", "bettingType":"ODDS"}, "marketName":"To Be Placed", "marketStartTime":"2013-09-08T11:10:00.000Z"}, {"marketId":"1.110903341", "event":{"id":"27063249", "name":"Borrow (RSA) 8th Sep", "countryCode":"GB", "openDate":"2013-09-08T11:10:00.000Z", "timezone":"Africa/Johannesburg", "venue":"Borrowdale"}, "eventType":{"id":"7", "name":"Horse Racing"}, "runners":[{"sortPriority":1, "handicap":0.00000E+00, "selectionId":7641179, "runnerName":"1. Rocket Runner"}, {"sortPriority":2, "handicap":0.00000E+00, "selectionId":7641180, "runnerName":"2. Heron Boy"}, {"sortPriority":3, "handicap":0.00000E+00, "selectionId":7641181, "runnerName":"3. Positivity"}, {"sortPriority":4, "handicap":0.00000E+00, "selectionId":4765597, "runnerName":"4. Rocket Science"}, {"sortPriority":5, "handicap":0.00000E+00, "selectionId":7396144, "runnerName":"5. Cheatin Heart"}, {"sortPriority":6, "handicap":0.00000E+00, "selectionId":4322931, "runnerName":"6. Graceful Anna"}, {"sortPriority":7, "handicap":0.00000E+00, "selectionId":860539, "runnerName":"7. Havana Bay"}, {"sortPriority":8, "handicap":0.00000E+00, "selectionId":7641182, "runnerName":"8. Soar To Singapore"}, {"sortPriority":9, "handicap":0.00000E+00, "selectionId":7641183, "runnerName":"9. Suede Sensation"}], "description":{"clarifications":"NR: (RSA) <br> 9. Suede Sensation(0%,10:25)", "rules":"<b>MARKET INFORMATION</b><br><br>For further information please see <a href=http://content.betfair.com/aboutus/content.asp?sWhichKey=Rules%20and%20Regulations#undefined.do style=color:0163ad; text-decoration: underline; target=_blank>Rules & Regs</a>.<br><br>Who will win this race? CARD NUMBERS ARE A GUIDE ONLY. BETS ARE PLACED ON A NAMED HORSE. Betfair Non-Runner Rule applies. Dead Heat Rules Apply.<br><br><b>This market will be CLOSED at the off</b> with unmatched bets cancelled once the Betfair SP reconciliation process has been completed (if applicable). This market will initially be settled on a First Past the Post basis. However we will re-settle all bets should the official result differ from any initial settlement. <br><br>Customers should be aware that:<ol><li>information (such as jockey silks, saddlecloth numbers etc) is provided \"as is\" and is for guidance only. Betfair does not guarantee the accuracy of this information and use of it to place bets is entirely at your own risk.</li></ol><b>For betting, form and results you can check www.tabgold.co.za.</b>", "discountAllowed":true, "bspMarket":true, "rulesHasDate":true, "marketType":"WIN", "marketBaseRate":5.00000E+00, "wallet":"UK wallet", "persistenceEnabled":true, "turnInPlayEnabled":false, "suspendTime":"2013-09-08T11:10:00.000Z", "marketTime":"2013-09-08T11:10:00.000Z", "bettingType":"ODDS"}, "marketName":"R1 1000m Plt", "marketStartTime":"2013-09-08T11:10:00.000Z"}]}
    Half hour later :

    Code:
    2013-09-08 13:44:51.728 Main. : posting {"method":"SportsAPING/v1.0/listMarketCatalogue", "jsonrpc":"2.0", "id":15, "params":{"filter":{"inPlayOnly":false, "exchangeIds":["1"], "marketBettingTypes":["ODDS"], "marketTypeCodes":["WIN", "PLACE"], "eventTypeIds":["7", "4339"], "marketStartTime":{"to":"2013-09-08T11:45:02.720Z", "from":"2013-09-08T11:44:51.720Z"}, "marketCountries":[]}, "locale":"en", "marketProjection":["MARKET_DESCRIPTION", "RUNNER_DESCRIPTION", "EVENT", "EVENT_TYPE", "MARKET_START_TIME"], "maxResults":"30", "sort":"FIRST_TO_START"}}
    2013-09-08 13:44:51.756 Main. : Got reply
    2013-09-08 13:44:51.756 Main. : {"id":15, "jsonrpc":"2.0", "result":[{"marketId":"1.110903342", "event":{"id":"27063249", "name":"Borrow (RSA) 8th Sep", "countryCode":"ZA", "openDate":"2013-09-08T11:10:00.000Z", "timezone":"Africa/Johannesburg", "venue":"Borrowdale"}, "eventType":{"id":"7", "name":"Horse Racing"}, "runners":[{"sortPriority":1, "handicap":0.00000E+00, "selectionId":6543683, "runnerName":"1. Stroller"}, {"sortPriority":2, "handicap":0.00000E+00, "selectionId":4463113, "runnerName":"2. Go Public"}, {"sortPriority":3, "handicap":0.00000E+00, "selectionId":7641184, "runnerName":"3. Little Venice"}, {"sortPriority":4, "handicap":0.00000E+00, "selectionId":7151365, "runnerName":"4. Wisteria Way"}, {"sortPriority":5, "handicap":0.00000E+00, "selectionId":6959615, "runnerName":"5. Aqua Luna"}, {"sortPriority":6, "handicap":0.00000E+00, "selectionId":7641185, "runnerName":"6. Serene Geisha"}, {"sortPriority":7, "handicap":0.00000E+00, "selectionId":7641186, "runnerName":"7. Sido"}, {"sortPriority":8, "handicap":0.00000E+00, "selectionId":7364775, "runnerName":"8. Milady"}, {"sortPriority":9, "handicap":0.00000E+00, "selectionId":7641187, "runnerName":"9. Gauche"}], "description":{"clarifications":"NR: (RSA) <br> 9. Gauche(12.8%,10:26)", "rules":"<b>MARKET INFORMATION</b><br><br>For further information please see <a href=http://content.betfair.com/aboutus/content.asp?sWhichKey=Rules%20and%20Regulations#undefined.do style=color:0163ad; text-decoration: underline; target=_blank>Rules & Regs</a>.<br><br>Who will finish 1st, 2nd or 3rd in this race? NON RUNNERS DO NOT CHANGE THE PLACE TERMS. Should the number of runners be equal to or less than the number of places available as set out above in these rules all bets will be void. CARD NUMBERS ARE A GUIDE ONLY. BETS ARE PLACED ON A NAMED HORSE. Betfair Non-Runner Rule applies. Dead heat rules apply. <br><br><b>This market will be CLOSED at the off</b> with unmatched bets cancelled once the Betfair SP reconciliation process has been completed (if applicable). This market will initially be settled on a First Past the Post basis. However we will re-settle all bets should the official result differ from any initial settlement.<br><br>Customers should be aware that:<ol><li>information (such as jockey silks, saddlecloth numbers etc) is provided \"as is\" and is for guidance only. Betfair does not guarantee the accuracy of this information and use of it to place bets is entirely at your own risk.</li></ol><b>For betting, form and results you can check www.tabgold.co.za.</b>", "discountAllowed":true, "bspMarket":false, "rulesHasDate":true, "marketType":"PLACE", "marketBaseRate":5.00000E+00, "wallet":"UK wallet", "persistenceEnabled":true, "turnInPlayEnabled":false, "suspendTime":"2013-09-08T11:45:00.000Z", "marketTime":"2013-09-08T11:45:00.000Z", "bettingType":"ODDS"}, "marketName":"To Be Placed", "marketStartTime":"2013-09-08T11:45:00.000Z"}, {"marketId":"1.110903344", "event":{"id":"27063249", "name":"Borrow (RSA) 8th Sep", "countryCode":"ZA", "openDate":"2013-09-08T11:10:00.000Z", "timezone":"Africa/Johannesburg", "venue":"Borrowdale"}, "eventType":{"id":"7", "name":"Horse Racing"}, "runners":[{"sortPriority":1, "handicap":0.00000E+00, "selectionId":6543683, "runnerName":"1. Stroller"}, {"sortPriority":2, "handicap":0.00000E+00, "selectionId":4463113, "runnerName":"2. Go Public"}, {"sortPriority":3, "handicap":0.00000E+00, "selectionId":7641184, "runnerName":"3. Little Venice"}, {"sortPriority":4, "handicap":0.00000E+00, "selectionId":7151365, "runnerName":"4. Wisteria Way"}, {"sortPriority":5, "handicap":0.00000E+00, "selectionId":6959615, "runnerName":"5. Aqua Luna"}, {"sortPriority":6, "handicap":0.00000E+00, "selectionId":7641185, "runnerName":"6. Serene Geisha"}, {"sortPriority":7, "handicap":0.00000E+00, "selectionId":7641186, "runnerName":"7. Sido"}, {"sortPriority":8, "handicap":0.00000E+00, "selectionId":7364775, "runnerName":"8. Milady"}, {"sortPriority":9, "handicap":0.00000E+00, "selectionId":7641187, "runnerName":"9. Gauche"}], "description":{"clarifications":"NR: (RSA) <br> 9. Gauche(4.8%,10:26)", "rules":"<b>MARKET INFORMATION</b><br><br>For further information please see <a href=http://content.betfair.com/aboutus/content.asp?sWhichKey=Rules%20and%20Regulations#undefined.do style=color:0163ad; text-decoration: underline; target=_blank>Rules & Regs</a>.<br><br>Who will win this race? CARD NUMBERS ARE A GUIDE ONLY. BETS ARE PLACED ON A NAMED HORSE. Betfair Non-Runner Rule applies. Dead Heat Rules Apply.<br><br><b>This market will be CLOSED at the off</b> with unmatched bets cancelled once the Betfair SP reconciliation process has been completed (if applicable). This market will initially be settled on a First Past the Post basis. However we will re-settle all bets should the official result differ from any initial settlement. <br><br>Customers should be aware that:<ol><li>information (such as jockey silks, saddlecloth numbers etc) is provided \"as is\" and is for guidance only. Betfair does not guarantee the accuracy of this information and use of it to place bets is entirely at your own risk.</li></ol><b>For betting, form and results you can check www.tabgold.co.za.</b>", "discountAllowed":true, "bspMarket":true, "rulesHasDate":true, "marketType":"WIN", "marketBaseRate":5.00000E+00, "wallet":"UK wallet", "persistenceEnabled":true, "turnInPlayEnabled":false, "suspendTime":"2013-09-08T11:45:00.000Z", "marketTime":"2013-09-08T11:45:00.000Z", "bettingType":"ODDS"}, "marketName":"R2 1200m Plt", "marketStartTime":"2013-09-08T11:45:00.000Z"}]}
    The countryCode has changed on the event!
    From GB to ZA!


    This is REALLY bad, since market id 1.110903342 had properties that made the bot wanting to play on it.
    But it would not, if it had realized that it is an South-African event.

    Thankfully, I had some issue with the code, so the bet was not placed.
    But, it makes me wonder why an event is moved from ZA to GB ...

    And perhaps it would be ok if I put GB into the request.
    But even if I do not want to play on ZA markets right now, I still want the race data.


    /Björn
  • NickB
    Junior Member
    • Mar 2013
    • 17

    #2
    GB horse races returns others

    Hi

    My bot sees this too. It requests GB horse races only as that is what I have chosen to focus on. Very occasionally a French race is returned. On 8 Sep it returned all the Borrow (RSA) races.

    I suspect this is human error as at some point in the process of getting all the data into Betfair, someone has incorrectly assigned a race to GB when it isn't.

    I'd guess there isn't much we can do about it.

    NickB

    Comment

    • bnl
      Junior Member
      • Nov 2012
      • 108

      #3
      Originally posted by NickB View Post
      I'd guess there isn't much we can do about it.
      NickB

      No perhaps not, but I'm glad that I am not the only one noticing it.
      And it would be nice to hear from betfair, confirming your suspicion,
      that it was a human error, and not something periodically reoccurring .

      /Björn

      Comment

      • NickB
        Junior Member
        • Mar 2013
        • 17

        #4
        Duplicate runners too

        I also very occasionally see duplicate runners (same horse name, selection ID, sort priority and so on) returned for a given market.

        I have fixed my code to workaround this and just ignore the second entry, but again it would be good if Betfair could check this themselves.

        Thanks
        NickB

        Comment

        • Guest

          #5
          Originally posted by bnl View Post
          Hi!
          Having a bot that plays on horses,
          has lead me to divide the markets into separate geographic areas.



          /Björn
          Mate first the market data has changed and you can see the JSON string returned shows the market id has changed.

          marketId":"1.110903339"
          marketId":"1.110903342"


          I am still just playing myself however first your bot should realize that this is a different market and so does not do anything.

          2nd can't you call for data using the market id number as a filter. For instance turn off all other filters you may have and then set a filter to marketed 1.110903339 and then get the results.

          Comment

          • Guest

            #6
            Originally posted by NickB View Post
            I also very occasionally see duplicate runners (same horse name, selection ID, sort priority and so on) returned for a given market.

            I have fixed my code to workaround this and just ignore the second entry, but again it would be good if Betfair could check this themselves.

            Thanks
            NickB
            Hey Nick
            Could this be your problem.


            mate I note that if you ask for both WIN and PLACE then
            MARKETCATLOG(0) contains all the horses in the WIN EVENT, however this same data (ie horsenames, Sel ID) is also in the PLACE EVENT stored at MARKETCATLOG(1).

            I also very occasionally see duplicate runners (same horse name, selection ID, sort priority and so on) returned for a given market.

            Comment

            Working...
            X