From eb7f97a054ff738550b8824043fec16d82d3ad15 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Wed, 14 Jan 2026 16:38:49 -0800 Subject: [PATCH 1/2] container: finance: fetch: add API_VERSION to env --- container/src/finance/lib/internal/fetch/fetch.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container/src/finance/lib/internal/fetch/fetch.php b/container/src/finance/lib/internal/fetch/fetch.php index 3143222..325e9d2 100644 --- a/container/src/finance/lib/internal/fetch/fetch.php +++ b/container/src/finance/lib/internal/fetch/fetch.php @@ -2,7 +2,7 @@ // docker-finance | modern accounting for the power-user // -// Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) +// Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -67,6 +67,7 @@ namespace dfi $env = new utils\Env(); // Fetch (API) + $env->set_env('API_VERSION', getenv('DOCKER_FINANCE_VERSION')); // API version $env->set_env('API_FETCH_TYPE', strtolower($argv[1])); // API type $env->set_env('API_FETCH_SUBTYPE', strtolower($argv[2])); // API subtype $env->set_env('API_FETCH_YEAR', getenv('API_FETCH_YEAR')); // API year (to fetch) From bf235ee5261f4b9ab96bf14af79505a0cda09c66 Mon Sep 17 00:00:00 2001 From: Aaron Fiore Date: Wed, 14 Jan 2026 16:39:18 -0800 Subject: [PATCH 2/2] container: finance: fetch: prices: add User-Agent CoinGecko now returns error 403 without a "descriptive" User-Agent --- .../src/finance/lib/internal/fetch/prices/internal/base.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/container/src/finance/lib/internal/fetch/prices/internal/base.php b/container/src/finance/lib/internal/fetch/prices/internal/base.php index c4ebd3d..017e2dd 100644 --- a/container/src/finance/lib/internal/fetch/prices/internal/base.php +++ b/container/src/finance/lib/internal/fetch/prices/internal/base.php @@ -2,7 +2,7 @@ // docker-finance | modern accounting for the power-user // -// Copyright (C) 2021-2025 Aaron Fiore (Founder, Evergreen Crypto LLC) +// Copyright (C) 2021-2026 Aaron Fiore (Founder, Evergreen Crypto LLC) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -154,6 +154,7 @@ namespace dfi\prices\internal protected function request_impl(string $url, array $header): mixed { $headers = array( + 'User-Agent: docker-finance /' . $this->get_env()->get_env('API_VERSION'), 'Accept: application/json', 'Content-Type: application/json', );