Commit graph

7 commits

Author SHA1 Message Date
Dagur Valberg Johannsson
d85bc2c9db
Update copyright headers 2026-01-21 12:37:13 +01:00
Dagur Valberg Johannsson
e93d46ec69 Add Cache-Control headers to RPC endpoints for load balancer caching
Introduce CachedJson response wrapper with cache duration based on data mutability:
- CACHE_IMMUTABLE (1 day): historical data with explicit timestamps
- CACHE_BCMR (5 min): token metadata
- CACHE_AGGREGATE (60s): aggregate data that changes with blocks
- CACHE_NONE: real-time data (current price, active pools, latest txs)

Endpoints dynamically select cache duration based on whether time parameters
are explicitly provided (historical/immutable) or defaulted to now (live).
2026-01-21 10:37:55 +01:00
Dagur Valberg Johannsson
2c76bf09c7 Fix incorrect 5XX responses for user input errors
Return proper 4XX status codes for client errors to prevent load balancers
from misinterpreting input validation failures as server errors. Add
centralized ApiResult type and ApiErrorCode enum for consistent handling.
2026-01-21 08:27:57 +01:00
Dagur Valberg Johannsson
007aeb06dd
contrib: Tool for documenting API calls 2025-07-22 13:08:48 +02:00
Dagur Valberg Johannsson
7d9352cf53
Fix clippy issues 2025-07-16 13:52:46 +02:00
jakobsn
b17b8a3947 Resolve "Oracle prices" 2025-06-17 14:04:26 +00:00
Dagur Valberg Johannsson
78e391560f
Added support for delphi oracle
This allows fetching historical asset prices from the blockchain.
2025-05-21 13:33:26 +02:00