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.
To get a full list of your corp’s structures, you require Station Manager (it’s listed on 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/
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???
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.
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, ideally only trigger search based on user actions.