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)
Half hour later :
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
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"}]}
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"}]}
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


Comment