@@ -15,20 +15,17 @@ const (
1515 ListTickerNewsPath = "/v2/reference/news"
1616 GetTickerRelatedCompaniesPath = "/v1/related-companies/{ticker}"
1717 GetTickerTypesPath = "/v3/reference/tickers/types"
18-
19- GetMarketHolidaysPath = "/v1/marketstatus/upcoming"
20- GetMarketStatusPath = "/v1/marketstatus/now"
21-
22- ListSplitsPath = "/v3/reference/splits"
23-
24- ListDividendsPath = "/v3/reference/dividends"
25-
26- ListConditionsPath = "/v3/reference/conditions"
27-
28- GetExchangesPath = "/v3/reference/exchanges"
29-
30- GetOptionsContractPath = "/v3/reference/options/contracts/{ticker}"
31- ListOptionsContractsPath = "/v3/reference/options/contracts"
18+ GetMarketHolidaysPath = "/v1/marketstatus/upcoming"
19+ GetMarketStatusPath = "/v1/marketstatus/now"
20+ ListSplitsPath = "/v3/reference/splits"
21+ ListDividendsPath = "/v3/reference/dividends"
22+ ListConditionsPath = "/v3/reference/conditions"
23+ GetExchangesPath = "/v3/reference/exchanges"
24+ GetOptionsContractPath = "/v3/reference/options/contracts/{ticker}"
25+ ListOptionsContractsPath = "/v3/reference/options/contracts"
26+ ListShortInterestPath = "/stocks/v1/short-interest"
27+ ListShortVolumePath = "/stocks/v1/short-volume"
28+ ListTreasuryYieldsPath = "/fed/v1/treasury-yields"
3229)
3330
3431// ReferenceClient defines a REST client for the Polygon reference API.
@@ -210,3 +207,33 @@ func (c *ReferenceClient) ListOptionsContracts(ctx context.Context, params *mode
210207 return res , res .Results , err
211208 })
212209}
210+
211+ // ListShortInterest retrieves short interest data for stocks, including days to cover and average daily volume.
212+ // Note: this method utilizes an experimental API and could experience breaking changes or deprecation.
213+ func (c * ReferenceClient ) ListShortInterest (ctx context.Context , params * models.ListShortInterestParams , options ... models.RequestOption ) * iter.Iter [models.ShortInterest ] {
214+ return iter .NewIter (ctx , ListShortInterestPath , params , func (uri string ) (iter.ListResponse , []models.ShortInterest , error ) {
215+ res := & models.ListShortInterestResponse {}
216+ err := c .CallURL (ctx , http .MethodGet , uri , res , options ... )
217+ return res , res .Results , err
218+ })
219+ }
220+
221+ // ListShortVolume retrieves short volume data for stocks, including venue-specific volumes and short volume ratio.
222+ // Note: this method utilizes an experimental API and could experience breaking changes or deprecation.
223+ func (c * ReferenceClient ) ListShortVolume (ctx context.Context , params * models.ListShortVolumeParams , options ... models.RequestOption ) * iter.Iter [models.ShortVolume ] {
224+ return iter .NewIter (ctx , ListShortVolumePath , params , func (uri string ) (iter.ListResponse , []models.ShortVolume , error ) {
225+ res := & models.ListShortVolumeResponse {}
226+ err := c .CallURL (ctx , http .MethodGet , uri , res , options ... )
227+ return res , res .Results , err
228+ })
229+ }
230+
231+ // ListTreasuryYields retrieves treasury yield data for U.S. Treasury securities at various maturities.
232+ // Note: this method utilizes an experimental API and could experience breaking changes or deprecation.
233+ func (c * ReferenceClient ) ListTreasuryYields (ctx context.Context , params * models.ListTreasuryYieldsParams , options ... models.RequestOption ) * iter.Iter [models.TreasuryYield ] {
234+ return iter .NewIter (ctx , ListTreasuryYieldsPath , params , func (uri string ) (iter.ListResponse , []models.TreasuryYield , error ) {
235+ res := & models.ListTreasuryYieldsResponse {}
236+ err := c .CallURL (ctx , http .MethodGet , uri , res , options ... )
237+ return res , res .Results , err
238+ })
239+ }
0 commit comments