r/CodingForBeginners • • 3h ago

Could I code a program that uses real-time data and calculates an average based off of a database? Does that already exist?

I know this a potentially dumb post if it turns out there's already something like this. Also, apologies for the potentially confusing title. My coding knowledge is kind of bare-bones and the project I have in mind is a little convoluted.

I play Magic: The Gathering. I have a lot of cards to trade and/or sell and my LGS hosts periodic trade/sell events that I'd like to contribute to.

Problem: The hypothetical value of cards can fluctuate and can be listed for different prices on different platforms. Example: My showcase full-art "Delney, Streetwise Lookout" card went from being $35 to $50 and I had no idea until I was updating my collection yesterday. Going to each and every website where people sell cards like eBay, TCG Player, etc. in the moment can take a hot minute or more if there's no WiFi/Internet. Plus, I definitely don't have the memory to remember those figures off the top of my head all the time.

Idea: I could a program that can draw from a database like Scryfall or Moxfield with card name and/or number. It would also display price data from those sites if they have it, as well as 2-3 of the most well-known or used websites, then calculate an average price based on those figures. That way, I'm ensuring some degree of fairness.

I've seen people code little life counters, multiple players, play conditions and designations a few times. It made me wonder if I could do the same for something like this.

Does something like this already exist? If not, is it something a beginner could take a whack at? TIA.

1 Upvotes

3 comments sorted by

1

u/OkWelder4682 3h ago

you can do this in one table in any database, there's no referential integrity to worry about.

I have been coding for... A very long time professionally. If you are doing this to learn, then it's one thing. If you're doing it use it... Just use a spreadsheet.

But the thing I wonder about is, given what I understand of your objective, you will have to manually enter data, and price data for each card.

1

u/haperochild 2h ago

Mmm… Okay, that makes sense. I have a better understanding of adding live data into a spreadsheet anyways. I think I will try that. Thank you for the suggestion! /gen

1

u/CorpT 2h ago

This could easily be written. It’s impossible to say if you could do it.