GM2 getting HTML/HTTP information on a website

chamaeleon

Member
Hello, I am currently working on a game which requires it to know if the stock market is currently open or not, It needs to go to https://www.stockmarketclock.com/exchanges/nyse/trading-hours and check if the Exchange is open or closed. Iv seen that this may be possible with http_Get but i have no idea where to go, any ideas?
Use the API provided (https://www.stockmarketclock.com/pricing, https://www.stockmarketclock.com/api-documentation.html#stockmarketclock-api), as querying the website would presumably get your game blocked if the abuse is detected. And needless to say, given that the API is not free and requires a key, you should use as server of your own that query the API, instead of embedding the key in your game so that anyone can pick it out and use the API while you pay for it.
 

Homunculus

Member
Opening hours and days are set, why do you need to get this information live from the website to begin with?

With http_get you can download the html code of the page, but seeing how the clock works, it probably won't be of any help since that is probably dynamically generated with JS.

A better solution (other than hardcoding the opening hours) is to use an API as @chamaeleon suggested.
 
Top