Web APIs Securities
Treasury Security Information
Base URL:
https://www.treasurydirect.gov/TA_WS/
All of the content, documentation, code, and related materials made available to you through the API are subject to these terms. Access to use of the API or its content constitutes acceptance of this Agreement.
Security Endpoint
/securities/Cusip(9#)/Date(MM/DD/YYYY)
You may use any of the Fiscal Service APIs to develop a service or services to search, display, analyze, retrieve, view, and otherwise “get” information from Fiscal Service data.
Parameters
Parameters | Values Allowed | Example | Description |
---|---|---|---|
callback | All alpha-numeric | myCallback | Used by JSONP to wrap function |
format | xhtml, json, jsonp | xhtml | Determines the format that will be returned in the response |
This URL returns data about a specific security identified by CUSIP and issue a date
Example
https://www.treasurydirect.gov/TA_WS/securities/announced?format=html&type=FRN
Auctioned Endpoint
Parameters
Parameters | Values Allowed | Example | Description |
---|---|---|---|
callback | All alpha-numeric | myCallback | Used by JSONP to wrap function |
format | xhtml, json, jsonp | xhtml | Determines the format that will be returned in the response |
pagesize | Numeric only | 2 | Maximum number of results to return |
type | Bill, Note, Bond, CMB, TIPS, FRN | Bill | Used to only display securities of a particular type |
days | Numeric only | 7 | How many days ago you want results for? (Note: days=0 will give you today’s results only) |
reopening | Yes, No | Yes | Used to filter securities by reopening status |
This URL returns data about auctioned securities. Max 250 results. Ordered by auction date (descending), issue date (descending), security term length (ascending)
Example
https://www.treasurydirect.gov/TA_WS/securities/auctioned?format=html&type=FRN
Type Endpoint
/securities/Type(Bill,Note,Bond,CMB,TIPS,FRN)
Parameters
Parameters | Values Allowed | Example | Description |
---|---|---|---|
callback | All alpha-numeric | myCallback | Used by JSONP to wrap function |
format | xhtml, json, jsonp | xhtml | Determines the format that will be returned in the response |
This URL returns data about securities of a particular type
Example
https://www.treasurydirect.gov/TA_WS/securities/FRN?format=html
Search Endpoint
/securities/search
Parameters
Parameters | Values Allowed | Example | Description |
---|---|---|---|
cusip | 9-characters, alpha-numeric | 912796CJ6 | Cusip is represented by 9 character alpha-numeric value. |
startDate | Numeric date in format: MM/DD/YYYY | 01/01/1980 | Start date for date field designated by dateFieldName parameter. |
endDate | Numeric date in format: MM/DD/YYYY | 01/31/1980 | End date for date field designated by dateFieldName parameter. |
dateFieldName | All alpha-numeric | issueDate | Determines which date field to use for startDate and endDate |
callback | All alpha-numeric | myCallback | Used by JSONP to wrap function |
format | json, jsonp, rss, xhtml | xhtml | Determines the format that will be returned in the response |
pagesize | Numeric only | 2 | Maximum number of results to return; you must also include pagenum when using pagesize |
pagenum | Numeric only | 1 | The first page number to display results for; used in combination with page size |
type | Bill, Note, Bond, CMB, TIPS, FRN | Bill | Used to only display securities of a particular type |
days | Numeric only | 7 | How many days ago you want results for? (Note: days=0 will give you today’s results only) |
reopening | Yes, No | Yes | Used to filter securities by reopening status |
Notes:
Accepts parameter names that match camel cased variable names, for example auctionDate=2013-05-25&interestRate=7.5
When using variable names as parameters you can supply a value of notNull, for example auctionDate=notNull
Dates accept a value of "today" without quotes, for example issueDate=today
This URL returns data based on the parameters passed. By default it will display all securities. The list of fields which can be used as parameter names is as follows (when passing parameters remember to make the first letter lower case):
Example
https://www.treasurydirect.gov/TA_WS/securities/search?cusip= 912796CH0&format=html+
Fields
- Cusip
- IssueDate
- SecurityType
- SecurityTerm
- MaturityDate
- InterestRate
- RefCpiOnIssueDate
- AnnouncementDate
- AuctionDate
- XmlFilenameCompetitiveResults
- DatedDate
- RefCpiOnDatedDate
- AccruedInterestPer1000
- AccruedInterestPer100
- AdjustedAccruedInterestPer1000
- AdjustedPrice
- AllocationPercentage
- AllocationPercentageDecimals
- AnnouncedCusip
- AuctionFormat
- AverageMedianDiscountRate
- AverageMedianInvestmentRate
- AverageMedianPrice
- AverageMedianDiscountMargin
- AverageMedianYield
- BackDated
- BackDatedDate
- BidToCoverRatio
- CallDate
- Callable
- CalledDate
- CashManagementBillCMB
- ClosingTimeCompetitive
- ClosingTimeNoncompetitive
- CompetitiveAccepted
- CompetitiveBidDecimals
- CompetitiveTendered
- CompetitiveTendersAccepted
- CorpusCusip
- CpiBaseReferencePeriod
- CurrentlyOutstanding
- DirectBidderAccepted
- DirectBidderTendered
- EstimatedAmountOfPubliclyHeldMaturingSecuritiesByType
- FimaIncluded
- FimaNoncompetitiveAccepted
- FimaNoncompetitiveTendered
- FirstInterestPeriod
- FirstInterestPaymentDate
- FloatingRate
- FrnIndexDeterminationDate
- FrnIndexDeterminationRate
- HighDiscountRate
- HighInvestmentRate
- HighPrice
- HighDiscountMargin
- HighYield
- IndexRatioOnIssueDate
- IndirectBidderAccepted
- IndirectBidderTendered
- InterestPaymentFrequency
- LowDiscountRate
- LowInvestmentRate
- LowPrice
- LowDiscountMargin
- LowYield
- MaturingDate
- MaximumCompetitiveAward
- MaximumNoncompetitiveAward
- MaximumSingleBid
- MinimumBidAmount
- MinimumStripAmount
- MinimumToIssue
- MultiplesToBid
- MultiplesToIssue
- NlpExclusionAmount
- NlpReportingThreshold
- NoncompetitiveAccepted
- NoncompetitiveTendersAccepted
- OfferingAmount
- OriginalCusip
- OriginalDatedDate
- OriginalIssueDate
- OriginalSecurityTerm
- PdfFilenameAnnouncement
- PdfFilenameCompetitiveResults
- PdfFilenameNoncompetitiveResults
- PdfFilenameSpecialAnnouncement
- PricePer100
- PrimaryDealerAccepted
- PrimaryDealerTendered
- Reopening
- SecurityTermDayMonth
- SecurityTermWeekYear
- Series
- SomaAccepted
- SomaHoldings
- SomaIncluded
- SomaTendered
- Spread
- StandardInterestPaymentPer1000
- Strippable
- Term
- TiinConversionFactorPer1000
- Tips
- TotalAccepted
- TotalTendered
- TreasuryRetailAccepted
- TreasuryRetailTendersAccepted
- Type
- UnadjustedAccruedInterestPer1000
- UnadjustedPrice
- UpdatedTimestamp
- XmlFilenameAnnouncement
- XmlFilenameSpecialAnnouncement
- AuctionDateYear
Sample JSON output
[{"cusip":"912796QQQ","issueDate":"2014-02-14T00:00:00","securityType":"Bill","securityTerm":"2-Day","maturityDate":"2014-02-19T00:00:00","interestRate":"","refCpiOnIssueDate":"","refCpiOnDatedDate":"","announcementDate":"2014-02-11T00:00:00","auctionDate":"2014-02-14T00:00:00","auctionDateYear":"2014","datedDate":"","accruedInterestPer1000":"","accruedInterestPer100":"","adjustedAccruedInterestPer1000":"","adjustedPrice":"","allocationPercentage":"31.680000","allocationPercentageDecimals":"2","announcedCusip":"","auctionFormat":"Single-Price","averageMedianDiscountRate":"0.000000","averageMedianInvestmentRate":"","averageMedianPrice":"","averageMedianDiscountMargin":"","averageMedianYield":"","backDated":"","backDatedDate":"","bidToCoverRatio":"3.050000","callDate":"","callable":"","calledDate":"","cashManagementBillCMB":"Yes","closingTimeCompetitive":"11:30 AM","closingTimeNoncompetitive":"11:00 AM","competitiveAccepted":"9897800000","competitiveBidDecimals":"3","competitiveTendered":"30424000000","competitiveTendersAccepted":"Yes","corpusCusip":"","cpiBaseReferencePeriod":"","currentlyOutstanding":"","directBidderAccepted":"1002000000","directBidderTendered":"1006000000","estimatedAmountOfPubliclyHeldMaturingSecuritiesByType":"","fimaIncluded":"Yes","fimaNoncompetitiveAccepted":"3000000","fimaNoncompetitiveTendered":"3000000","firstInterestPeriod":"","firstInterestPaymentDate":"","floatingRate":"No","frnIndexDeterminationDate":"","frnIndexDeterminationRate":"","highDiscountRate":"0.005000","highInvestmentRate":"0.005000","highPrice":"99.999931","highDiscountMargin":"","highYield":"","indexRatioOnIssueDate":"","indirectBidderAccepted":"5626600000","indirectBidderTendered":"22416000000","interestPaymentFrequency":"None","lowDiscountRate":"0.000000","lowInvestmentRate":"","lowPrice":"","lowDiscountMargin":"","lowYield":"","maturingDate":"2014-02-14T00:00:00","maximumCompetitiveAward":"3500000000","maximumNoncompetitiveAward":"5000000","maximumSingleBid":"3500000000","minimumBidAmount":"100","minimumStripAmount":"","minimumToIssue":"100","multiplesToBid":"100","multiplesToIssue":"100","nlpExclusionAmount":"0","nlpReportingThreshold":"3500000000","noncompetitiveAccepted":"100000000","noncompetitiveTendersAccepted":"Yes","offeringAmount":"10000000000","originalCusip":"","originalDatedDate":"","originalIssueDate":"","originalSecurityTerm":"2-Day","pdfFilenameAnnouncement":"A_20140124_3.pdf","pdfFilenameCompetitiveResults":"R_20140127_7.pdf","pdfFilenameNoncompetitiveResults":"","pdfFilenameSpecialAnnouncement":"","pricePer100":"99.999931","primaryDealerAccepted":"3269200000","primaryDealerTendered":"7002000000","reopening":"No","securityTermDayMonth":"2-Day","securityTermWeekYear":"0-Week","series":"","somaAccepted":"0","somaHoldings":"0","somaIncluded":"No","somaTendered":"0","spread":"","standardInterestPaymentPer1000":"","strippable":"","term":"","tiinConversionFactorPer1000":"","tips":"No","totalAccepted":"10000800000","totalTendered":"30527000000","treasuryDirectAccepted":"0","treasuryDirectTendersAccepted":"No","type":"CMB","unadjustedAccruedInterestPer1000":"","unadjustedPrice":"","updatedTimestamp":"2014-02-14T11:30:40","xmlFilenameAnnouncement":"A_20140214_2CMB 2day.xml","xmlFilenameCompetitiveResults":"R_20140127_7CMB2dayretry.xml","xmlFilenameSpecialAnnouncement":""}]
Sample XHTML output
Securities
Cusip | IssueDate | SecurityType | SecurityTerm | MaturityDate | InterestRate | RefCpiOnIssueDate | AnnouncementDate | AuctionDate | AuctionDateYear | DatedDate | RefCpiOnDatedDate | AccruedInterestPer1000 | AccruedInterestPer100 | AdjustedAccruedInterestPer1000 | AdjustedPrice | AllocationPercentage | AllocationPercentageDecimals | AnnouncedCusip | AuctionFormat | AverageMedianDiscountRate | AverageMedianInvestmentRate | AverageMedianPrice | AverageMedianDiscountMargin | AverageMedianYield | BackDated | BackDatedDate | BidToCoverRatio | CallDate | Callable | CalledDate | CashManagementBillCMB | ClosingTimeCompetitive | ClosingTimeNoncompetitive | CompetitiveAccepted | CompetitiveBidDecimals | CompetitiveTendered | CompetitiveTendersAccepted | CorpusCusip | CpiBaseReferencePeriod | CurrentlyOutstanding | DirectBidderAccepted | DirectBidderTendered | EstimatedAmountOfPubliclyHeldMaturingSecuritiesByType | FimaIncluded | FimaNoncompetitiveAccepted | FimaNoncompetitiveTendered | FirstInterestPeriod | FirstInterestPaymentDate | FloatingRate | FrnIndexDeterminationDate | FrnIndexDeterminationRate | HighDiscountRate | HighInvestmentRate | HighPrice | HighDiscountMargin | HighYield | IndexRatioOnIssueDate | IndirectBidderAccepted | IndirectBidderTendered | InterestPaymentFrequency | LowDiscountRate | LowInvestmentRate | LowPrice | LowDiscountMargin | LowYield | MaturingDate | MaximumCompetitiveAward | MaximumNoncompetitiveAward | MaximumSingleBid | MinimumBidAmount | MinimumStripAmount | MinimumToIssue | MultiplesToBid | MultiplesToIssue | NlpExclusionAmount | NlpReportingThreshold | NoncompetitiveAccepted | NoncompetitiveTendersAccepted | OfferingAmount | OriginalCusip | OriginalDatedDate | OriginalIssueDate | OriginalSecurityTerm | PdfFilenameAnnouncement | PdfFilenameCompetitiveResults | PdfFilenameNoncompetitiveResults | PdfFilenameSpecialAnnouncement | PricePer100 | PrimaryDealerAccepted | PrimaryDealerTendered | Reopening | SecurityTermDayMonth | SecurityTermWeekYear | Series | SomaAccepted | SomaHoldings | SomaIncluded | SomaTendered | Spread | StandardInterestPaymentPer1000 | Strippable | Term | TiinConversionFactorPer1000 | Tips | TotalAccepted | TotalTendered | TreasuryDirectAccepted | TreasuryDirectTendersAccepted | Type | UnadjustedAccruedInterestPer1000 | UnadjustedPrice | XmlFilenameAnnouncement | XmlFilenameCompetitiveResults | XmlFilenameSpecialAnnouncement |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
912796QQQ | 2014-02-14T00:00:00 | Bill | 2-Day | 2014-02-19T00:00:00 | 2014-02-11T00:00:00 | 2014-02-14T00:00:00 | 2014 | 31.680000 | 2 | Single-Price | 0.000000 | 3.050000 | Yes | 11:30 AM | 11:00 AM | 9897800000 | 3 | 30424000000 | Yes | 1002000000 | 1006000000 | Yes | 3000000 | 3000000 | No | 0.005000 | 0.005000 | 99.999931 | 5626600000 | 22416000000 | None | 0.000000 | 2014-02-14T00:00:00 | 3500000000 | 5000000 | 3500000000 | 100 | 100 | 100 | 100 | 0 | 3500000000 | 100000000 | Yes | 10000000000 | 2-Day | A_20140124_3.pdf | R_20140127_7.pdf | 99.999931 | 3269200000 | 7002000000 | No | 2-Day | 0-Week | 0 | 0 | No | 0 | No | 10000800000 | 30527000000 | 0 | No | CMB | A_20140214_2CMB 2day.xml | R_20140127_7CMB2dayretry.xml |