Eowin Of Rohan.2619:

Hi,

The past transactions history is going to be cut at 90 days.
It would be nice if Anet provides some way of not losing the data :

a) export to CSV : item name; quantity; price; date; item_API_id

b) export to html : table with
- icon (image link to wiki or API image)
- name
- quantity
- price (with gold/silver/copper colors and icons from wiki or API
- time

note : a and b could either be available only until the history is deleted, or available through ©

c) don’t actually delete history. Archive it in another database table that would be accessible through using a new ingame button, or from a new page somewhere on guildwars2.com. Archive could also let do (a) or (b) export after the deadline.

Regards,

Eowyn

ps : I’m not even a trader, but I like to see my past transactions

Alcarin.9024:

The fact that you can view only transactions of the last 90 days doesn’t mean that the old data will be lost.
To be able to export your data are needed TP API and OAuth2, so I don’t think it will be possible soon.
I really hope that old transaction will not be deleted, so once OAuth will be released, old transactions can be gathered trough TP API.

Healix.5819:

“If you want to look further back into your transaction history, you’ll need to do so in the next two weeks!”

That sounds like the data will be deleted. They could archive it, but I doubt they would because of a minority.

If you want to simply save your history now though, you can do so by accessing the TP API using your in-game information.

DavidSev.6978:

Just because it’s not going to be available to us, doesn’t mean it’s not going to be available to them.

There’s no way they are going to delete that much valuable info about the markets, which means there’s the possibility of us regaining access to it in some form in the future.

Technically there’s nothing to stop them having an API that gives us access, or an export button somewheres, although I very much doubt they will.

Healix.5819:

Tutorial

How to pull your complete bought or sold history. Instead of making a single click app to do it, here’s how to do it through your web browser.

1. Obtain your in-game session key

With the game running, open the trading post. Once open, press CTRL+SHIFT+ESC to bring up the Windows Task Manager. Under the processes tab, look for the process awesomium_process.exe. This will only appear while the trading post is open.

Once located, right click and select Open File Location to open the folder in Windows Explorer. Within the gw2cache folder that was just opened, there should be a data folder and within that, a Cookies file. Open Cookies using notepad.

Search the Cookies file for the following: tradingpost-live.ncplatform.nets

There should be a series of number and letters with dashes, which ends with a /. That is the session key that you want to make a copy of.

For example:

tradingpost-live.ncplatform.netsXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX/

Your key is: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX

2. Accessing the trading post

Depending on what web browser you use (IE, FireFox, Chrome), you may encounter minor differences, but they should all work. For this example, I used FireFox.

Open your web browser and go to https://tradingpost-live.ncplatform.net

It should display ERROR: Invalid Authorization.

Press F12 to open the web console. You want to find the input section of the console, which is usually noted by a textbox containing “>” and/or a run button.

You will need your session key from before. In the console, input the following, using your own session key:


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

Refresh the webpage and you should now see the trading post.

3. Accessing your history

There are two types, “buy” and “sell”
There are two times, “now” and “past”

The following url will display 100 item’s that you have bought:

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

Only 100 items will be displayed at a time. To view them all, you must increment the offset until you reach the total amount.

Instead of doing it manually, go back to the web console and input the following code:


var listings = [];

var doRequest = function(type,offset)
{
 listings = [];

 var _doRequest = function(type, offset)
 {
  var xmlhttp=new XMLHttpRequest();

  xmlhttp.onreadystatechange=function()
  {
   if (xmlhttp.readyState==4 && xmlhttp.status==200)
   {
    var e = JSON.parse(xmlhttp.responseText);

    listings = listings.concat(e.listings);

    console.log(parseInt(e.args.offset) + e.listings.length + " of " + e.total);

    if (e.listings.length == 100)
    {
     _doRequest(type, parseInt(e.args.offset) + 100);
    }
    else
    {
     document.body.innerHTML = JSON.stringify(listings);
    }
   }
  }

  xmlhttp.open("GET","https://tradingpost-live.ncplatform.net/ws/me.json?time=past&type="+type+"&offset="+offset+"&count=100",true);
  xmlhttp.send();
 }
 _doRequest(type, offset);
}

Once inputted, run the following to iterate through all bought items:


doRequest("buy",1)

… or all sold items:


doRequest("sell",1)

After running one of the above, it will display the result in JSON format as the webpage. Copy the text to notepad and save it, or do whatever you want with it.

Ryan.9387:

I’m pretty sure you can call count=0 and then you will get a thing which shows the current number of orders. Then call count=that number to get a bloated chunk of json text. At least that is how it works for checking buy/sell orders.

To be honest, if you don’t know how to do this already, you probably lack the skills to use the API to get or even use the data returned. That isn’t to be taken meanly though, just that you should have at least a decent level of programming skill to do it.

Eowin Of Rohan.2619:

Tutorial

Niiiiiiice !

Exactly what I needed :-)

I’ve exported my full buy/sell history for my 2 accounts !
And there is so much detail, I can do whatever I want with the data : load in a database with the use of items API (since the item api ID is there, create an html that looks like the ingame list (since there is even the icon link!).

TYVM

Eowin Of Rohan.2619:

To be honest, if you don’t know how to do this already, you probably lack the skills to use the API to get or even use the data returned. That isn’t to be taken meanly though, just that you should have at least a decent level of programming skill to do it.

Don’t worry, I’m an IT engineer IRL (sometimles IG too^^ – not IT though). I’m already exploiting the event API for my site gw2events.me (which has a big improvements TODO list that I’ll have to give up because of “megaservers”, until the API is changed for them ). I think I can handle a few more json files.
Using the API and reading json files are very simple things regarding “programming skill”

edit : I just realized the thread has been moved to the API forum, hence the tech’ answers
I originally posted in the TP forum because I think that there should be an export function for everyone, since most people who would want to keep their old data will not use API. Two of my solutions were OK for this purpose : “keep data archive and offer an IG button or a guildwars2.com page to access it” and “html export that looks like TP”

Healix.5819:

I’m pretty sure you can call count=0 and then you will get a thing which shows the current number of orders. Then call count=that number to get a bloated chunk of json text. At least that is how it works for checking buy/sell orders.

That works when searching listings, but your history is limited to 100 at a time, regardless of what count you put.

Ryan.9387:

Well I take back my words on both statements.. :/

Ps – gl with your events api.

Eowin Of Rohan.2619:

Hi,

I tried to export again today, but it seems like Anet has added to security that prevents getting the data from an out-of-game browser.
Is there anything I can do to export my history before it gets eaten by that rolling 3-months limit ? (I probably already lost 1 month of history T_T)

Thanks,

Eowyn