Track Topic
: rss

Topic: GetAllMarkets strangeness.

posts 1–5 of 5
Page 1
?
73 posts
Anyone having any problems getting Euro markets today?
I'm trying to call GetAllMarkets using the following code:

Date now = new Date();
long atm = System.currentTimeMillis();
long oneTwoFive = ((60 * 1000) * 125);
long gtm = atm - oneTwoFive;
now.setTime(gtm);
GregorianCalendar gToday = new GregorianCalendar();
gToday.setTime(now);

GregorianCalendar tomorrow = new GregorianCalendar();
tomorrow.setTime(now);
tomorrow.add(GregorianCalendar.DATE, 1);
DatatypeFactory df = DatatypeFactory.newInstance();
XMLGregorianCalendar xmlGToday = df.newXMLGregorianCalendar(gToday);
XMLGregorianCalendar xmlTomorrow = df.newXMLGregorianCalendar(tomorrow);
request.setFromDate(xmlGToday);
request.setToDate(xmlTomorrow);
APIRequestHeader theHeader = ExHeader.makeHeader();
request.setHeader(theHeader);
ArrayOfInt returnEvents = new ArrayOfInt();
returnEvents.getInt().add(1);
request.setEventTypeIds(returnEvents);
com.betfair.publicapi.types.exchange.v5.GetAllMarketsResp result = port.getAllMarkets(request);

and All I'm getting is a poxy Chile v Venezuala return. Whats more, for some reason it isn't going into the JTable the way it should. Now if I change the request.setFromDate() period to tomorrow and the request.setToDate() period to three days from now, I'm getting results which are doing what they are supposed to do, but for some bizarre reason, I can't seem to get the Germany/Portugal match.

I've tried setting the setEventTypeIds parameter to 14, but I'm still not getting that match. I don't understand whats happening and its driving me insane.

__________________
Slashdot. It's like Digg on slow, but sensible.
?
73 posts
Minor update here:

I've just had a look at the string returned from the GetAllMarkets request re the GermanyPortugal game and there is indeed an oddity to it.

21052444~Match Odds~O~ACTIVE~1213901100000~\Soccer\Euro 2008\Quarter Finals\Fixtures 19 June\Portugal v Germany~/1/4574657/19215516/19221886/19221887/21052444~5~1~CHE~1213905271276~3~1~1.450023758E7~N~Y

According to the documentation, the third last field should be a double which equates to the total matched on the market. What the hell is 1.450023758E7 then?

I have a feeling it is scientific notation, meaning so much money has been matched that the double type can't keep up with it, although that would surprise me if it were so.
__________________
Slashdot. It's like Digg on slow, but sensible.
?
47 posts

Yep scientific notation. 1.450023758 E7 -> shift the . by E number of places e.g.:-
1.450023758
14.50023758 1
145.0023758 2
1450.023758 3
14500.23758 4
145002.3758 5
1450023.758 6
14500237.58 7

14.500,237.58

BMS

?
73 posts
Well something odd was happening - all of a sudden I'm now getting the results back the right way instead of using scientific notation - I would love to know what happened there, but using the free API, there isn't really a way to put them on the spot about it is there?


21054938~Match Odds~O~ACTIVE~1214073900000~\Soccer\Euro 2008\Quarter Finals\Fixtures 21 June\Netherlands v Russia~/1/4574657/19215516/19231797/19231798/21054938~0~1~CHE~1214063923283~3~1~5943866.86~N~Y

__________________
Slashdot. It's like Digg on slow, but sensible.
?
128 posts
Smithy, when i was messing around with the free API, i emailed bdp several times and got good, technical responses. If you login to bdp and click on support tickets, it tells you that you're not subscribed and gives you an email address to contact (bdp@betfair.com i think).

Wink
posts 1–5 of 5
Page 1

This Topic Is Locked To Guest Posts

It's been a while since this topic was active, if you'd like to get it going again, please post as a registered member

join now