Romek.4201:

Is it possible to get the Status from my Items im actual selling in TP?

i mean is it possible to have a list from all my items in TP?

when yes, how can i get this data in an excel sheet?

DarkSpirit.7046:

Is it possible to get the Status from my Items im actual selling in TP?

i mean is it possible to have a list from all my items in TP?

when yes, how can i get this data in an excel sheet?

The answer is yes, but I am not an excel expert so I don’t know how to get this data into excel.

To do this, you need to acquire your guild wars 2 client game session key. Then set it in your cookie when communicating with the TP server.

To view the number of items in your current sell list:

https://tradingpost-live.ncplatform.net/ws/me.json?time=now&type=sell&charid=<your character id guid>&offset=1&count=<how many records you want returned>

You can see your character’s id and your game session key through fiddler. You need to keep your GW2 login session running in the background in order for the session key to not expire.

Romek.4201:

oh thx darkspirit and very nice it is possible
but i dont understand anything^^

can you or someone guide me how i can get the “Items im Selling” as a csv file? (maby with a step by step for idiots or so )

thx

smiley.1438:

this? https://forum-en.guildwars2.com/forum/community/api/Guide-to-the-Black-Lion-Trading-Co-API/

(some programming skills may be required…)

Ryan.9387:

Json is impossible to manage in excel. I think your best option is to have some sort of a program that pulls API data, parses it into csv, and sends it to a text file excel reads.

multivira.7925:

Aren’t there some modules lying about online to parse json in vba (something like this , haven’t personally checked it)? You’d think it would be a common enough problem. In the end you can make anything in VBA that you can make in any other programming language, so it should be entirely possible to do it in excel.

As with making any custom tool, it’ll require some programming knowledge though.

Healix.5819:

can you or someone guide me how i can get the “Items im Selling” as a csv file?

Without using any additional programs, this is how you can pull the listings in a comma separated format:

I’m assuming you’re using Windows with IE7+, Firefox or Chrome.

First, you need to know your session key. Start GW2 and open the trading post. Press CTRL+SHIFT+ESC to bring up the Window’s Task Manager. Under Processes look for a process named awesomium_process.exe. Note that the trading post window must be open in-game. Right click awesomium_process.exe and select Open File Location. This should bring up the gw2cache folder that stores the trading post’s cache files. In the folder should be a data folder and within that folder should be a Cookies file.

Open the Cookies files using notepad. Search for the text tradingpost-live.ncplatform.nets. Your session key is the series of character between the s in nets and the /. Copy it. It should be in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. Note that there may be more than 1 unique session key in the file for the same domain. If this happens, you’ll have to use trial and error or close GW2, delete the Cookies file and start again.

In IE7+, Firefox or Chrome, open the following url:

https://tradingpost-live.ncplatform.net/ws/me.json?time=now&type=sell&offset=1&count=100

You can replace the &count=100 with however many listings you want to pull. The page should display the text ERROR: Invalid authorization.

In your browser, press F12 to open the developer tools. Look for the Console tab. Under the console you should see an area to input text, noted by the >. To run a script in the console, you either need to press enter or click a run/play button.

The first code you want to run is to set your cookie. Take your session key from before and replace XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX in the following code with your key:

document.cookie = "s=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX";

Run the code and refresh the page. If using IE, you’ll need to close the developer tools and reopen it with F12 once the page has been refreshed. The page should now display a bunch of text instead of invalid authorization.

Next, run the following code to format the JSON into CSV:

var o = JSON.parse(document.body.childNodes[0].innerHTML || document.body.innerHTML)
var s = "#item_id, name, rarity, quantity, unit price, listings (buy), offering price, "
+ "listings (sell), asking price, date posted<br/>";
for (var i in o.listings) { var l = o.listings[i]; s += l.data_id + ", \"" + l.name + "\", " + l.rarity_word + ", " + l.quantity 
+ ", " + l.unit_price + ", " + l.buy_count + ", " + l.buy_price + ", " + l.sell_count + ", " + l.sell_price + ", " 
+ l.created + "<br/>" }
document.body.innerHTML = s;

Ryan.9387:

I think the OP wants this to be somewhat automated, rather than long and complex.

Romek.4201:

thx Healix.5819 for this guide – i will work on it

a Question – what language i should look into to automate this?

can it be done with java? Or Visual Basic?
Or something like spidy but offline – can this be done with java or what would be better to learn?^^

smiley.1438:

PHP is easy to learn, very well documented and doesn’t require any compiling and stuff – just a local webserver (e.g. XAMPP) and web browser or the command line

Healix.5819:

Any language that is capable of reading files and network access would be capable of automating that script. Visual Basic, Java or C# could do it fairly easy. Visual Basic is more human readable, which may or may not be more confusing depending on if you’d rather see “If x Then y End If” or “if (x) { y }”. Java, C# and JavaScript all use a similar style, with C# being easier to make Windows applications, whereas Java is easier to make cross-platform applications.

GW2Spidy uses PHP scripts which requires running a PHP capable web server. XAMP is an easy to setup all-in-one server if you wanted that. PHP’s style is similar to C++, which is a little more complex than Java/C#/JavaScript.

All languages use relatively the same style, so once you’ve learned one you should be able to figure out the others. Choosing which one you want to start with is more up to choosing what you want to create (websites, windows or cross-platform apps).