API data for Average Price

I have a spreadsheet that someone created for me, it pulls in price data for any object I paste into it for the 5 trade hubs, i can choose Buy or Sell price. This is great but I want to be able to see the average price of a given item, in a given region (or trade hub) over a selectable period of time, say 1 month or 3 months

Is this possible?

yes. Just get the list of values from ESI and make your own data.
However it’s a bit more complex than just getting the first 30 entries, since some days without a sale will simply not be removed. Instead you need to limit to those with a date greater than date()-30d, and sumproduct the qtty*price , which you then divide by the total of qtty.

This is easily done and cached by a server, I guess maybe some server proposes this as a restfull API.

in the swagger of marketer ( https://api.evemarketer.com/ec/ ) I could not find the meaning of the avg value, maybe ask the dev ?

1 Like

Thanks Anderson, I know just have to put what you said through a translator to understand what you meant :D:D:D

1 Like

the esi market history path allows you to get the historical prices of an item, for a region, for a year.

this is the result of calling it for tritanium(id=34) in TheForge(id=10000002)

this is one of the last entry :

408
average 9.44
date β€œ2020-04-12”
highest 9.61
lowest 8.99
order_count 3466
volume 7108686963

3466 new orders were added on the 2020-04-12, 7108686963 unit were sold, at an average price of 9.44, a max price of 9.61, and a low price of 8.99.
That means on this day, 7108686963Γ—9.44 was spent for tritanium : that the value of the tritanium paid

We are the 2020-04-14 but the day is not done, so you want all the orders from 2020-04-13 and back to 2020-03-14 in order to get the orders.

Then you need to sum up the quantities and the total isk spent for each of those days ; you divide the later by the former, and it gives you the average price of tritanium for the last 30 days before current one.

If you are willing to evaluate the SELL value or BUY value, you need to estimate it using the min and max value. eg if for a day, the average is 9, min is 5, and max is 10, it means we can estimate that (9-5) out of (10-5) of the orders were to sell order. This is not exact, actually it can be kind of very far and can be manipulated, just the same as average value can.

If you want to remove errors and manipulation, I suggest you to remove a few percentile of the highest/lowest day values before making the average. eg you can remove the 5 days out of 30 that have the highest average, and the 5 out of 30 that have the lowest average, THEN use the method I described before on the remaining 20 orders.

1 Like

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