I’ve recently returned to the game and I’m busy updating all my tools to use the new ESI API.
I’d like to keep my local copy of the market history for The Forge region updated daily and I’m currently using the GET /markets/{region_id}history/ endpoint to do so.
I call this endpoint for each type_id, and this is working, but I was wondering if there’s a more efficient way of doing this without retrieving redundant data daily?
If I updated the history for all items yesterday then today I don’t need the history going back a year, I just need the one day I’m missing. Is there a way to do that? Or even better, is there a way to get the history for all item_types for just the last day in a single call?
Thanks @Blacksmoke16, that’s what I’m currently doing, just seems wasteful throwing away data I’m not using. CCP doesn’t mind us doing this request every day for all items in the region?
Yeah, etags won’t help here, because each day there will be a new version that includes the new day’s history as well as a year’s worth of history I already have
Thanks @Ethan02, that’s exactly the issue, I guess it’s a trade-off between the cost of transmitting the data and the cost of filtering the data which could impact caching on the server side. I’ll keep an eye on the GitHub issue and in the meantime just continue filtering the data locally.
The etags wouldnt work entirely well with this endpoint as whenever there’s new data (aka “today”), it’s likely dropping off the oldest entry. That cascade’s every page and etags arent useful.
Now, if it grouped the response by month objects instead, and returned those as “pages” etags would work, as if you’ve already got last july through may historical prices already, you’re just interested in the new ones for June. But then you’d just call the latest month anyways.