If you don't mind my asking, how did you go about mankind this? How did you go about unearthing the API?
This type of tinkering seems like something I'd REALLY enjoy playing with! But I've no idea how to get started. I'm just a back end developer who lives tinkering but doesn't quite have the expertise.
If the website has an API, just use it directly. If not...
Load up the website in question, open your browser's debug tools' network tab, and perform each action that you'd like to be able to programatically do. Record the destination host/path, request type, and all the params that can be sent to it. Then, implement a function in your language of choice for each action that you want to be able to do (some actions require multiple requests).
Package up the functions into a class/library/whatever and extract out common functionality. Then post it on HN for lots of karma and feedback.
For a simple starter task, create an account on http://www.nationstates.net and write a bot which logs in each day and randomly picks a choice for each decision you are asked to make for your country.
Even easier way to log requests is to use something to man-in-the-middle your own connection, like MITMProxy (which, coincidentally, is written in Python).
I've used it a lot to unearth APIs and make programs that utilize them.
In Guild Wars 2's case, there's a significant portion of the API made available to the public, including the trading post. https://wiki.guildwars2.com/wiki/API:Main
I don't believe this includes "write" operations like buying or selling, but since the in-game trading post communicates through the same web-based, it probably wouldn't be too much of a stretch to piece it together.
I attached a small DLL at runtime which just called pyeval with a little bootstrap REPL running over a socket. Then I'd connect to it and use pythons introspection abilities to poke around the internal services and their methods. It took some tinkering, but I have no reversing or hacking experience, so it wasn't that hard.
This type of tinkering seems like something I'd REALLY enjoy playing with! But I've no idea how to get started. I'm just a back end developer who lives tinkering but doesn't quite have the expertise.