Pages: [1] :: one page |
|
Author |
Thread Statistics | Show CCP posts - 0 post(s) |
Jai Dark
Jai Dark Industries
0
|
Posted - 2015.02.27 22:16:08 -
[1] - Quote
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 Project Wildfire
399
|
Posted - 2015.02.27 22:41:46 -
[2] - Quote
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.
my teapot is ready
|
Kali Izia
GoomWaffe Goonswarm Federation
35
|
Posted - 2015.02.27 22:58:32 -
[3] - Quote
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
0
|
Posted - 2015.02.27 23:33:53 -
[4] - Quote
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
331
|
Posted - 2015.02.28 08:01:46 -
[5] - Quote
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
iveeCrest: A PHP library for CREST || iveeCore: The PHP library for industrial activities
|
Jai Dark
Jai Dark Industries
0
|
Posted - 2015.02.28 14:55:17 -
[6] - Quote
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. |
|
|
|
Pages: [1] :: one page |
First page | Previous page | Next page | Last page |