Generating Candlestick Graphs from GW2 commerce API — Guild Wars 2 Forums
Home API Development

Generating Candlestick Graphs from GW2 commerce API

inblank.9348inblank.9348 Member
edited July 4, 2019 in API Development

Hello everyone, rookie developer here

After been using sites like GW2BLTC and GW2TP for almost a year, I happened to notice that I don't see stock market like visualizations on those tools. So I went around and started to explore the API myself to see if that was possible.

That said, I was happy to see that most of the data I would need comes from the /commerce/ endpoint, and this kind of visualization can be done in a multitude of libraries.

So here come the challenge: as far as I am aware, I would need to keep track of daily prices of items (buy and sell), with a relative small interval between collection, for each of the desired items, which would be expensive in requests (possible banning my ip address due to DoS suspicion), and in data storage (not all items change price in minutes notice).

If possible, I would look for advice in how to deal with these two topics(like a good ratio to make those requests or a good way to store it). I intended to use python as backend for data collection and preprocessing, and javascript for visualization, so if there's some smart way to deal with the requests problem easily please let me know. Also, this may be a stupid idea, so I am open to critique. I was thinking of using firebase as my data storage, but I think I would explode the free quota really soon.

My goals with this are #1 Be able to provide the community with some other tool to help with TP investments, and #2 be able to collect some good amount of GW2 economy data for future analysis.

Thanks in advance with any help or advice, and best regards.

The chrono that doesn't understand alacrity


  • StevenL.3761StevenL.3761 Member ✭✭

    I've seen this kind of thing attempted once before by a person named Dyana Rose:

    Here's an example:

    Unfortunately it doesn't seem to be open source. Perhaps you could try finding a way to contact Dyana?

  • StevenL.3761StevenL.3761 Member ✭✭
  • Leablo.2651Leablo.2651 Member ✭✭✭

    The API cache only updates every 5 minutes so there is no point in querying more often than that. In any case, Anet released the API without any practical restrictions on its use, and performance at least has not been an issue thus far. By principle of the evil bit, if Anet found it necessary to restrict usage they would need to implement such measures on their end regardless and prevent you from exceeding it. The most you might have to do on your end is to check the content of the response to make sure you aren't getting unexpected error messages that could possibly indicate that some restriction has been put in place. To my knowledge, no such thing yet exists.