Hello, community! I need some strategic advice on efficiency and practicality of my project.
I am setting up a search bar where both stock quotes and cryptocurrencies can be searched and selected. As there is no “one stop shop” plugin for both asset groups my plan is to:
a. create a database and through separate api calls get a list of stock quotes and cryptocurrencies with co-respective tickers.
b. schedule an api workflow and update the prices in database lets say for every five minutes.
Any thoughts? Thank you!
Hey @d.norkus. Hypothetically your approach could work.
However, it might be worth pausing a little longer before diving in on it.
You asked about efficiency so let me suggest two options that I think could be more efficient. Your current plan will see you storing / maintaining / querying large amounts of data via the Bubble database. Avoid this unless really necessary.
So you might consider:
(These aren’t tutorials btw and just concepts… going into the next layer of detail not possible here - but you will be able to figure it out)
-
Connecting to several APIs that, between them, cover off your needs. Then creating an ‘Asset’ Thing in your database which contains skeletal information about the stock. One field would contain a reference to the API service needed for that asset. So, when an item is selected / whenever it is needed, some logic checks which API is needed and the correct call is made.
-
If you want to avoid API calls for now then use Google Sheets to build a set of sheets that contain your data. Google Sheets has lots of finance plugins, including for crytpo, and you can set it up so that the data is always live. There’s then a number of plugins for connecting your Bubble app to Google Sheets and querying the data - I have used Blockspring and Sheetsu in the past for doing this. There’s a good example of this approach here… scroll down to the Asset Tracking chart. This is just linked to a Google Sheet here that I created… very simple example but the approach would hold if you scaled it up. At least for your MVP anyway.
Ed
2 Likes