I have data that looks like this:
account_id, timestamp, network, balance
z11ldsm3, 08-26-2023, coinbase, [{'BTC', 1.23',32000}, {'USDC', 12500, 12500'},...]
That list of coins in "balance" can be N rows long, but will contain the coin type, current balance, and total value of holdings at that time per coin in USD. Additionally, there can be up to M wallets.
This value is logged and stored daily, or per user execution. I am assembling transactions from the api data each day, and updating the records.
The problem is that I am not sure that storing it like that in postgres is efficient. I'm seeing some places online that the maximum size for a charvar is 1gb, but that seems heinously large and I'm not sure if that's correct.
Is there any other idea on how to store data in this format? Should I be storing records of those values and then querying from a different table? Should I store it individually per coin?
IE:
account_id, timestamp, network, coin, balance, amount
z11ldsm3, 08-26-2023, coinbase, 'BTC', 1.23,32000
z11ldsm3, 08-26-2023, coinbase, 'USDC', 12500, 12500
Ultimately, this will be displayed as a table of values showing the balance for each wallet, in a similar format to the nested list from above.
Any advice is appreciated.