query_fiscal_data
Query U.S. Treasury fiscal data with filtering, sorting, and pagination. Specify endpoint, fields, filters, and sort order to get precise data.
Instructions
Query the U.S. Treasury Fiscal Data API. Supports field selection, filtering, sorting, and pagination.
Filter operators: eq (equal), gt, gte, lt, lte, in. Example filter: 'record_date:gte:2024-01-01' Example sort: '-record_date' (descending) Multiple filters: 'country_currency_desc:in:(Canada-Dollar,Mexico-Peso),record_date:gte:2024-01-01'
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | Comma-separated list of fields to sort by. Prefix with '-' for descending. Example: '-record_date' | |
| fields | No | Comma-separated list of field names to return. If omitted, all fields are returned. Example: 'record_date,tot_pub_debt_out_amt' | |
| filter | No | Filter expression. Format: field:operator:value. Multiple: field1:op1:val1,field2:op2:val2. Example: 'record_date:gte:2024-01-01,security_type_desc:eq:Treasury Bills' | |
| endpoint | Yes | The API endpoint path, e.g. '/v2/accounting/od/debt_to_penny' | |
| page_size | No | Number of records per page (1-10000). Default: 100 | |
| page_number | No | Page number (1-indexed). Default: 1 |