Currently, I am utilizing a personalized function to retrieve price data for EVE Online. However, I am encountering an issue where the function is updating every 10-20 minutes, leading to a depletion of my daily URL Fetches quota.
The primary function can be found in a page titled "Warehouse Stock", pulling price data for items listed in the "Item" column. The cell refreshes due to a custom function altering cell B4 in the utility sheet. Whenever this cell undergoes a change, the values in the custom function are updated through an IF/THEN statement. Finally, the prices are loaded into the main sheet and sorted according to the "product" column.
I have disabled recalculation on change and turned off iterative calculation as well.
Below is the custom function:
/**
* Query's Fuzz market API for the given types
* @param {range} A vertical range of type_ids.
* @return maxBuy and minSell for each type_id
* @customfunction
*/
function fuzzApiPriceData(type_ids) {
if (!type_ids) throw 'type_ids is required';
const ids = Array.isArray(type_ids) ? type_ids.map(id => id[0]) : [type_ids];
const fuzz_price_data = JSON.parse(UrlFetchApp.fetch(`https://market.fuzzwork.co.uk/aggregates/?station=60008494&types=${ids.join(',')}`));
return [['minSell', 'maxBuy']].concat(type_ids.map(type_id => [parseFloat(fuzz_price_data[type_id]['sell']['min']), parseFloat(fuzz_price_data[type_id]['buy']['max'])]));
}
https://i.sstatic.net/ZZR3k.png
https://i.sstatic.net/f0Sgr.png