Last active
March 18, 2025 00:16
-
-
Save sandalsoft/4fe2f2a8fecdb0526d82aeb98119c920 to your computer and use it in GitHub Desktop.
Daily Treasury Statement (DTS) OpenAPI v3 Spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
title: Fiscal Service API | |
description: API for accessing fiscal data from the U.S. Treasury, including operating cash balance, deposits and withdrawals, public debt transactions, and more. | |
version: 1.0.0 | |
servers: | |
- url: https://api.fiscaldata.treasury.gov | |
paths: | |
/services/api/fiscal_service/v1/accounting/dts/operating_cash_balance: | |
get: | |
summary: Retrieve Operating Cash Balance data | |
description: Access data related to the operating cash balance of the U.S. Treasury. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with operating cash balance data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/OperatingCashBalanceData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/deposits_and_withdrawals_of_operating_cash: | |
get: | |
summary: Retrieve Deposits and Withdrawals of Operating Cash data | |
description: Access data on deposits and withdrawals affecting operating cash. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with deposits and withdrawals data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/DepositsAndWithdrawalsData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/public_debt_transactions: | |
get: | |
summary: Retrieve Public Debt Transactions data | |
description: Access data on transactions related to public debt. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with public debt transactions data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/PublicDebtTransactionsData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/adjustment_of_public_debt_transactions_to_cash_basis: | |
get: | |
summary: Retrieve Adjustment of Public Debt Transactions to Cash Basis data | |
description: Access adjustments made to public debt transactions on a cash basis. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with adjustment data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/AdjustmentOfPublicDebtData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/debt_subject_to_limit: | |
get: | |
summary: Retrieve Debt Subject to Limit data | |
description: Access data on debt subject to statutory limits. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with debt subject to limit data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/DebtSubjectToLimitData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/inter_agency_tax_transfers: | |
get: | |
summary: Retrieve Inter-Agency Tax Transfers data | |
description: Access data on tax transfers between agencies. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with inter-agency tax transfers data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/InterAgencyTaxTransfersData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
/services/api/fiscal_service/v1/accounting/dts/income_tax_refunds_issued: | |
get: | |
summary: Retrieve Income Tax Refunds Issued data | |
description: Access data on issued income tax refunds. | |
parameters: | |
- $ref: '#/components/parameters/Fields' | |
- $ref: '#/components/parameters/Filter' | |
- $ref: '#/components/parameters/Sort' | |
- $ref: '#/components/parameters/Format' | |
- $ref: '#/components/parameters/PageNumber' | |
- $ref: '#/components/parameters/PageSize' | |
responses: | |
'200': | |
description: Successful response with income tax refunds data | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
data: | |
type: array | |
items: | |
$ref: '#/components/schemas/IncomeTaxRefundsIssuedData' | |
meta: | |
$ref: '#/components/schemas/Meta' | |
links: | |
$ref: '#/components/schemas/Links' | |
components: | |
parameters: | |
Fields: | |
name: fields | |
in: query | |
description: Comma-separated list of field names to include in the response. If not specified, all fields are returned. | |
required: false | |
schema: | |
type: string | |
example: "record_date,account_type,close_today_bal" | |
Filter: | |
name: filter | |
in: query | |
description: Filters data based on criteria (e.g., 'record_date:eq:2025-03-14'). Supports lt, lte, gt, gte, eq, in. Dates use YYYY-MM-DD format. | |
required: false | |
schema: | |
type: string | |
example: "record_date:eq:2025-03-14" | |
Sort: | |
name: sort | |
in: query | |
description: Sorts fields in ascending or descending order (prefix with '-' for descending, e.g., '-record_date'). | |
required: false | |
schema: | |
type: string | |
example: "-record_date" | |
Format: | |
name: format | |
in: query | |
description: Specifies the response format. | |
required: false | |
schema: | |
type: string | |
enum: ["json", "csv", "xml"] | |
default: "json" | |
PageNumber: | |
name: page[number] | |
in: query | |
description: The page number to retrieve, starting at 1. | |
required: false | |
schema: | |
type: integer | |
default: 1 | |
PageSize: | |
name: page[size] | |
in: query | |
description: Number of records per page. | |
required: false | |
schema: | |
type: integer | |
default: 100 | |
schemas: | |
Meta: | |
type: object | |
properties: | |
count: | |
type: integer | |
description: Number of records in the current response | |
labels: | |
type: object | |
additionalProperties: | |
type: string | |
description: Field names and their display names | |
dataTypes: | |
type: object | |
additionalProperties: | |
type: string | |
description: Data types of the fields | |
dataFormats: | |
type: object | |
additionalProperties: | |
type: string | |
description: Formats of the field values | |
total-count: | |
type: integer | |
description: Total number of records available | |
total-pages: | |
type: integer | |
description: Total number of pages | |
Links: | |
type: object | |
properties: | |
self: | |
type: string | |
description: URL of the current page | |
first: | |
type: string | |
description: URL of the first page | |
prev: | |
type: string | |
description: URL of the previous page | |
nullable: true | |
next: | |
type: string | |
description: URL of the next page | |
nullable: true | |
last: | |
type: string | |
description: URL of the last page | |
OperatingCashBalanceData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
account_type: | |
type: string | |
description: "Type of Account" | |
close_today_bal: | |
type: string | |
description: "Closing Balance Today" | |
open_today_bal: | |
type: string | |
description: "Opening Balance Today" | |
open_month_bal: | |
type: string | |
description: "Opening Balance This Month" | |
open_fiscal_year_bal: | |
type: string | |
description: "Opening Balance This Fiscal Year" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
sub_table_name: | |
type: string | |
description: "Sub Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
DepositsAndWithdrawalsData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
account_type: | |
type: string | |
description: "Type of Account" | |
transaction_type: | |
type: string | |
description: "Transaction Type" | |
transaction_catg: | |
type: string | |
description: "Transaction Category" | |
transaction_catg_desc: | |
type: string | |
description: "Transaction Category Description" | |
transaction_today_amt: | |
type: string | |
description: "Transactions Today" | |
transaction_mtd_amt: | |
type: string | |
description: "Transactions Month to Date" | |
transaction_fytd_amt: | |
type: string | |
description: "Transactions Fiscal Year to Date" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
PublicDebtTransactionsData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
transaction_type: | |
type: string | |
description: "Transaction Type" | |
security_market: | |
type: string | |
description: "Security Marketability" | |
security_type: | |
type: string | |
description: "Security Type" | |
security_type_desc: | |
type: string | |
description: "Security Type Description" | |
transaction_today_amt: | |
type: string | |
description: "Transactions Today" | |
transaction_mtd_amt: | |
type: string | |
description: "Transactions Month to Date" | |
transaction_fytd_amt: | |
type: string | |
description: "Transactions Fiscal Year to Date" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
AdjustmentOfPublicDebtData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
transaction_type: | |
type: string | |
description: "Transaction Type" | |
adj_type: | |
type: string | |
description: "Adjustment Type" | |
adj_type_desc: | |
type: string | |
description: "Adjustment Type Description" | |
adj_today_amt: | |
type: string | |
description: "Adjustments Today" | |
adj_mtd_amt: | |
type: string | |
description: "Adjustments Month to Date" | |
adj_fytd_amt: | |
type: string | |
description: "Adjustments Fiscal Year to Date" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
sub_table_name: | |
type: string | |
description: "Sub Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
DebtSubjectToLimitData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
debt_catg: | |
type: string | |
description: "Debt Category" | |
debt_catg_desc: | |
type: string | |
description: "Debt Category Description" | |
close_today_bal: | |
type: string | |
description: "Closing Balance Today" | |
open_today_bal: | |
type: string | |
description: "Opening Balance Today" | |
open_month_bal: | |
type: string | |
description: "Opening Balance This Month" | |
open_fiscal_year_bal: | |
type: string | |
description: "Opening Balance This Fiscal Year" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
sub_table_name: | |
type: string | |
description: "Sub Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
InterAgencyTaxTransfersData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" | |
classification: | |
type: string | |
description: "Classification" | |
today_amt: | |
type: string | |
description: "Today Amount" | |
mtd_amt: | |
type: string | |
description: "Month to Date Amount" | |
fytd_amt: | |
type: string | |
description: "Fiscal Year to Date Amount" | |
table_nbr: | |
type: string | |
description: "Table Number" | |
table_nm: | |
type: string | |
description: "Table Name" | |
sub_table_name: | |
type: string | |
description: "Sub Table Name" | |
src_line_nbr: | |
type: string | |
description: "Source Line Number" | |
record_fiscal_year: | |
type: string | |
description: "Fiscal Year" | |
record_fiscal_quarter: | |
type: string | |
description: "Fiscal Quarter Number" | |
record_calendar_year: | |
type: string | |
description: "Calendar Year" | |
record_calendar_quarter: | |
type: string | |
description: "Calendar Quarter Number" | |
record_calendar_month: | |
type: string | |
description: "Calendar Month Number" | |
record_calendar_day: | |
type: string | |
description: "Calendar Day Number" | |
IncomeTaxRefundsIssuedData: | |
type: object | |
properties: | |
record_date: | |
type: string | |
description: "Record Date" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment