|
By:
Damn it. RESPECT MY AUTHORITAH.
|
|
By:
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:
Sir !
![]() |
|
By:
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:
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:
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:
This is what those bots have done!
http://www.youtube.com/watch?v=768h3Tz4Qik |
|
By:
Thanks BJ.
Investor, drugs are bad m'kay. |
|
By:
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:
*set to
|
|
By:
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:
The matchedSince parameter can be omitted in this case.
|
|
By:
Paul,
Back again already? |
|
By:
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:
you snitch Contrarian?
|
|
By:
Feck - are you aware of the bdp forum? It's probably a better resource than here.
http://forum.bdp.betfair.com/ |
|
By:
sorry Contrarian ... i was researching my reply to Feck, while you were answering him, so i didn't see you'd already anwered
![]() |
|
By:
When is the Feckbot due to be launched?
|
|
By:
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:
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:
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 ..... ![]() 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:
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:
I don't want to start coding only to find out later that it's just sh1t documentation.
|
|
By:
Where is Captain Hindsight when you need him?
![]() |
|
By:
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:
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:
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:
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:
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:
Feck,
I'll test it in a bit. I'm just doing the Mainz game at the moment. |
|
By:
Thanks Contrarian. No rush.
|
|
By:
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:
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:
What next version?
|
|
By:
cat,
I'm just assuming that there will be a next version! |
|
By:
Phew! I'm surprised there hasn't been yet, I'm still using v5!
|
|
By:
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:
No problem.
|
|
By:
Good luck with the project Feck. Unless you start pinching money off me of course
![]() |