Add futures_quote tool: CBOT price + change since open + on day

New futures_quote(commodity, delivery?) tool wraps the new /api/data/futures
endpoint: reports latest price, today's session open, prior settle, and both
moves (since open and on the day). With a delivery month it resolves the listed
contract; without it, the continuous nearby. Adds client.futures(), fmt_futures(),
tests, and a CHANGELOG entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-29 15:36:56 -04:00
parent 61c1736539
commit 0c9bc3b328
6 changed files with 159 additions and 0 deletions
+4
View File
@@ -70,6 +70,10 @@ def best(commodity: str) -> dict:
return _get("/api/data/best", commodity=commodity)
def futures(commodity: str, delivery: str | None = None) -> dict:
return _get("/api/data/futures", commodity=commodity, delivery=delivery)
def inputs(product: str | None = None) -> dict:
return _get("/api/data/inputs", product=product)