# ESI Retrieving null-sec market data

**URL:** <https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710>\
**Category:** Third Party Developers\
**Created:** [May 20, 2020, 9:53am UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710 "2020-05-20T09:53:16Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Agnahr](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/agnahr/32/296927_2.png) [@Agnahr](https://forums.eveonline.com/u/Agnahr)\
**Post date:** [May 20, 2020, 9:53am UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/1 "2020-05-20T09:53:16Z")

</div>

I want to retrieve the market data from my alliance null-sec trade hub using the ESI API. The trade hub is a structure, not an NPC station. So my thinking was to call /markets/structures/{structure\_id}. But first, I must get the structure\_id. I have tried a couple of things without success.

I tried the /universe/structures/ request. This gives me a list of structures, but they are all in high-sec. So my second approach was to first retrieve the coporation\_Id of my character with /characters/{character\_id}/ and then invoke /corporations/{corporation\_id}/structures/. However, this return an error with a response body stating “{“error”:“Character does not have required role(s)”}”. Do I need to have in-game roles to get the structure infos? It seems that the data this request provides can all be accessed by logging in my character in game though.

Am I going the right way about this?

---

<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:** [May 20, 2020, 10:15am UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/2 "2020-05-20T10:15:17Z")

</div>

To get a full list of your corp’s structures, you require Station Manager (it’s listed on [esi.evetech.net](http://esi.evetech.net), though it’s not exactly in your face)

If you have something within that structure, the ID will be in your assets api.  
If there are any ranged buy orders, the ID of the structure will be in the region market endpoint. (Ranged buy orders show up on the public feed, as anyone can sell to them)

You are right you need to hit /markets/structures/idgoeshere/

---

<div class="post-metadata">

**Author:** ![Agnahr](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/agnahr/32/296927_2.png) [@Agnahr](https://forums.eveonline.com/u/Agnahr)\
**Post date:** [May 20, 2020, 10:51am UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/3 "2020-05-20T10:51:05Z")

</div>

Thanks for your reply Steve. I can see the comment in the API doc now “Requires one of the following EVE corporation role(s): Director”. I am just a foot soldier who does and goes where is told. I am not going to be a director any time soon… So is there not way to get a null-sec market data without being a director even though anyone (or at least anyone in the alliance) can see it in game???

---

<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:** [May 20, 2020, 12:49pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/4 "2020-05-20T12:49:13Z")

</div>

Just hit up [https://esi.evetech.net/ui/#/Location/get\_characters\_character\_id\_location](https://esi.evetech.net/ui/#/Location/get_characters_character_id_location) while docked there to get the `structure_id`.

---

<div class="post-metadata">

**Author:** ![Agnahr](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/agnahr/32/296927_2.png) [@Agnahr](https://forums.eveonline.com/u/Agnahr)\
**Post date:** [May 20, 2020, 1:22pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/5 "2020-05-20T13:22:31Z")

</div>

Thanks for the tip Blacksmoke. I think the API should at least let us access structures IDs where we have dock-up rights. But in my case, your way of getting it is good enough for me. So thanks again for the info. 😃

---

<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:** [May 20, 2020, 4:01pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/6 "2020-05-20T16:01:19Z")

</div>

The problem is down to the way ACLs work. They’re _really_ efficient 1 to 1. But if you need to check every structure in game, that could take a while.

---

<div class="post-metadata">

**Author:** ![Catherine\_Solenne](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/catherine_solenne/32/206827_2.png) [@Catherine\_Solenne](https://forums.eveonline.com/u/Catherine_Solenne)\
**Post date:** [May 21, 2020, 2:31pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/7 "2020-05-21T14:31:07Z")

</div>

If you know the name of the structure you can also use the authenticated search endpoint at `/characters/{character_id}/search/` to get the ID. Just make sure to stay within the limits mentioned in [this blog post](https://developers.eveonline.com/blog/article/the-esi-api-is-a-shared-resource-do-not-abuse-it), ideally only trigger search based on user actions.

---

<div class="post-metadata">

**Author:** ![Agnahr](https://sea1.discourse-cdn.com/eveonline/user_avatar/forums.eveonline.com/agnahr/32/296927_2.png) [@Agnahr](https://forums.eveonline.com/u/Agnahr)\
**Post date:** [May 23, 2020, 2:51pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/8 "2020-05-23T14:51:14Z")

</div>

Thanks for highlighting this alternative approach. I will consider it to and use it sparsely.

---

<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:** [August 21, 2020, 2:51pm UTC](https://forums.eveonline.com/t/esi-retrieving-null-sec-market-data/242710/9 "2020-08-21T14:51:16Z")

</div>

Closed on August 21, 2020, 2:51pm UTC

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