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.
 

Retrieving market orders for multiple types.

Author
Jai Dark
Jai Dark Industries
#1 - 2015-02-27 22:16:08 UTC
I think I may be doing something incorrectly. While my code for retrieving market orders is behaving fine, and I have the data I want, the amount of time (and api calls) it takes seems off.

I am interested in getting buy and sell orders for a couple of dozen MarketTypes, across five regions. The only way I know how to use the API is to call something like this:

https://crest-tq.eveonline.com/market/10000068/orders/sell/?type=https://crest-tq.eveonline.com/types/16275/

Using this approach I need to make 240 calls : 24 MarketTypes * 5 regions * 2 order types (buy or sell)

These items fall into just two MarketGroups, but I don't think it is possible to retrieve by group. I also do not see a way to get buy and sell orders at the same time, which would at least cut my calls in half.

On a related note, the time it takes to make each call can sometimes exceed a second, for relatively small payloads returned. Should I expect this, or is that unusual?

If there is any advice on how I might do this more efficiently, I would appreciate it.
Ydnari
Estrale Frontiers
#2 - 2015-02-27 22:41:46 UTC
You can't, despite it being an obvious use case. You have to spam the server with thousands of requests, you're not missing anything.

--

Kali Izia
GoomWaffe
#3 - 2015-02-27 22:58:32 UTC
Yeah, the calls do take about a second to complete and that seems to be normal.

Just make your requests asynchronously, there's essentially no rate limit for the market endpoint and it was made to be hammered so don't feel bad about sending your 240 requests all at once.
Jai Dark
Jai Dark Industries
#4 - 2015-02-27 23:33:53 UTC
Thanks for the quick replies. Just knowing that I am not doing this incorrectly is a big help. I will pursue some sort of parrallelism to get better results.
Aineko Macx
#5 - 2015-02-28 08:01:46 UTC  |  Edited by: Aineko Macx
You didn't specify in which language you are coding, but if it's PHP, my just released library does parallel async GETs.
/shameless plug
Jai Dark
Jai Dark Industries
#6 - 2015-02-28 14:55:17 UTC
Well, a few dozen worker threads cut my time down from a couple of minutes to about twenty seconds. That's good enough for me!

Unfortunately I couldn't take advantage of iveeCrest, as I am writing java code, eventually to reside in and android app.