1

I would like to use rozzac90/pinnacle API python wrapper github project for placing automated bet on Pinnacle.
I would like to know, what is the best method for getting the actual main market for an event, if I know the home and away team names. I'm using something like this in order to get the markets:

soccer_events = api.market_data.get_fixtures(29)

for league in soccer_events[u'league']:
    for event in league[u'events']:
        if event[u'status'] == 'I':
            fixtures[i].append(league[u'id'])
            fixtures[i].append(event[u'id'])
            fixtures[i].append(event[u'home'])
            fixtures[i].append(event[u'away'])
            fixtures.append([])
            i=i+1

After that I cycle through the home and away elements for names, and select the best matching. BUT Sometimes if I get the right home and away names the corresponding eventid is not always valid, and that is my main problem. I discovered that there could be multiple eventids associated with the same team names in different fixtures[] location.

Anybody could help me filter only the right and actual events?

Best Regards

Levente
  • 43
  • 1
  • 8

1 Answers1

2

https://github.com/pinnacleapi/pinnacleapi-documentation/blob/master/FAQ.md

How to find associated events? One can use 'parentId' from the Get Fixtures to group associated events to the "parent" event.

A few facts that can help:

We have different events for pregame and live, that can be distinguished by 'liveStatus'. In some cases, we may have more than one live event for the same actual event, but we would never offer the same market on both events at the same time. Parent events are those that don't have 'parentId' Parent events are always pre-game ( 'liveStatus'=0 or 'liveStatus'=2), except in some cases for MLB league and ESports, where live events ('liveStatus'=1) may be missing the 'parentid'

In other words, you see a game as two events - pre-game and live odds.

Learning Always
  • 1,563
  • 4
  • 29
  • 49