# Invalid ESI Marketorders - how come?

**URL:** <https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182>\
**Category:** Third Party Developers\
**Created:** [September 30, 2018, 12:32pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182 "2018-09-30T12:32:40Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bh0di](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bh0di/32/142123_2.png) [@Bh0di](https://forums.eveonline.com/u/Bh0di)\
**Post date:** [September 30, 2018, 12:32pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/1 "2018-09-30T12:32:40Z")

</div>

Hello everyone,

I noticed that esi returns invalid orders (endpoint: [https://esi.evetech.net/latest/markets/{regionID}/orders/?datasource=tranquility&order\_type=all](https://esi.evetech.net/latest/markets/%7BregionID%7D/orders/?datasource=tranquility&order_type=all)) which cannot possibly exist ingame. These invalid orders are scattered througout eve and not limited to a specific region.

Invalid meaning in this context marketorders for invtypes/items which are “not published”, e.g. they are **not tradeable** through the market **but somehow there are marketorders** for them? Querying e.g. the markethistory for these invtype-ids will produce 404s…

“Not published” invtypes, which have active marketorders throughout different regions:  
[40773, 27014, 47115, 27019, 48080, 42640, 36946, 36948, 48150, 48599, 48151, 48600, 48152, 48153, 47705, 47706, 44187, 47707, 44188, 47708, 44189, 44190, 44191, 44192, 42722, 44194, 44195, 9955, 29668, 44197, 3365, 44198, 44199, 48615, 45736, 47016, 3755, 48116, 48117, 48118, 3638, 30326, 42743, 46007, 46008, 41023]

Waiting for the orders to expire is rather annoying:  
e.g. { **duration=90** , is\_buy\_order=true, **issued=2018-08-23T23:40:45Z** , location\_id=60013261, min\_volume=1, order\_id=5172279785, price=10.01, range=region, system\_id=30001290, type\_id=[48080](https://esi.evetech.net/latest/universe/types/48080/?datasource=tranquility&language=en-us), volume\_remain=1000, volume\_total=1000} meaning that this will be returned till **november** …

Did i miss something substantial? Or is there a bug with the marketorders or with the esi? Please enlighten me!

Fly save!  
Bh0di

---

<div class="post-metadata">

**Author:** ![Golden\_Gnu](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/golden_gnu/32/459734_2.png) [@Golden\_Gnu](https://forums.eveonline.com/u/Golden_Gnu)\
**Post date:** [September 30, 2018, 12:41pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/2 "2018-09-30T12:41:08Z")

</div>

I’m no expert, but, don’t use `is_published` to identify if an item is on the market or not.  
use:  
[https://esi.evetech.net/ui#/Market/get\_markets\_groups](https://esi.evetech.net/ui#/Market/get_markets_groups)  
and then:  
[https://esi.evetech.net/ui#/Market/get\_markets\_groups\_market\_group\_id](https://esi.evetech.net/ui#/Market/get_markets_groups_market_group_id)  
That is the only sure way to make sure if something is on the market or not.

The SDE isn’t even 100% correct

---

<div class="post-metadata">

**Author:** ![Bh0di](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bh0di/32/142123_2.png) [@Bh0di](https://forums.eveonline.com/u/Bh0di)\
**Post date:** [September 30, 2018, 12:59pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/3 "2018-09-30T12:59:13Z")

</div>

Thank your for your reply!

Please have a look at this:  
Item [48080](https://esi.evetech.net/latest/universe/types/48080/?datasource=tranquility&language=en-us), “Mutaplasmid Residue”, is “not published” but assigned to group\_id: 1996  
Group\_id 1996 is in:  
marketroot-\> “Ship SKINs” (1954) -\> Destroyers (1989) -\>“Standard Destroyers” (2035) -\> “Gallente” (1996)

In the ingame-market there is “Mutaplasmid Residue” not listed there. Funny enough: the groups are also storing the itemtypes which are included in the group… and “Mutaplasmid Residue”(48080) [isn’t mentioned there (makes totally sense)](https://esi.evetech.net/latest/markets/groups/1996/?datasource=tranquility&language=en-us).  
Therefore: another bug. Walking the group hierarchy in both directions is also broken…

But back2topic: this item, 48080, is NOT tradeable via market… why are there orders for it in the esi-representation of the market? who placed this orders? HOW? why are they still active? _confused_

---

<div class="post-metadata">

**Author:** ![Golden\_Gnu](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/golden_gnu/32/459734_2.png) [@Golden\_Gnu](https://forums.eveonline.com/u/Golden_Gnu)\
**Post date:** [September 30, 2018, 1:07pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/4 "2018-09-30T13:07:06Z")

</div>

As I said, I’m no expert. According to Steve, published only affect if you can search for the item in-game.  
The specific item (48080) have been changed from tradable to non-tradable recently:

> <https://github.com/GoldenGnu/jeveassets/commit/3634bdb97ea449b542373db2306df5a115f7d9e9#diff-65d6e91377351332f72c3b54eee761c9L68711>

  
I assume that is why there are still orders with it.

---

<div class="post-metadata">

**Author:** ![Bh0di](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bh0di/32/142123_2.png) [@Bh0di](https://forums.eveonline.com/u/Bh0di)\
**Post date:** [September 30, 2018, 1:12pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/5 "2018-09-30T13:12:38Z")

</div>

You are really helping here, appreciate it a lot, thanks!

I assumed something like that (changed from “published” to “not published”), but what I’m asking me is why CCP does not clean up the “to be invalid” orders while chaning the status. I already coded a way around and my app stopped trusting the marketorders… but it annoyed me nonetheless 😕

---

<div class="post-metadata">

**Author:** ![Golden\_Gnu](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/golden_gnu/32/459734_2.png) [@Golden\_Gnu](https://forums.eveonline.com/u/Golden_Gnu)\
**Post date:** [September 30, 2018, 1:34pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/6 "2018-09-30T13:34:30Z")

</div>

It would have been nice if the orders was cleared when changed from tradable to non-tradable, but, I guess, it’s just easier for CCP to leave them and let the expire like any other orders.

if at all possible, avoid using published for anything. It’s not really reliable to determine anything other than if you can search for the item in-game.

Happy to help 🙂

---

<div class="post-metadata">

**Author:** ![Krysenth](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/krysenth/32/58194_2.png) [@Krysenth](https://forums.eveonline.com/u/Krysenth)\
**Post date:** [October 1, 2018, 6:15am UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/7 "2018-10-01T06:15:42Z")

</div>

> [@Bh0di](#):
>
> You are really helping here, appreciate it a lot, thanks!
> 
> I assumed something like that (changed from “published” to “not published”), but what I’m asking me is why CCP does not clean up the “to be invalid” orders while chaning the status. I already coded a way around and my app stopped trusting the marketorders… but it annoyed me nonetheless 😕

Generally speaking, anything contained in the return of [EVE Swagger Interface](https://esi.evetech.net/ui/#/Market/get_markets_region_id_types) could be considered something that can be sold on the market.

Regarding old orders of non-sellables though, it’s much easier for CCP to just let those naturally expire than attempt to remove them by hand, figuratively speaking.

---

<div class="post-metadata">

**Author:** ![Bh0di](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/bh0di/32/142123_2.png) [@Bh0di](https://forums.eveonline.com/u/Bh0di)\
**Post date:** [October 1, 2018, 1:19pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/8 "2018-10-01T13:19:18Z")

</div>

Hey Krysenth,

I’ll have a more deeper look at that group-thingy later, now that you both have brought them up, thanks for the hint! But on the first sight: whats wrong with “published” in the invtypes? It looks like that there are no differences to the groups logic.

> [@Krysenth](#):
>
> […]
> 
> Regarding old orders of non-sellables though, it’s much easier for CCP to just let those naturally expire than attempt to remove them by hand, figuratively speaking.

Well… here you go:  
`delete from t_orders where typeid not in ( select typeid from invtypes where published = true)`  
quick and dirty.  
or more gracefully (if you demand the proper ending of the orders):  
`update t_orders set expirydate="now()+5 minutes" where typeid not in ( select typeid from invtypes where published = true)`

there are plenty ways of cleaning your data. this is just lazyness… 😕

---

<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:** [December 30, 2018, 1:19pm UTC](https://forums.eveonline.com/t/invalid-esi-marketorders-how-come/110182/9 "2018-12-30T13:19:23Z")

</div>

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