# Using the /types endpoint in ESI

**URL:** <https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812>\
**Category:** Third Party Developers\
**Tags:** esi\
**Created:** [October 21, 2019, 2:24pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812 "2019-10-21T14:24:24Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Churra\_Despotis](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/churra_despotis/32/165781_2.png) [@Churra\_Despotis](https://forums.eveonline.com/u/Churra_Despotis)\
**Post date:** [October 21, 2019, 2:24pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/1 "2019-10-21T14:24:24Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [October 21, 2019, 5:30pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/2 "2019-10-21T17:30:17Z")

</div>

If you want everything, just use [https://esi.evetech.net/ui/#/Market/get\_markets\_region\_id\_orders](https://esi.evetech.net/ui/#/Market/get_markets_region_id_orders) 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 [https://market.fuzzwork.co.uk/api/](https://market.fuzzwork.co.uk/api/).

---

<div class="post-metadata">

**Author:** ![Anderson\_Geten](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/anderson_geten/32/390041_2.png) [@Anderson\_Geten](https://forums.eveonline.com/u/Anderson_Geten)\
**Post date:** [October 21, 2019, 6:27pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/3 "2019-10-21T18:27:20Z")

</div>

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 :  
[https://esi.evetech.net/ui/#/Market/get\_markets\_region\_id\_types](https://esi.evetech.net/ui/#/Market/get_markets_region_id_types)  
lists all the order that are relevant. You don’t care about that. you just call [https://esi.evetech.net/ui/#/Market/get\_markets\_region\_id\_orders](https://esi.evetech.net/ui/#/Market/get_markets_region_id_orders) 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.

---

<div class="post-metadata">

**Author:** ![Churra\_Despotis](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/churra_despotis/32/165781_2.png) [@Churra\_Despotis](https://forums.eveonline.com/u/Churra_Despotis)\
**Post date:** [October 21, 2019, 7:33pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/4 "2019-10-21T19:33:42Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [October 21, 2019, 7:39pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/5 "2019-10-21T19:39:47Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Churra\_Despotis](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/churra_despotis/32/165781_2.png) [@Churra\_Despotis](https://forums.eveonline.com/u/Churra_Despotis)\
**Post date:** [October 21, 2019, 8:03pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/6 "2019-10-21T20:03:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Blacksmoke16](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/blacksmoke16/32/376589_2.png) [@Blacksmoke16](https://forums.eveonline.com/u/Blacksmoke16)\
**Post date:** [October 21, 2019, 8:03pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/7 "2019-10-21T20:03:42Z")

</div>

🤷‍♂️ Is up to you.

---

<div class="post-metadata">

**Author:** ![Churra\_Despotis](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/churra_despotis/32/165781_2.png) [@Churra\_Despotis](https://forums.eveonline.com/u/Churra_Despotis)\
**Post date:** [October 21, 2019, 8:04pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/8 "2019-10-21T20:04:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Steve\_Ronuken](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/steve_ronuken/32/373894_2.png) [@Steve\_Ronuken](https://forums.eveonline.com/u/Steve_Ronuken)\
**Post date:** [October 21, 2019, 9:10pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/9 "2019-10-21T21:10:02Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Churra\_Despotis](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/churra_despotis/32/165781_2.png) [@Churra\_Despotis](https://forums.eveonline.com/u/Churra_Despotis)\
**Post date:** [October 22, 2019, 12:58pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/10 "2019-10-22T12:58:09Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Steve\_Ronuken](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/steve_ronuken/32/373894_2.png) [@Steve\_Ronuken](https://forums.eveonline.com/u/Steve_Ronuken)\
**Post date:** [October 22, 2019, 6:40pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/11 "2019-10-22T18:40:01Z")

</div>

If you’re ignoring perimeter, you’re fine 😃

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/eveonline/original/3X/4/1/41ec4921cbaca7a6f9ea556e7cc20018461eae5e.png) [@system](https://forums.eveonline.com/u/system)\
**Post date:** [January 20, 2020, 6:40pm UTC](https://forums.eveonline.com/t/using-the-types-endpoint-in-esi/196812/12 "2020-01-20T18:40:05Z")

</div>

Closed on January 20, 2020, 6:40pm UTC

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