Forums

General Betting

There is currently 1 person viewing this thread.
Feck N. Eejit
19 Apr 12 16:12
Joined:
Date Joined: 10 Jan 02
| Topic/replies: 8,841 | Blogger: Feck N. Eejit's blog
If 3 different functions each have a limit of 60 per minute does that mean you can call each of them 60 times inside 60 seconds (a total of 180 calls)?

While I'm at it, in a place market does the ifWin and ifLoss fields of the GetMarketProfitAndLoss response just return the prospective winnings and liability respectively for matched bets on an individual horse (i.e. they don't take into account any bets on other horses)?

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
Page 1 of 2  •  Previous 1 | 2 | Next
sort by:
Show
per page
Replies: 61
By:
Feck N. Eejit
When: 19 Apr 12 19:32
Damn it. RESPECT MY AUTHORITAH.
By:
gus
When: 19 Apr 12 19:42
On the first question, yes, the throttles apply to each function individually, so you can call the 3 functions 60 times each within the same minute.

On the second ... I've never used getMarketProfitAndLoss, but looking at the manual it says that for a Multi-Winner Line Market (e.g Horse Place Markets):


ifWin: If this selection is the winner, this is the profit and loss for the market (based on matched bets only)


ifLoss: If this selection is the loser, this is the profit and loss for the market (based on matched bets only)

http://bdphelp.betfair.com/API6/6.0/RefGuide/wwhelp/wwhimpl/js/html/wwhelp.htm

you'd need to use getProfitAndLoss in getBet to get the P/L for an individual runner i think.
By:
gus
When: 19 Apr 12 19:46
Sir ! Happy
By:
Feck N. Eejit
When: 19 Apr 12 19:49
Cheers gus. On the place market question I found this earlier but I always thought the place P/L was a bit more sophisticated than just displaying the P/L for each individual selection.

http://help.betfair.com/contents/itemId/i65767349/index.en.html
By:
Feck N. Eejit
When: 19 Apr 12 19:50
Place markets and markets where there can be more than one winner: The left-hand figure is your profit/loss on that selection if it is placed. The right-hand figure is your profit/loss if it is not placed. Calculations are made from your matched bets on each selection independently.
By:
Baby Jesus
When: 19 Apr 12 23:52
As long as you're a bit creative by alternating calls and not covering lots of markets at once the free API should easily cover most peoples needs. Or are you going to start hammering the markets with some uber trading bot , Feck ?

Worth remembering those 60 p/m calls can be called anytime within that minute rather than 1 per second, I'd imagine it resets on the minute bit like the transaction charge limits reset on the hour.

GetMarketProfitAndLoss can't accurately cover the place markets because there could be many different outcome with 3 or more places up for grabs each with their own different pnl's, it just gives you a win or loss figure for each horse separately
By:
TheInvestor2
When: 20 Apr 12 00:06
This is what those bots have done!
http://www.youtube.com/watch?v=768h3Tz4Qik
By:
Feck N. Eejit
When: 20 Apr 12 09:47
Thanks BJ.

Investor, drugs are bad m'kay.
By:
Feck N. Eejit
When: 20 Apr 12 17:02
Anybody know if there's a way to get ALL your matched and unmatched bets for a particular market in one call. I've seen it asked on the bdp forum but it was not answered definitively.

Would a call to the getMUBets function (https://docs.developer.betfair.com/betfair/#!page=00008360-MC.00008315-MC) with the matchedSince parameter set 1900-01-01 work?
By:
Feck N. Eejit
When: 20 Apr 12 17:03
*set to
By:
Contrarian
When: 20 Apr 12 17:23
Feck,

You just have to make a call to getMUBets, with the betStatus set to MU, and specifying the relevant marketId.

This will return up to a maximum of 200 matched and unmatched bets for that market. Of course if you have more than 200, you have to use more than 1 call.
By:
Contrarian
When: 20 Apr 12 17:24
The matchedSince parameter can be omitted in this case.
By:
Contrarian
When: 20 Apr 12 17:28
Paul,

Back again already?
By:
gus
When: 20 Apr 12 17:33
you're better to use no parameters other than the marketId Feck, that way it'll return all of your Matched and UnMatched Bets for that market (up to a maximum of 200 bets) ... if you think you may have more than 200 Bets (which perhaps you might if one of your megaWagers has been matched in dribs and drabs) then you'd have to be a bit more sophisticated, iterating getMUBets with the startRecord parameter = 0 , then 200 and so on, until you'd got them all, in which case you might need to be careful about Data Call charges.
By:
gobetween
When: 20 Apr 12 17:51
you snitch Contrarian?
By:
JLivermore
When: 20 Apr 12 17:52
Feck - are you aware of the bdp forum?  It's probably a better resource than here.

http://forum.bdp.betfair.com/
By:
gus
When: 20 Apr 12 17:56
sorry Contrarian ... i was researching my reply to Feck, while you were answering him, so i didn't see you'd already anwered Sad
By:
catfleppo
When: 20 Apr 12 18:07
When is the Feckbot due to be launched?
By:
Ghetto Joe
When: 20 Apr 12 18:20
JLivermore , never anyone on the bdp forum to answer :(

Like others have said feck, getMUBets with the marketID should be enough but you also have the lite calls and Get Current Bets etc.

With some of my stuff I keep a track of the betIDs of bets and then send a getMUBets with an array of betids rather than marketID as some of my stuff overlaps. None of my stuff exceeds the 200 bets but if it did it'd be easy to split any arrays into separate chunks
By:
Contrarian
When: 20 Apr 12 18:23
Paul,

I didn't grass you up.

It was probably one of the other people you've been harassing today (narrows it down to about 8 suspects).
By:
Feck N. Eejit
When: 20 Apr 12 18:38
Contrarian, gus, thanks but I was aware of the 200 record limit and that was what was putting me off as a) each call contributes towards the 60 p/m limit and b) something could be matched between calls or maybe even RF's applied. If you read that link I put up to the getMUBets documentation it states (for the matchedSince paramater) "Specifies a date and time to start from for the list of returned bets..... If you use the matchedSince parameter and you have specified a betStatus of MU, the bets returned will ignore any limit you set (using recordCount) for the number of records to be returned. Specifying a betStatus of MU causes the API to return your unmatched bets along with the matched ones." To me this suggests if you set that parameter (to 1/1/1900) it will return them all at once even if there is more than 200. If that's the case though I'm surprised that it did not form the basis of a reply to a couple of similar questions on the bdp forum.

Also, if you look at the getCurrentBets documentation there's no mention of a limit on the recordCount parameter. That suggests if you set the marketId=0 it will return every matched and unmatched you have on the exchange across all markets. It would seem strange that they're actually steering you towards retrieving more info than you actually require.

JLivermore, thanks for the link. I was aware of it but two similar questions were unanswered on it.

catfloppo, hopefully around June when I'd normally start back on the flat. It's taken me longer than I thought though as I had to make a lot of changes to my programme to support it and, as is always the case with coding, one change seems to require two changes elsewhere which in turn ..... Cry

Joe, I glanced at the lite call but it looked as though it didn't tell you if the bet was a back or a lay. Is that the case? I thought about keeping track of my own betIDs but this just seemed as though it would support a cleaner bit of coding.
By:
Feck N. Eejit
When: 20 Apr 12 18:41
I should've bolded If you use the matchedSince parameter and you have specified a betStatus of MU, the bets returned will ignore any limit you set (using recordCount) for the number of records to be returned

Also, not that the getCurrentBets I mention in the 2nd para referes to a different function in case you're a speed reader.
By:
Feck N. Eejit
When: 20 Apr 12 18:49
I don't want to start coding only to find out later that it's just sh1t documentation.
By:
Feck N. Eejit
When: 20 Apr 12 19:06
Where is Captain Hindsight when you need him? Cry
By:
Contrarian
When: 20 Apr 12 19:37
Feck,

You're right that the documentation leaves that open as a possibility (that you could get more than 200 bets returned), but I think it EXTREMELY unlikely. They impose those limits for a reason - partly to prevent us from hogging the servers if we happen to be operating with large numbers of MUbets - and I'm sure that it wouldn't be possible to circumvent them in the way that you're suggesting.
By:
Contrarian
When: 20 Apr 12 19:46
Just tested it for getMUBets, and if you have > 200, and specify an early date as you suggested, it just returns exactly 200 bets.
By:
Feck N. Eejit
When: 20 Apr 12 20:16
Thanks for your trouble Contrarian. What about the getCurrentBets with marketId=0. No mention of a limit on recordCount although if there isn't then it's an invitation to hog the servers even more.
By:
Feck N. Eejit
When: 20 Apr 12 20:18
If you use the matchedSince parameter and you have specified a betStatus of MU, the bets returned will ignore any limit you set (using recordCount) for the number of records to be returned

Sh1t documentation is right. How do they manage an error like that?
By:
Feck N. Eejit
When: 20 Apr 12 20:21
Having read the bdp forum and noted the comments regarding getMarketPricesCompressed returning incorrect market status values finding out the documentation is unreliable is no shock but it does not inspire confidence.
By:
Contrarian
When: 20 Apr 12 20:39
Feck,

I'll test it in a bit. I'm just doing the Mainz game at the moment.
By:
Feck N. Eejit
When: 20 Apr 12 20:40
Thanks Contrarian. No rush.
By:
Contrarian
When: 20 Apr 12 20:57
Feck,

I just tested the getCurrentBets with marketId = 0, and 380 unmatched bets, and it does work! The downside, though, is that you have to specify either M or U, you can't do MU. So you're still going to have to do 2 calls to the exchange. It does make the programming much simpler though.
By:
Contrarian
When: 20 Apr 12 20:59
It's also possible that getCurrentBets will be dropped sooner or later. They "recommend" using the newer getMUBets, which mean that in the next version of the API, getCurrentBets is not included.
By:
catfleppo
When: 20 Apr 12 21:21
What next version?
By:
Contrarian
When: 20 Apr 12 21:24
cat,

I'm just assuming that there will be a next version!
By:
catfleppo
When: 20 Apr 12 21:25
Phew!  I'm surprised there hasn't been yet, I'm still using v5!
By:
Feck N. Eejit
When: 20 Apr 12 21:32
Thanks a lot Contrarian, you've probably saved me wasting a lot of time. The getMUBets documentation is a load of sh1te, the getCurrentBets documentation is a load of sh1te and, going by the forum, the GetMarketPricesCompressed Status is a load of sh1te. It does sound like a betfair api.
By:
Contrarian
When: 20 Apr 12 21:40
No problem.
By:
catfleppo
When: 20 Apr 12 21:44
Good luck with the project Feck.  Unless you start pinching money off me of course Excited
Page 1 of 2  •  Previous 1 | 2 | Next
sort by:
Show
per page

Post your reply

Text Format: Table: Smilies:
Forum does not support HTML
Insert Photo
Cancel
‹ back to topics
www.betfair.com