openfigi-sdk 1.0.6 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -45,8 +45,8 @@ console.log(response.data)
45
45
  // Search by CUSIP
46
46
  await searchByCUSIP('037833100')
47
47
 
48
- // Search by ticker symbol
49
- await searchByTicker('AAPL', 'US')
48
+ // Search by ticker symbol (requires securityType2)
49
+ await searchByTicker('AAPL', 'US', { securityType2: 'Common Stock' })
50
50
 
51
51
  // Search by SEDOL
52
52
  await searchBySEDOL('2046251')
@@ -106,6 +106,23 @@ responses.forEach((response, index) => {
106
106
  })
107
107
  ```
108
108
 
109
+ ### Searching by Ticker
110
+
111
+ When using `searchByTicker`, the OpenFIGI API requires `securityType2` to be specified:
112
+
113
+ ```typescript
114
+ import { searchByTicker } from 'openfigi-sdk'
115
+
116
+ // securityType2 is required for ticker searches
117
+ const response = await searchByTicker('AAPL', 'US', { securityType2: 'Common Stock' })
118
+ ```
119
+
120
+ Common `securityType` values: `"Common Stock"`, `"Preferred"`, `"ADR"`, `"ETF"`
121
+ [View all securityType values](https://api.openfigi.com/v3/mapping/values/securityType)
122
+
123
+ Common `securityType2` values: `"Common Stock"`, `"Preferred Stock"`, `"ETP"`, `"REIT"`
124
+ [View all securityType2 values](https://api.openfigi.com/v3/mapping/values/securityType2)
125
+
109
126
  ### Advanced Search Options
110
127
 
111
128
  ```typescript
@@ -256,5 +273,5 @@ Built with modern tools and technologies:
256
273
  - [TypeScript](https://www.typescriptlang.org/) - Type-safe JavaScript
257
274
  - [Vitest](https://vitest.dev/) - Fast unit testing framework
258
275
  - [Biome](https://biomejs.dev/) - Fast formatter and linter
259
- - [tsup](https://tsup.egoist.dev/) - Zero-config TypeScript bundler
276
+ - [tsdown](https://tsdown.dev/) - TypeScript bundler
260
277
  - [Zod](https://zod.dev/) - TypeScript-first validation