From b1f06fb69f3a811334e2a407d0b372ba58fd431b Mon Sep 17 00:00:00 2001 From: benbenbang Date: Mon, 12 Oct 2026 18:54:06 +0800 Subject: [PATCH] docs(fmp-py): clarify base_url and path_prefix URL resolution Document how the base URL origin combines with the `path_prefix` segment (default `"stable"`) to form request paths. The README now explains that `path_prefix` is always appended after `base_url`, and includes a table showing how `quote` resolves under different combinations, including the double-`stable` 404 case and how to set the default origin explicitly. --- crates/fmp-py/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/crates/fmp-py/README.md b/crates/fmp-py/README.md index 127cb8f..6813135 100644 --- a/crates/fmp-py/README.md +++ b/crates/fmp-py/README.md @@ -305,6 +305,19 @@ The rules: `FMP_BASE_URL` only replaces the base URL; the `token` and `FMP_API_KEY` rules above are unchanged. +The base URL is only the origin, plus any proxy path. The `stable` version +segment comes from `path_prefix` (default `"stable"`), which is always added +after it: + +| `base_url` | `path_prefix` | `quote` resolves to | +| --- | --- | --- | +| omitted, or `https://financialmodelingprep.com` | default | `https://financialmodelingprep.com/stable/quote` | +| `https://financialmodelingprep.com/stable` | default | `.../stable/stable/quote`: **404** | +| `https://financialmodelingprep.com/stable` | `""` | `https://financialmodelingprep.com/stable/quote` | + +To set the default explicitly, pass `base_url="https://financialmodelingprep.com"` +without `/stable`. + To read the proxy's cache status and remaining daily budget on a success, pass `on_response`. It is called as `on_response(endpoint_id, status, headers)` after every successful call, from any namespace: