Questions about making spreadsheet

Questions about making spreadsheet

in Black Lion Trading Co

Posted by: Achilles.6870

Achilles.6870

I’m not 100% sure this is the right forum, but I was wondering:

-Is there a way to get pricing information on items directly from gw2? (as opposed to through gw2spidy)

-Also if using gw2spidy how do you pull a single item’s information (instead of a whole category of them)?

Thanks in advance

Questions about making spreadsheet

in Black Lion Trading Co

Posted by: Mystic.5934

Mystic.5934

1) yes, but I hear it’s VERY complicated. spidy makes it easy for you by doing all the hard work.

2) http://www.gw2spidy.com/api/v0.9/csv/item/30689
you’ll need to replace the 30689 with the item number you’re looking for (not sure how they designated those numbers – probably the order in which they were added to the TP?)

Questions about making spreadsheet

in Black Lion Trading Co

Posted by: Cyto.9401

Cyto.9401

welp i have a google docs spreadsheet that i have been using for quitte while now.
if you want to import your data into a google docs spread sheet you have to go to your document and click tools→script editor and then paste the following code in there:

function getItemSellValue(itemID) {
// base URL for the API that will return JSON for the itemID supplied
Utilities.sleep(15000);
var myUrl = “http://www.gw2spidy.com/api/v0.9/json/item/” + escape(itemID);
// fetches the information from the URL in an HTTPResponse
var jsonData = UrlFetchApp.fetch(myUrl);
//something

// now we convert that response into a string so that we can use it
var jsonString = jsonData.getContentText();
// now, we turn it into a Javascript object for easier handling
// *note: I also remove the “result” wrapper object so we can
// use direct calls on the objects parameters
var jsonObject = JSON.parse(jsonString).result;

var adjustedValue = (jsonObject.min_sale_unit_price);
// finally we return the adjusted min sell value

return adjustedValue;
}

that piece of code, if used in a spreadsheet will return a the amount of copper an item is worth if you but it right away (ergo, someone posted item x for that amount already, and you buy it from him directly)

now press save.

now you want to open a new code tab for the next lines of code:

function getItemBuyValue(itemID) {
// base URL for the API that will return JSON for the itemID supplied
Utilities.sleep(15000);
var myUrl = “http://www.gw2spidy.com/api/v0.9/json/item/” + escape(itemID);
// fetches the information from the URL in an HTTPResponse
var jsonData = UrlFetchApp.fetch(myUrl);

// now we convert that response into a string so that we can use it
var jsonString = jsonData.getContentText();
// now, we turn it into a Javascript object for easier handling
// *note: I also remove the “result” wrapper object so we can
// use direct calls on the objects parameters
var jsonObject = JSON.parse(jsonString).result;

var adjustedValue = (jsonObject.max_offer_unit_price);
// finally we return the adjusted min sell value

return adjustedValue;
}

this piece of code returns an amount of copper. this amount is the highest amount of copper per item of people going “i want to buy item x, y times for z amount of money”

that should get you started just fine.

now lets say you want the price of carrots.
this is the spidy url for carrots: http://www.gw2spidy.com/item/12134
this is the code to get the highest sell value for one carrot: =GetItemSellValue(12134)
the =GetItemSellValue(-) refers to the code, and the number is the number ID of, in this case carrots. you can pick any item that is on gw2spidy and change the number, to the number in the URL of said item.

here is a little bit of my market sheet, to give you an idea on how to do it. i do not claim this is the best way to do it, but it works for me, and i have made all my money using this here market sheet.
http://tinypic.com/view.php?pic=9zn5ht&s=5

and remember, there is 15% TAX on every item you put up in the TP :p add that to your calculations

Questions about making spreadsheet

in Black Lion Trading Co

Posted by: Cyto.9401

Cyto.9401

making your own database is very possible, but hard, and i recommend just using spidy since the items get updated regularly enough.
just wanted to add this to answer your question