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

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

Market Discussions

 
  • Topic is locked indefinitely.
Previous page12
 

Extracting prices from online sources "eve-central" into an excel spreadsheet

Author
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#21 - 2013-06-22 15:13:35 UTC
I've used a url like:
http://api.eve-central.com/api/marketstat?typeid=34&typeid=35&typeid=36&typeid=37&typeid=38&typeid=39&typeid=40®ionlimit=10000002 in the past. (http://preview.tinyurl.com/lfxyybf if the forums munged it)

If you want more items, just add more &typeid= to it.



hit 'from web'
paste the url into the address bar.
hit go
wait. when the xml shows up, hit import.
say ok when it tells you it doesn't refer to a schema
I normally tell it to put it in a new worksheet


Then it's something like:
=VLOOKUP(34,Sheet2!D:AT,38)

to find the percentile sell price



Another option is eve market data. As you can leave off the typeid limiter
http://api.eve-marketdata.com/api/item_prices2.xml?char_name=demo&region_ids=10000002&buysell=s

Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Zeta Zhul
Preemptive Paranoia
#22 - 2013-06-22 15:57:14 UTC  |  Edited by: Zeta Zhul
This is how you do it in google spreadsheet:

Google Docs Spreadsheet example

And while the 50 importxml() limitation does limit you ... you're not actually supposed to do it that way. The function to use is Continue().

Basically for every column you do a query and then subsequent parsing of that requested xml data is done through the Continue() function.

=ImportXML("http://api.eve-marketdata.com/api/importxml_prices2.xml?buysell=s&char_name=Zhombi&station_ids=60003760&type_ids="&JOIN(",",$A4:$A101), "/emd/price")

Basically the URL used concatenates the request for a specific set of typeids that occupy column A. The station_ids is for "Oursulaert III - Federation Navy Testing Facilities" which id = 60011740 while the primary reference being used is Jita-4-4 which id = 60003760. If you want different id for different stations then ask here or download the static data dump and find it.

buysell denotes whether or not this is for buy orders or sell orders.

char_name should _NOT_ be "Zhombi" which is one of my character names but your own. Seriously don't goof on this because if you're causing a problem on the server because of a malformed request then you want to know about it to fix it.

"/emd/price" is the xpath to the queried data.

So the result of this is an updatable spreadsheet that queries eve-marketdata.com for recent buy/sell market order prices to determine the price delta between Jita-4-4 and "Oursulaert III - Federation Navy Testing Facilities". Replace as needed.

BTW the the different colors I use denote whether or not something is a good deal. I use a combination of an IF() function and Conditional Formatting (right mouse click to access).

edit: this isn't meant to be exhaustive or to provide a complete working example. It's just to show the technique. You would have to add some more functions, filtering and checking to make it worthwhile. Not a lot more, but it isn't turnkey.

As always YMMV. .... And buy my overpriced crap! Now!!! :)
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#23 - 2013-06-22 16:02:19 UTC
zlizilz
Brothership Of EVE
#24 - 2013-06-22 16:59:19 UTC
Awesome information posted, perhaps this should be pinned. Seriously this question pops up so often.
Steve Ronuken
Fuzzwork Enterprises
Vote Steve Ronuken for CSM
#25 - 2013-06-22 18:18:23 UTC
zlizilz wrote:
Awesome information posted, perhaps this should be pinned. Seriously this question pops up so often.



How does:
http://www.fuzzwork.co.uk/2013/06/22/importing-price-data-into-spreadsheets/


Look for covering this?



Woo! CSM XI!

Fuzzwork Enterprises

Twitter: @fuzzysteve on Twitter

Taritura
Last Stand Enterprises
#26 - 2013-06-25 06:37:03 UTC  |  Edited by: Taritura
Or...
1. turn on Developer tab > options > show ...
2. On developer tab insert > active x Button , check design mode ....
Double click button insert the text below.
Arkusz2 change to your sheet name.
Forth column has the type id's of things you want to check
The seventh will have the prices. This script will check 9 prices at once.
Changing the Set xmlNodeList = xmlDoc.SelectNodes("//evec_api/marketstat/type/sell/min") you can set what price you want to pull out ..
In MIcrosoft Visual Basic > tools > references check the "Microsoft XML 5.0"

For j = 2 To 500 < change this number to as many rows you have



Quote:
Private Sub CommandButton1_Click()
Dim xmlDoc As Object
Dim xmlNodeList As Object
Dim xmlNodeList2 As Object
Dim myNode As Object

Dim adresik As String

For j = 2 To 500
DoEvents
adresik = CStr("http://eve-central.com/api/marketstat?typeid=" & Sheets("Arkusz2").Cells(j, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 1, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 2, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 3, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 4, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 5, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 6, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 7, 4).Value & "&typeid=" & Sheets("Arkusz2").Cells(j + 8, 4).Value & "&regionlimit=10000002")
Set xmlDoc = CreateObject("MSXML2.DOMDocument.5.0")
xmlDoc.async = False
xmlDoc.Load adresik
Set xmlNodeList = xmlDoc.SelectNodes("//evec_api/marketstat/type/sell/min")
On Error Resume Next
Sheets("Arkusz2").Cells(j, 7).Value = xmlNodeList.Item(0).Text
Sheets("Arkusz2").Cells(j + 1, 7).Value = xmlNodeList.Item(1).Text
Sheets("Arkusz2").Cells(j + 2, 7).Value = xmlNodeList.Item(2).Text
Sheets("Arkusz2").Cells(j + 3, 7).Value = xmlNodeList.Item(3).Text
Sheets("Arkusz2").Cells(j + 4, 7).Value = xmlNodeList.Item(4).Text
Sheets("Arkusz2").Cells(j + 5, 7).Value = xmlNodeList.Item(5).Text
Sheets("Arkusz2").Cells(j + 6, 7).Value = xmlNodeList.Item(6).Text
Sheets("Arkusz2").Cells(j + 7, 7).Value = xmlNodeList.Item(7).Text
Sheets("Arkusz2").Cells(j + 8, 7).Value = xmlNodeList.Item(8).Text
On Error Resume Next
DoEvents
j = j + 8
Next
End Sub
Syrk
Caldari Militia Supply Corps
#27 - 2013-06-26 20:15:11 UTC
Well I used a bunch of different things people pointed out in this thread, and finally finished my spreadsheet. I should have realized that if you could serialize the typeIDs in the URLs for Google Docs, you could do that for Excel as well. :-P

The one problem I ran into is that the Web Query tool in Excel maxes out at 150 characters, and your browser will max out at 1000 characters or so. So I wound up dividing my typeIDs into 4 batches, each of which I put into my browser in different tabs. Each of these batches I then saved as XML files, which I then pulled up in my spreadsheet. Probably nowhere near as elegant as the post immediately above mine, but I just wanted to post what I did for whoever comes after me with similar issues.
Previous page12