# Treasury on Onekey > 8 endpoints for Treasury (8 stable, 0 beta), 5 credits each. Category: Government & public data. One key, one JSON shape. Base URL: https://api.onekey.dev Auth: header `x-api-key: `. Call shape: `GET /v1/{platform}/{endpoint}?{params}`. Every response is `{success, data, metadata, error}`; check `success` first. Cost is in `metadata.credits_charged`. Free when served from cache (0.2 credit for a cached response over 100 KB). Failed and not-found calls are refunded. Status: stable = verified against the live source; beta = not yet verified, fields may be missing. Page: https://onekey.dev/platforms/treasury Reference (Markdown): https://onekey.dev/docs/api/treasury.md All docs: https://onekey.dev/llms.txt ## Canonical fields returned Unified-schema fields (same names on every platform), with how many of the 8 mapped Treasury endpoints return each: - `entity.date` (ISO 8601 date): 8 - `entity.name` (string): 7 - `entity.category` (string): 5 - `entity.createdAt` (ISO 8601 date): 1 - `entity.id` (string): 1 - plus 17 platform-specific fields under `ext.` ## Endpoints ### treasury.auctions US Treasury securities auctions (announced/completed). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/auctions?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.id`, `entity.category`, `entity.name`, `entity.date`, `entity.createdAt`, `ext.maturityDate` - Reference: https://onekey.dev/docs/api/treasury/auctions.md ### treasury.avg_interest_rates Average interest rates on US Treasury securities. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/avg_interest_rates?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `entity.name`, `entity.category`, `ext.avgRatePct` - Reference: https://onekey.dev/docs/api/treasury/avg_interest_rates.md ### treasury.debt_to_penny Total US public debt outstanding, daily. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/debt_to_penny?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `ext.totalDebt`, `ext.heldByPublic`, `ext.intragovernmental` - Reference: https://onekey.dev/docs/api/treasury/debt_to_penny.md ### treasury.exchange_rates Treasury reporting rates of exchange (quarterly, per country-currency). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/exchange_rates?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.name`, `entity.category`, `entity.date`, `ext.symbol`, `ext.rate` - Reference: https://onekey.dev/docs/api/treasury/exchange_rates.md ### treasury.gold_reserve US Treasury-owned gold reserve by facility. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/gold_reserve?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `entity.name`, `entity.category`, `ext.troyOunces`, `ext.bookValue` - Reference: https://onekey.dev/docs/api/treasury/gold_reserve.md ### treasury.interest_expense Interest expense on the public debt by security type. - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/interest_expense?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `entity.name`, `entity.category`, `ext.monthExpense`, `ext.fytdExpense` - Reference: https://onekey.dev/docs/api/treasury/interest_expense.md ### treasury.monthly_statement Monthly Treasury Statement: receipts and outlays (table 1). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/monthly_statement?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `entity.name`, `ext.grossReceipts`, `ext.grossOutlays`, `ext.deficitSurplus` - Reference: https://onekey.dev/docs/api/treasury/monthly_statement.md ### treasury.operating_cash_balance Daily Treasury Statement: operating cash balance (TGA). - Price: 5 credits per fresh call. Status: stable. Returns: a list. - Request: `GET https://api.onekey.dev/v1/treasury/operating_cash_balance?size=5` with header `x-api-key: YOUR_API_KEY` - Parameters: - `size` (string, optional, default 10): Rows (1-100) - Fields returned: `entity.date`, `entity.name`, `ext.openToday`, `ext.openMonth`, `ext.openFiscalYear` - Reference: https://onekey.dev/docs/api/treasury/operating_cash_balance.md ## Sample request ```bash curl "https://api.onekey.dev/v1/treasury/auctions?size=5" \ -H "x-api-key: YOUR_API_KEY" ```