Help

Re: Anyone having a working financial stock price integration up and running?

6792 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Christian_L
6 - Interface Innovator
6 - Interface Innovator

Hi,
Does anyone have a working integration, where stock prices are automatically (eg timebased refresh) fetched into an airtable sheet, depending on eg ISIN, etc. I just found quite old posts and only one newer video (How to Track Stocks in Airtable - YouTube), but the script link in the video is outdated… So any help with providing a script, etc. would be highly appreciated.

thanks a lot, Chris

9 Replies 9

I don’t know scripting, but you might want to check out DataFetcher.com which has built-in integration with stock prices from Alpha Vantage:

Alternatively, you can take any API on the web that provides financial stock market data, and then use either Make.com or DataFetcher.com to retrieve the stock quote price data from that API.

If Make doesn’t natively support the financial API that you want to use, you can always use their generic HTTP module to make your own custom API calls:

Hi @Christian_L,

No-code approach
I have built an integration using Make.com and financialmodelingprep.com (their full API docs here Free Stock Market API and Financial Statements API - FMP API). They have a very decent free plan, so you can test out if it works for you. Apart from the price tickers, they also offer access to SEC filing data, so could be quite a good way to source quickly bunch of annual report figures if you are looking at fundamentals.

For the no-code version with Make you can checkout my video below:

Code approach:
If would prefer to use the code, you can use a scheduled automation to run a script e.g. daily. The scripting block in extensions, will not work due to CORS with this API.

Below script works with the free version of FMP, so it needs to request stock symbols one by one. If you go for the paid version, you can combine multiple stock symbols in one request /quote/AAPL,META,GOOG etc.

const table = base.getTable("Stock Quotes");
const result = await table.selectRecordsAsync({fields: ['Symbol']});

const baseUrl= "https://financialmodelingprep.com/api/v3/quote/"
const apiKey=  "Your API key here"


let recordsToUpdate = []

for (let record of result.records){
    const stockSymbol  = record.getCellValue("Symbol")
    const request  = await fetch(baseUrl+stockSymbol+"?apikey="+apiKey)
    const data = await request.json()
    console.log(data)
    /*  will return object in this  shape
    [ {
    "symbol" : "AAPL",
    "name" : "Apple Inc.",
    "price" : 151.07,
    "changesPercentage" : 0.5926,
    "change" : 0.89,
    "dayLow" : 149.34,
    "dayHigh" : 151.81,
    "yearHigh" : 182.94,
    "yearLow" : 129.04,
    "marketCap" : 2403236681503,
    "priceAvg50" : 146.617,
    "priceAvg200" : 154.736,
    "volume" : 55916992,
    "avgVolume" : 90413055,
    "exchange" : "NASDAQ",
    "open" : 149.45,
    "previousClose" : 150.18,
    "eps" : 6.05,
    "pe" : 24.97,
    "earningsAnnouncement" : "2023-01-25T10:59:00.000+0000",
    "sharesOutstanding" : 15908100096,
    "timestamp" : 1669237204
    } ]*/


    //adding  records to  batch  update
    if(data[0]) recordsToUpdate.push({
        id:record.id,
        fields: {
            "Price": data[0].price
        }
    })

}

while (recordsToUpdate.length > 0) {
    await table.updateRecordsAsync(recordsToUpdate.slice(0, 50));
    recordsToUpdate = recordsToUpdate.slice(50);
}

I hope that helps!

Christian_L
6 - Interface Innovator
6 - Interface Innovator

Hi @Greg_F and @ScottWorld : thnks a lot for the fast and very detailed inputs! I playes around and finally ended up with combining make.com and yahoo finance API. This provides even more data as I expected, is free and works flawlessly. thnks & all the best!

@Christian_L That’s great! I was actually looking for the documentation for the Yahoo Finance API when I wrote you my original reply above, but I couldn’t find it. Can you point me to Yahoo’s documentation on this?

@ScottWorld I used Yahoo Finance API Guide & Examples. In make.com an http request with the ticker and thats it…

Thanks, I had found that guide too, but I couldn’t find anything official on Yahoo’s website regarding this.

This is fantastic @Greg_F .  Is the code approach specific to airtable or Make?   I'm not familiar with either's scripting approach?   I watched your video and its absolutely excellent.  I'm a long term user of FMP but have struggled with really leveraging it.  This will up my game.   

@lprevost The code approach is what you would use inside of Airtable automation - this could be an alternative to Make. Glad this is useful!

BettyJacksonrg
4 - Data Explorer
4 - Data Explorer

As far as I know, you can set up scheduled refreshes based on ISINs or tickers, and it works smoothly for basic needs. If you’re planning to explore trading tools alongside this, something like a Fast Track Trading Coupon Code might be worth checking out. It’s helped me cut down on costs while experimenting with new setups.