# U.S. Treasury API

> Returns US public debt, interest rates, exchange rates, yield curve, securities auctions and Daily Treasury Statement figures.

Category: Finance & Crypto. Region: US. 11 endpoints at `https://api.hoshime.com/v1/ustreasury/<endpoint>`, `GET` with query parameters, answering `{data, meta}` (see https://hoshime.com/docs/responses.md). Reference: https://hoshime.com/docs/platforms/ustreasury
## GET /v1/ustreasury/debt

Total public debt outstanding to the penny, newest first, one row per day.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `debtHeldByPublic` (string), `intragovernmentalHoldings` (string), `totalPublicDebt` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/debt" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/rates

Average interest rates on Treasury securities by security, newest first.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `averageRate` (number (double)), `date` (string), `security` (string), `securityType` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/rates" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/exchangeRates

Treasury reporting exchange rates per U.S. dollar, newest first, optionally for one country and currency.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `countryCurrency` | string | no | Country and currency as the Treasury writes it, such as Canada-Dollar. Omit for every country. |
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `countryCurrency` (string), `date` (string), `rate` (number (double))

```bash
curl "https://api.hoshime.com/v1/ustreasury/exchangeRates" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/yieldCurve

The daily Treasury par yield curve: the yield in percent of each maturity, from one month to thirty years, newest day first.

Scope: `social:read` · Units: 1 · Cached: 360 min

| Parameter | Type | Required | Description |
|---|---|---|---|
| `year` | integer | no | Calendar year. Defaults to the current year (UTC). (e.g. 2025) |
| `length` | integer | no | Trading days to return, newest first, from 1 to 260. (default 10; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `items` (Curve[]), `items[].date` (string), `items[].month1` (number (double)), `items[].month2` (number (double)), `items[].month3` (number (double)), `items[].month4` (number (double)), `items[].month6` (number (double)), `items[].year1` (number (double)), `items[].year10` (number (double)), `items[].year2` (number (double)), `items[].year20` (number (double)), `items[].year3` (number (double)), `items[].year30` (number (double)), `items[].year5` (number (double)), `items[].year7` (number (double)), `year` (any)

```bash
curl "https://api.hoshime.com/v1/ustreasury/yieldCurve?year=2025&length=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/auctions

Treasury securities auctions, newest first: the auction date, the offering and the bidding results of each issue.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `securityType` | string | no | Security type: Bill, Note or Bond. Default all. (one of Bill, Note, Bond; e.g. Note) |
| `securityTerm` | string | no | Exact security term, such as 13-Week, 2-Year or 10-Year. Default all. (e.g. 10-Year) |
| `cusip` | string | no | Exact CUSIP of one issue. |
| `from` | string | no | Earliest auction date, YYYY-MM-DD. |
| `to` | string | no | Latest auction date, YYYY-MM-DD. |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 500. (default 20; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `auctionDate` (string), `averageMedianYield` (number (double)), `bidToCoverRatio` (number (double)), `cusip` (string), `highDiscountRate` (number (double)), `highInvestmentRate` (number (double)), `highYield` (number (double)), `issueDate` (string), `maturityDate` (string), `offeringAmount` (string), `securityTerm` (string), `securityType` (string), `totalAccepted` (string), `totalTendered` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/auctions?securityType=Note&securityTerm=10-Year&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/dailyTreasuryStatement

Daily Treasury Statement: the Treasury General Account balance, or the deposits and withdrawals of operating cash, one row per account or category and day, newest first.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `table` | string | no | operatingCashBalance: the TGA balances. depositsWithdrawals: the deposits and withdrawals of operating cash. Default operatingCashBalance. (one of operatingCashBalance, depositsWithdrawals; default operatingCashBalance; e.g. operatingCashBalance) |
| `account` | string | no | Exact account type (operatingCashBalance) or transaction category (depositsWithdrawals), such as Treasury General Account (TGA) Opening Balance. Default all. (e.g. Treasury General Account (TGA) Opening Balance) |
| `from` | string | no | Earliest record date, YYYY-MM-DD. |
| `to` | string | no | Latest record date, YYYY-MM-DD. |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `limit` | integer | no | Items per page, 1 to 500. (default 100; e.g. 5) |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `account` (string), `fiscalYearToDateAmount` (string), `monthToDateAmount` (string), `recordDate` (string), `today` (string), `transactionType` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/dailyTreasuryStatement?table=operatingCashBalance&account=Treasury+General+Account+%28TGA%29+Opening+Balance&limit=5" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/interestExpense

Interest expense on the public debt by type of security, per month, newest first.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `category` (string), `date` (string), `fiscalYearToDateAmount` (string), `group` (string), `monthAmount` (string), `type` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/interestExpense" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/goldReserve

The gold reserve of the United States by facility and form, newest first, with its fine troy ounces and book value.

Scope: `social:read` · Units: 1 · Cached: 360 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `bookValue` (string), `date` (string), `facility` (string), `fineTroyOunces` (string), `form` (string), `location` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/goldReserve" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/publicDebt

Public debt outstanding by security type and class, in millions of dollars, newest first.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `heldByPublic` (string), `intragovernmental` (string), `securityClass` (string), `securityType` (string), `total` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/publicDebt" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/buybacks

Treasury buyback operations, newest first: the date, the maturity bucket and the par amount offered and accepted in each.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `issuesAccepted` (string), `maturityBucket` (string), `operationType` (string), `parAccepted` (string), `parOffered` (string), `securityType` (string), `settlementDate` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/buybacks" -H "Authorization: Bearer $HOSHIME_TOKEN"
```

## GET /v1/ustreasury/budget

Federal budget receipts, outlays and deficit for each fiscal month, from the Monthly Treasury Statement, newest report first. A negative deficit is a surplus.

Scope: `social:read` · Units: 1 · Cached: 60 min · Paginated: cursor

| Parameter | Type | Required | Description |
|---|---|---|---|
| `limit` | integer | no | Items per page, 1 to 100. (default 10) |
| `cursor` | string | no | meta.pagination.nextCursor of the previous page. Omit it for the first page. |
| `tunnel` | string | no | Id or name of one of your tunnels: the call reads the source from the machine that runs `hoshime tunnel`, through its own connection. Fails with 409 tunnel_unavailable when no machine is connected. Cannot be combined with proxy. |
| `proxy` | string | no | Your own http:// or https:// proxy, such as http://user:pass@proxy.example.com:8080, on a public address. The call reads the source only through it. |
| `profileId` | string | no | Browser profile whose login the call sends (its cookies), so the source answers as that account. Without tunnel or proxy it leaves through the profile's own residential IP. Needs the browser:read scope. Data read logged in is for your account only. |

Response data fields: `date` (string), `deficit` (string), `fiscalYear` (string), `month` (string), `outlays` (string), `receipts` (string)

```bash
curl "https://api.hoshime.com/v1/ustreasury/budget" -H "Authorization: Bearer $HOSHIME_TOKEN"
```
