Can someone help me with this stock quote script?

Topic Labels: Integrations
1529 1
Showing results for 
Search instead for 
Did you mean: 
6 - Interface Innovator
6 - Interface Innovator

I’m trying to get a stock quote script to work for me. I’m not someone that understands scripts, but I think I have it right. Although something is wrong and not sure what.

The API is from, which I found mentioned in this forum.

When I run it I get this result:

Blockquote Updating stock prices

Updating price of aapl…
Can’t update the price of stock with no name
Can’t update the price of stock with no name
aapl’s price right now is: $undefined


Here is the script I have, with the field names changed to my field names (Symbol, Price, Price Date)

(Sorry for the way the code looks below, not sure how to paste in code)

output.markdown ("# Updating stock prices");

let table = base.getTable (“Holdings”),
records = await table.selectRecordsAsync ();

await Promise.all ( (async record => {

    let stock = record.getCellValue ("Symbol");

    if (! stock) {

        output.text ("Can't update the price of stock with no name");


    output.text (`Updating price of ${stock}...`);

    // make request
    var requestResult = await fetch (
    ).then (r => r.json ());

    // print fetched data
    output.markdown (`${stock}'s price right now is: **$${requestResult.price}**`)

    // update record in table
    return await table.updateRecordAsync (record, {
        "Price": requestResult.price,
        "Price Date": new Date ()

output.markdown ("# Done!");

1 Reply 1
4 - Data Explorer
4 - Data Explorer


I hope you’re doing great!

I would be happy to work with you. Please give me a suitable time to discuss your requirements. looking forward to hearing from you
Thanks and regards