jemorriso / PySBR

MIT License
76 stars 24 forks source link

OpeningLines for MLB require indexing sb.ids() #6

Closed solomonrb closed 3 years ago

solomonrb commented 3 years ago

Grabbed the CurrentLines for Pinnacle (MLB, sometime in June 2019) and it worked fine with sb.ids('Pinnacle'): closemoneylines = CurrentLines(e.ids(),mlb.market_ids(['moneyline']),sb.ids('Pinnacle'))

Tried the same thing with 'OpeningLines' instead of 'CurrentLines' and I got the following error: TypeError: Expected <class 'int'>, got [20]

I checked and saw Pinnacle's ID was 20, so I just indexed sb.ids('Pinnacle') as shown below: openmoneylines = OpeningLines(e.ids(),mlb.market_ids(['moneyline']),sb.ids('Pinnacle')[0])

Not a big deal but just wanted to point it out in case anyone runs into this issue! Maybe I'm doing something wrong too haha

jemorriso commented 3 years ago

This is actually by design, the server can only handle one sportsbook for OpeningLines, but for CurrentLines it can handle multiple.