These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

Fetching market orders using CREST

First post
Author
Caesar Shepherd
Juro Political Extraction
#1 - 2016-11-01 18:07:19 UTC  |  Edited by: Caesar Shepherd
I'm able to successfully get JSON files from most of the CREST endpoints. For example if I run the following in my linux terminal:

wget -O amarr.json https://crest-tq.eveonline.com/regions/10000043/

Then I indeed get a file containing more links related to the Amarr solar system.

Now when I try to access the market sell orders in Amarr, I get a "403 Forbidden" error. Do I need to register as a developer or something special to gain access? Note, I am aware of the "https://crest-tq.eveonline.com/market/groups/" endpoint but these price estimates aren't accurate enough to be useful for me.

My end goal is to automatically update a giant spreadsheet of all the blueprints I own with the prices of all input and output materials to help me decide what to manufacture each day. Currently, I update the prices by hand but this takes a very long time to do manually. I'm telling you my intentions because I suspect that access to sell orders is blocked specifically to prevent people from doing exactly what I'm trying to do Blink.

Thanks in advance!
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#2 - 2016-11-01 21:20:45 UTC
If you're asking for the sell orders, you're asking for the sell orders for a specific type. As you're not passing that type with it, it's failing.

https://crest-tq.eveonline.com/market/10000043/orders/sell/?type=https://crest-tq.eveonline.com/inventory/types/589/

Is an example of a link which will work.


This does have the downside of requiring you to walk everything you want, and request them all. It takes a while.



https://crest-tq.eveonline.com/market/10000043/orders/all/ gives you _every_ order on the region's market (you have to follow the 'next' href repeatedly, to get all the pages. The Forge has 9, for example)


Another option is to use a site like market.fuzzwork.co.uk where someone has put in the effort to aggregate all the orders down on a regular basis (30 minutes in this case)

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Caesar Shepherd
Juro Political Extraction
#3 - 2016-11-02 17:33:47 UTC  |  Edited by: Caesar Shepherd
Thank you! Tested both links and they worked for me using wget Smile

Which of the first two options is more efficient (the least stressful on CCP's servers) if I am fetching the sell orders for ~200 items?

1) Making individual requests for each item
2) Requesting all of the sell orders in the region (and not using most of them)

Thanks!
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#4 - 2016-11-02 19:48:34 UTC
It's probably pretty much of a wash.

There's caching on all of it. If the items are common, they'll likely be in the cache. the All endpoint will likely also be served from cache.

you're making more requests with the 200, but the results are larger from the All.

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Caesar Shepherd
Juro Political Extraction
#5 - 2017-01-04 02:57:03 UTC  |  Edited by: Caesar Shepherd
Steve Ronuken wrote:
If you're asking for the sell orders, you're asking for the sell orders for a specific type. As you're not passing that type with it, it's failing.

https://crest-tq.eveonline.com/market/10000043/orders/sell/?type=https://crest-tq.eveonline.com/inventory/types/589/

Is an example of a link which will work.


This does have the downside of requiring you to walk everything you want, and request them all. It takes a while.



https://crest-tq.eveonline.com/market/10000043/orders/all/ gives you _every_ order on the region's market (you have to follow the 'next' href repeatedly, to get all the pages. The Forge has 9, for example)


Another option is to use a site like market.fuzzwork.co.uk where someone has put in the effort to aggregate all the orders down on a regular basis (30 minutes in this case)


I want to use the best practices possible. Most EvE crest tutorials say that I should start at the EvE root https://crest-tq.eveonline.com and walk the links until I get to the JSON file I want. I don't see any way to walk to
https://crest-tq.eveonline.com/market/10000043/orders/all/ since the crest root only contains links to "market/groups" and "market/prices". I'm afraid that this link may someday become deprecated or unusable. Could you tell me how to walk to the page with all the orders in a region?

Thanks
Caesar Shepherd
Juro Political Extraction
#6 - 2017-01-04 04:18:28 UTC
Caesar Shepherd wrote:
Could you tell me how to walk to the page with all the orders in a region?

Thanks


Answered my own question:

root -> "https://crest-tq.eveonline.com"
"regions" -> "https://crest-tq.eveonline.com/regions/"
"Domain" -> "https://crest-tq.eveonline.com/regions/10000043/"
"marketOrdersAll" -> "https://crest-tq.eveonline.com/market/10000043/orders/all/"