Jump to content
  • Sign Up

Generating Candlestick Graphs from GW2 commerce API


Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...