apiverve / treasuryyields
Treasury Yields provides current and historical US Treasury constant-maturity market yields across the full curve (1-month through 30-year), plus TIPS real yields. Paid plans add curve spreads, inversion flags, the curve's shape and breakeven inflation for yield curve analysis.
Package info
github.com/apiverve/treasuryyields-api
Language:Java
pkg:composer/apiverve/treasuryyields
Requires
- php: >=7.4
- guzzlehttp/guzzle: ^7.0
Requires (Dev)
- phpunit/phpunit: ^9.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Treasury Yields provides current and historical US Treasury constant-maturity market yields across the full curve (1-month through 30-year), plus TIPS real yields. Paid plans add curve spreads, inversion flags, the curve's shape and breakeven inflation for yield curve analysis.
The Treasury Yields API provides a simple, reliable way to integrate treasury yields functionality into your applications. Built for developers who need production-ready treasury yields capabilities without the complexity of building from scratch.
Quick Start
Using JavaScript
async function callTreasuryYieldsAPI() { try { const response = await fetch('https://api.apiverve.com/v1/treasuryyields', { method: 'GET', headers: { 'x-api-key': 'YOUR_API_KEY_HERE' } }); const data = await response.json(); console.log(data); } catch (error) { console.error('Error:', error); } } callTreasuryYieldsAPI();
Using cURL
curl -X GET "https://api.apiverve.com/v1/treasuryyields" \ -H "x-api-key: YOUR_API_KEY_HERE"
Get your API key: https://apiverve.com
📁 For more examples, see the examples folder
Installation
Choose your preferred programming language:
📦 NPM (JavaScript/Node.js)
npm install @apiverve/treasuryyields
View NPM Package → | Package Code →
🔷 NuGet (.NET/C#)
dotnet add package APIVerve.API.TreasuryYields
View NuGet Package → | Package Code →
🐍 Python (PyPI)
pip install apiverve-treasuryyields
View PyPI Package → | Package Code →
💎 Ruby (RubyGems)
gem install apiverve_treasuryyields
View RubyGems Package → | Package Code →
🐘 PHP (Packagist)
composer require apiverve/treasuryyields
View Packagist Package → | Package Code →
🎯 Dart (pub.dev)
dart pub add apiverve_treasuryyields
View pub.dev Package → | Package Code →
🤖 Android (JitPack)
implementation 'com.github.apiverve:treasuryyields-api:1.0.0'
🐹 Go
go get github.com/apiverve/treasuryyields-api/go
Why Use This API?
| Feature | Benefit |
|---|---|
| Multi-language SDKs | Native packages for JavaScript, Python, C#, Go, and Android |
| Simple Integration | Single API key authentication, consistent response format |
| Production Ready | 99.9% uptime SLA, served from 24 global regions |
| Comprehensive Docs | Full examples, OpenAPI spec, and dedicated support |
Documentation
- 🏠 API Home: Treasury Yields API
- 📚 API Reference: docs.apiverve.com/ref/treasuryyields
- 📖 OpenAPI Spec: openapi.yaml
- 💡 Examples: examples/
What Can You Build?
The Treasury Yields API is commonly used for:
- Web Applications - Add treasury yields features to your frontend or backend
- Mobile Apps - Native SDKs for Android development
- Automation - Integrate with n8n, Zapier, or custom workflows
- SaaS Products - Enhance your product with treasury yields capabilities
- Data Pipelines - Process and analyze data at scale
API Reference
Authentication
All requests require an API key in the header:
x-api-key: YOUR_API_KEY_HERE
Get your API key: https://apiverve.com
Response Format
Every APIVerve endpoint returns the same envelope — check status, then read data:
{
"status": "ok",
"error": null,
"data": { ... }
}
Example Response
A real response from the Treasury Yields API:
{
"status": "ok",
"error": null,
"data": {
"date": "2026-10-23",
"yields": {
"1mo": 4.11,
"3mo": 4.22,
"6mo": 4.3,
"1yr": 4.44,
"2yr": 4.69,
"3yr": 4.75,
"5yr": 4.82,
"7yr": 4.89,
"10yr": 5,
"20yr": 5.37,
"30yr": 5.33
},
"realYields": {
"5yr": 2.34,
"7yr": 2.49,
"10yr": 2.66,
"20yr": 2.94,
"30yr": 3.08
},
"bills": 4.22,
"notes": 5,
"bonds": 5.33,
"tips": 2.66,
"frn": 4.22,
"changes": {
"bills": {
"change1d": 0,
"direction": "unchanged"
},
"notes": {
"change1d": 0.04,
"direction": "up"
},
"bonds": {
"change1d": 0.04,
"direction": "up"
},
"tips": {
"change1d": 0.02,
"direction": "up"
},
"frn": {
"change1d": 0,
"direction": "unchanged"
},
"1mo": {
"change1d": 0,
"direction": "unchanged"
},
"3mo": {
"change1d": 0,
"direction": "unchanged"
},
"6mo": {
"change1d": 0.01,
"direction": "up"
},
"1yr": {
"change1d": 0.03,
"direction": "up"
},
"2yr": {
"change1d": 0.04,
"direction": "up"
},
"3yr": {
"change1d": 0.03,
"direction": "up"
},
"5yr": {
"change1d": 0.04,
"direction": "up"
},
"7yr": {
"change1d": 0.03,
"direction": "up"
},
"10yr": {
"change1d": 0.04,
"direction": "up"
},
"20yr": {
"change1d": 0.05,
"direction": "up"
},
"30yr": {
"change1d": 0.04,
"direction": "up"
}
},
"spread10yr2yr": 0.31,
"spread10yr3mo": 0.78,
"spread30yr5yr": 0.51,
"spread5yr2yr": 0.13,
"inverted10yr2yr": false,
"inverted10yr3mo": false,
"curveShape": "normal",
"breakevenInflation": {
"5yr": 2.48,
"7yr": 2.4,
"10yr": 2.34,
"20yr": 2.43,
"30yr": 2.25
}
}
}
Support & Community
- 🏠 API Home: Treasury Yields API
- 💬 Support: https://apiverve.com/contact
- 🐛 Issues: GitHub Issues
- 📖 Documentation: https://docs.apiverve.com
- 🌐 Website: https://apiverve.com
Contributing
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Security
For security concerns, please review our Security Policy.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
Built with ❤️ by APIVerve
Copyright © 2026 APIVerve. All rights reserved.