listCompetitions - CompetitionResult

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gus
    Senior Member
    • Jan 2009
    • 134

    #1

    listCompetitions - CompetitionResult

    gus the pedant strikes again! but it may save someone a frustrating Saturday morning:

    In the API-NG Reference Guide it says that the Result of a listCompetitions request returns Competition Result, which contains:
    Competition: Competition

    competitionRegion: String: Region in which this competition is happening

    marketCount: int: Count of markets associated with this competition
    but in fact marketCount is a long.

    it seems trivial, but it was really mucking up my code when I was trying to figure out a way of categorizing the ginormous list of footie matches!

    Another, related point, in listCompetitions, the competitionRegion is returned as a 3 letter string, e.g Great Britain = "GBR", but, in another part of my Menu routine, when I call listEvents and I want to filter on "marketCountries" i have to use "GB" ..."GBR" doesn't work, similarly for Ireland, where listCompetions returns "IRL", but i need to use "IE" in the "marketCountries" filter for listEvents.

    Not sure what the long term consequences (for my code) are, perhaps none, but I'm not optimistic!
  • AlgoTrader
    Junior Member
    • Mar 2012
    • 243

    #2
    If you know JSON a little bit, then you should know there is no int or long there. There is just the Number type. The number is in fact double, and it can represent 53 bits integers that's far above long (32 bit) and little bit less than long long (64bit)
    Betfair Bots Made Easy

    Comment

    Working...
    X