Public APIs

Any chance we can get public API’s so I can wire up an app to control my team a little more friendly on my phone. I’m new to ottoneu, so apologies if something like this is out there.

4 Likes

This is super interesting to me but also a very large ask, as you might imagine. One day…

How ridiculous is it to ask for a public Rest API that lets me view and set my own lineups?

Edited: I see I wasn’t the first to ask for this.

I would love a set lineup page that shows me both hitters and pitchers in one screen.

My goal would be able to see and set lineups for one or more teams via my own interface or cURL commands.

I think just two endpoints would give me what I want:

GET roster for team x, on date y – basically all the data that is currently on the Lineups page
POST roster for team x, on date y – to set the lineups page

I assume the body of the post would be a list of player IDs, with position for each one.
Some error checking would have to reject improper position assignment. It would also be nice to have a default behavior that moving a player into a position will move the active player to the bench (unless there is another open spot in the case of C, OF, SP, RP).

If date y is not provided, assume it is today.

I think API end points to GET and POST trade offers and messages would also be helpful, but the roster setting is what I’m really interested in.

2 Likes

I’m considering a slow-auction Ottoneu league and realized that the data entry would be team by team or player by player. An API that would allow me to POST auction results (a json with values for team, player, auction value) would make that task a lot easier.

1 Like

The ability to GET team finances would be nice.

Basically everything in the “Financial Overview” section of this page:

You can somewhat piece this together with the roster export, but that does not offer information on loans or a complete picture of available roster spots.

With respect to leveraging the player-level data in the roster export to inform the Financial Overview table, one piece of missing data is a flag for whether a player was currently on the 60 day IL, suspended, etc. With those data, we’d be able to construct the number of roster spots each team has from the roster export.

So maybe if the roster export contained those data and then there was a new team-level export that had data like cap penalties and loans, then I believe that the roster export would be sufficient for constructing the Financials Overview table in Excel.

In terms of how this would be helpful, for those of us in multiple leagues (I’m in 6) it’s helpful to create my own dashboards in Excel so that I can view multiple leagues. For instance, the first tab on each league’s spreadsheet is a more robust version of the “Financial Summary” table (I add “$ Per Free Spot,” “Hitters’ Salaries,” “Pitchers’ Salaries”, “Hitter/Pitcher Split,” and “Surplus” (based on own projections) as well as calculations for league inflation.

To create this presently, I have to do a lot of manual copy-and-pasting (or data entry) from the “Financial Overview” to get it into Excel, which I will bother to do pre-draft (when everything is static for a while) but it’s too much hassle to keep up once the season got started since everything changes day-to-day. But if there was a team-level financial export, then I could setup my VLOOKUPS in a spreadsheet and just import a new CSV to get a current look at all my leagues.

So my request (or I guess, requests) on this front would be: (a) a team-level CSV export with the Financial Overview data; and (b) add a player IL/suspended/etc flag to the player-level CSV roster export. It would save me some time each off-season and I would probably use it to refresh my Excel spreadsheets during the season. That said, I have no idea if other users would find it useful, so maybe it’s not worth the effort. IDK.

1 Like

Catching up here and still extremely interested in doing this stuff!

So I think what @walt526 is looking for is more of a “give me access to the data so I can do analysis”, which is I think a separate use case from the original request by @sngehl01 which was “give me access to make changes to my team from anywhere”.

The latter requires some auth stuff that I haven’t made super user-friendly but I think some people have figured out how to deal with (@csnowden17 ?). If I can make this a bit easier to work with, I think a lot of the basic stuff is in place - the lineup and roster organizer, for example, already use an API to work.

The former is something that I’m interested in, but could become really taxing on our servers. I am interested in building an Ottoneu Research hub at some point, so I’ll continue to note these suggestions and build them out as I can, but eventually we may get to a tipping point where this kind of thing becomes too expensive to maintain / provide.

1 Like

All that makes sense. I have really no idea what is all involved either in terms of development time or server load. I also realize that my interests are mostly with respect to 5x5 leagues, which is a relatively small subset of the Ottoneu universe.

Maybe look at making some data available for research as a potential marketing opportunity for Ottoneu? For example, Baseball HQ has published SGP denominators based on On Roto’s leagues’ data every year since 2012 (12T AL, 12T NL, 15T mixed). Anecdotally, it seems to me like On Roto is more popular among the BBHQ forum crowd than elsewhere, possibly because a good deal of the stuff that comes out of BBHQ is based on On Roto user data (i.e., it’s not just the SGP denominators that often get referenced in their articles). It seems to me like the modal BBHQ/On Roto user (i.e., analytically inclined and willing to pay for fantasy baseball) is a potential Ottoneu customer. There is a similar synergy between Ottoneu and Rotographs, although I wish that there was more Ottoneu-based content on the latter but it would be great to see more Ottoneu-specific content on sites like PitcherList, FantasyPros, etc. If you make the data more available, it might facilitate more Ottoneu coverage. The kind of person who is paying to read about year-over-year changes in SGP denominators in late December seems to me like someone who would really enjoy Ottoneu (maybe I’m just projecting… but hey, it’s a niche product).

Anyway, NFBC is another example of a fantasy platform that makes some of its data available for marketing purposes. I have no idea whether On Roto or NFBC charge for their data feeds or whether it’s something that they provide to various outlets just for the publicity benefits for their fantasy products. The fact that NFBC data is everywhere leads me to suspect that they do it for free, but you probably know better than me. Anyway, just a thought.

1 Like

Getting Ottoneu average values on to FG player pages is a little away from where we started but I definitely am working on that stuff.

1 Like

Having an output to track accumulated arbitration allocations and annual salary increases would be helpful to analyze a league’s idiosyncratic finances and tendencies. It also might be interesting just to understand league efficiency with regards to allocations.

Technically, this can be tracked today by looping through each rostered player’s transaction log, but this could be…costly, for the server, and take a while to run to completion for the user.

Thanks for considering this Niv!

1 Like

I’ll look at the finance and arb exports this week, if possible.

2 Likes

Hi, sorry…I’m sure there’s an API posted somewhere, but I can’t find it! Thanks.

Ottoneu does not offer public APIs at this time

Look into selenium, a little scripting and you can control your team without needing an API.

A post was split to a new topic: How to programmatically get free agents for a league?