How was this site built and where do they get the gold prices from?

0
8
Asked By CuriousCoder99 On

I'm curious about the construction of this site: [goldpricecanada.ca](https://www.goldpricecanada.ca/). I'm interested in creating something similar and would like to know how they are getting the gold prices. Are they using an API? It's not clear if this site was built using WordPress, custom code, or another method. Any insights would be appreciated!

3 Answers

Answered By DevGuru42 On

This site looks fully custom. If you check the network tab in your browser, you'll see WebSocket connections to a subdomain, which explains how they can update the prices in real-time without needing to refresh the page. Most likely, it’s built with Node.js and Socket.io for handling those live updates. They probably fetch gold price data from a real-time API service. By the way, what kind of site are you planning to create? Are you also going for real-time financial data?

Answered By TechWhiz88 On

It seems like they have their own API and possibly leverage an external paid API for getting gold prices. The styling looks like it's done with Tailwind CSS. My two cents? This website appears to be custom-coded because if it were built on WordPress, the design would probably look better.

Answered By CodeMaster89 On

So, they're using a WebSocket that pushes updated prices every 5 seconds from the server. The server probably fetches that data from an unseen API. Even though they’re using socket.io for their updates, I wouldn't advise using websockets if you're starting fresh—it can be less efficient. If the data won’t be huge, polling might be a better option instead. Also, there’s been this websocket bug in Chrome that's worth knowing about if you go this route.

WebDevNinja77 -

What’s this websocket bug you mentioned? I’ve been dabbling with websockets too. Would love to hear more!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.