Using the /types endpoint in ESI

I am new to using ESI and endpoints and am wondering how the /market/{region}/types/ endpoint actually works. Is this a list of current buy/sell order type_ids for the whole region? I am currently trying to get a list of everything for sale, in just the main market hubs, and am wanting to keep them separated by station. I think I know how to do this with type_ids but will have to ping ESI A LOT to get the data for prices and such. I know ESI doesn’t have rate limits (at least pretty sure), but is this considered bad practice and get me hung up by CCP? Just wondering if anyone could help.

If you want everything, just use which returns all orders for all types within the given region.

From there you would have to do your grouping based on location_id, as well as aggregate the data to find the lowest sell and highest buy order for each type.

If all you care about is the current buy/sell prices, consider using an aggregate API like

You should not ask for specific type_id.
It’s only useful when you are 100% sure you will only need one or two ids.
As soon as you want 3+ ids, you should download he full market, cache it and filter it later on.

edit :
lists all the order that are relevant. You don’t care about that. you just call once to get the first page and the number of pages, then you get all the pages and merge them, keep them in your cache. You will make 200 ish calls because there are 200 ish pages, and it’s okay.

So what your saying is to do a markets//orders/?datasource=&order_type=sell&page= for every page added to a cache, filter by location, and then get lowest price by item_id, 5 times (one for each major hub)? Just trying to figure out how to separate by item now, as I will be comparing items across hubs.

Thats what you would have to do. No need to filter on order_type if you want both buy and sell.

Again, if all you care about is the end result, just use some already made aggregate API and save yourself the hassle.

and then I can’t do anything if, say, Eve Marketer goes down…

:man_shrugging: Is up to you.

TY for the assist though. I will implement your suggestions. It’s prob more efficient than mine anyway.

bear in mind that the unauthenticated endpoints don’t contain any structure orders (other than ranged buy orders).

If you want structure orders, you’ll need to authenticate and pull each structure’s order set individually.

I’m only doing main trade hubs (Jita, Amarr, Rens, Hek, and Dodi), so that shouldn’t be an issue. If I need to do authentication, I’ll have to research that further as I have no experience with it. Thanks for all the help!

If you’re ignoring perimeter, you’re fine :smiley:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.