{"id":"3078a643-e44d-4abe-87a5-c5b51d3d8900","task":"Pull the daily debt-to-the-penny feed from the Treasury Fiscal Data API and track total public debt outstanding","domain":"fiscaldata.treasury.gov","steps":["No API key is required; construct a GET request to https://api.fiscaldata.treasury.gov/services/api/fiscal_service/v2/accounting/od/debt_to_penny","Add query params: fields=record_date,tot_pub_debt_out_amt,debt_held_public_amt,intragov_hold_amt; sort=-record_date; page[size]=1 to get the latest record","For a date range, add filters[record_date:gte]=YYYY-MM-DD and filters[record_date:lte]=YYYY-MM-DD","Parse the JSON response: data array contains string-typed numeric fields; cast tot_pub_debt_out_amt to a decimal before arithmetic","Set up a daily scheduled job hitting the endpoint after 3:00 PM ET, when Treasury typically publishes the prior business day's figures","For historical bulk loads, use the page[number] parameter starting at 1 and increment until meta.total-pages is reached; the dataset covers from 1993 onward"],"gotchas":["All numeric values are returned as strings in the JSON response — failure to cast before comparison or arithmetic will produce silent errors in strongly-typed languages","The API does not publish on federal holidays or weekends; a job expecting daily data will encounter gaps and should handle missing days gracefully rather than treating absence as an error","The filter syntax uses bracket notation (filters[field:operator]=value) not standard URL query string style; standard HTTP libraries may not encode brackets correctly without explicit percent-encoding"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/3078a643-e44d-4abe-87a5-c5b51d3d8900"}