finance_dev 0.9.0__py3-none-any.whl

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.
Files changed (486) hide show
  1. finance_dev/__init__.py +18 -0
  2. finance_dev/_hooks/__init__.py +7 -0
  3. finance_dev/_hooks/clientcredentials.py +319 -0
  4. finance_dev/_hooks/oauth2scopes.py +50 -0
  5. finance_dev/_hooks/registration.py +13 -0
  6. finance_dev/_hooks/sdkhooks.py +82 -0
  7. finance_dev/_hooks/types.py +125 -0
  8. finance_dev/_version.py +16 -0
  9. finance_dev/accounts.py +797 -0
  10. finance_dev/alternativedata.py +4830 -0
  11. finance_dev/analytics.py +3757 -0
  12. finance_dev/basesdk.py +393 -0
  13. finance_dev/calendar.py +1523 -0
  14. finance_dev/chart.py +1881 -0
  15. finance_dev/company.py +1105 -0
  16. finance_dev/corporateactions.py +1795 -0
  17. finance_dev/economy.py +1153 -0
  18. finance_dev/errors/__init__.py +94 -0
  19. finance_dev/errors/apierror.py +41 -0
  20. finance_dev/errors/authenticationerrorenvelope.py +43 -0
  21. finance_dev/errors/badrequest.py +34 -0
  22. finance_dev/errors/errorenvelope.py +42 -0
  23. finance_dev/errors/errorresponse.py +45 -0
  24. finance_dev/errors/financedevapierror.py +31 -0
  25. finance_dev/errors/forbidden.py +34 -0
  26. finance_dev/errors/internalservererror.py +35 -0
  27. finance_dev/errors/no_response_error.py +18 -0
  28. finance_dev/errors/notfound.py +34 -0
  29. finance_dev/errors/orderhistorybadrequest.py +35 -0
  30. finance_dev/errors/predorderserrorenvelope.py +42 -0
  31. finance_dev/errors/responsevalidationerror.py +28 -0
  32. finance_dev/errors/unauthorized.py +34 -0
  33. finance_dev/estimates.py +1906 -0
  34. finance_dev/etf.py +1108 -0
  35. finance_dev/filings.py +586 -0
  36. finance_dev/financials.py +4079 -0
  37. finance_dev/history.py +477 -0
  38. finance_dev/httpclient.py +126 -0
  39. finance_dev/indices.py +2308 -0
  40. finance_dev/logos.py +692 -0
  41. finance_dev/market.py +1825 -0
  42. finance_dev/markets.py +952 -0
  43. finance_dev/models/__init__.py +4568 -0
  44. finance_dev/models/accountbalancev2.py +340 -0
  45. finance_dev/models/accountitem.py +78 -0
  46. finance_dev/models/accountposition.py +147 -0
  47. finance_dev/models/aggregatetechnicalindicatorsresponse.py +192 -0
  48. finance_dev/models/analystinsightitem.py +161 -0
  49. finance_dev/models/analystinsightsresponse.py +39 -0
  50. finance_dev/models/apperror.py +123 -0
  51. finance_dev/models/authenticationerrordetail.py +58 -0
  52. finance_dev/models/bankbranchesresponse.py +96 -0
  53. finance_dev/models/basicfinancials.py +243 -0
  54. finance_dev/models/bullbearanalysisresponse.py +150 -0
  55. finance_dev/models/cancelorderop.py +40 -0
  56. finance_dev/models/cancelordrequest_union.py +287 -0
  57. finance_dev/models/cancelordresponse.py +115 -0
  58. finance_dev/models/cashflowstatement.py +290 -0
  59. finance_dev/models/cashflowstatementsresponse.py +61 -0
  60. finance_dev/models/chartbars.py +111 -0
  61. finance_dev/models/chartconfig.py +81 -0
  62. finance_dev/models/chartresolution.py +46 -0
  63. finance_dev/models/companyesgresponse.py +408 -0
  64. finance_dev/models/companyexecutive.py +70 -0
  65. finance_dev/models/companyexecutiveresponse.py +39 -0
  66. finance_dev/models/companypeersresponse.py +38 -0
  67. finance_dev/models/companypresentationresponse.py +96 -0
  68. finance_dev/models/companyprofile.py +255 -0
  69. finance_dev/models/conferencecallsresponse.py +169 -0
  70. finance_dev/models/congressionaltradingresponse.py +138 -0
  71. finance_dev/models/covid19uscasesresponse.py +79 -0
  72. finance_dev/models/createconfigwatchlistop.py +40 -0
  73. finance_dev/models/createwatchlistrequest.py +43 -0
  74. finance_dev/models/dailymarketsummaryresponse.py +73 -0
  75. finance_dev/models/deleteconfigwatchlistbyidop.py +53 -0
  76. finance_dev/models/dividenditem.py +125 -0
  77. finance_dev/models/dividendsresponse.py +61 -0
  78. finance_dev/models/earningrelease.py +291 -0
  79. finance_dev/models/earningscallliveresponse.py +103 -0
  80. finance_dev/models/earningsqualityscoreresponse.py +140 -0
  81. finance_dev/models/earningssurprisesresponse.py +125 -0
  82. finance_dev/models/ebitdaestimatesresponse.py +176 -0
  83. finance_dev/models/ebitestimatesresponse.py +176 -0
  84. finance_dev/models/economicscalendarevent.py +160 -0
  85. finance_dev/models/economicsindicator.py +87 -0
  86. finance_dev/models/epsestimatesresponse.py +176 -0
  87. finance_dev/models/equitydetailsdto.py +569 -0
  88. finance_dev/models/errorcode.py +48 -0
  89. finance_dev/models/etblistresponse.py +43 -0
  90. finance_dev/models/etbsearchrequest.py +21 -0
  91. finance_dev/models/etbsearchresponse.py +43 -0
  92. finance_dev/models/etfcountryallocationresponse.py +113 -0
  93. finance_dev/models/etfholdingsresponse.py +163 -0
  94. finance_dev/models/etfprofileresponse.py +234 -0
  95. finance_dev/models/etfsectorallocationresponse.py +113 -0
  96. finance_dev/models/exchangecode.py +90 -0
  97. finance_dev/models/fdaadvisorycommitteecalendarresponse.py +88 -0
  98. finance_dev/models/filingsimilarityrecord.py +115 -0
  99. finance_dev/models/filingssimilarityindexdatawrapper.py +52 -0
  100. finance_dev/models/filingssimilarityindexresponse.py +42 -0
  101. finance_dev/models/financialratiosresponse.py +252 -0
  102. finance_dev/models/financialsreporteddatawrapper.py +49 -0
  103. finance_dev/models/financialsreportedresponse.py +42 -0
  104. finance_dev/models/financialsrevenuebreakdowndatawrapper.py +49 -0
  105. finance_dev/models/financialsrevenuebreakdownresponse.py +42 -0
  106. finance_dev/models/financialsstatementsdatawrapper.py +44 -0
  107. finance_dev/models/financialsstatementsresponse.py +42 -0
  108. finance_dev/models/financialstatement.py +171 -0
  109. finance_dev/models/financialstatementtype.py +14 -0
  110. finance_dev/models/getaccountbalanceop.py +53 -0
  111. finance_dev/models/getaccountpositionsop.py +53 -0
  112. finance_dev/models/getaccountsresponse.py +22 -0
  113. finance_dev/models/getaggregatetechnicalindicatorsop.py +94 -0
  114. finance_dev/models/getanalystinsightsop.py +164 -0
  115. finance_dev/models/getbankbranchesop.py +53 -0
  116. finance_dev/models/getbaseeventop.py +87 -0
  117. finance_dev/models/getbullbearanalysisop.py +91 -0
  118. finance_dev/models/getcashflowstatementsop.py +564 -0
  119. finance_dev/models/getchartconfigop.py +40 -0
  120. finance_dev/models/getcharthistoryop.py +122 -0
  121. finance_dev/models/getcharttimeop.py +39 -0
  122. finance_dev/models/getcompanyesgop.py +53 -0
  123. finance_dev/models/getcompanyexecutivesop.py +56 -0
  124. finance_dev/models/getcompanymetricsop.py +68 -0
  125. finance_dev/models/getcompanypeersop.py +53 -0
  126. finance_dev/models/getcompanypresentationop.py +56 -0
  127. finance_dev/models/getcompanyprofileop.py +86 -0
  128. finance_dev/models/getconferencecallsop.py +111 -0
  129. finance_dev/models/getconfigwatchlistbyidop.py +53 -0
  130. finance_dev/models/getconfigwatchlistsop.py +40 -0
  131. finance_dev/models/getcongressionaltradingop.py +73 -0
  132. finance_dev/models/getcovid19uscasesop.py +43 -0
  133. finance_dev/models/getdailymarketsummaryop.py +92 -0
  134. finance_dev/models/getdividendsop.py +294 -0
  135. finance_dev/models/getearningscalendarop.py +87 -0
  136. finance_dev/models/getearningscallliveop.py +91 -0
  137. finance_dev/models/getearningsqualityscoreop.py +81 -0
  138. finance_dev/models/getearningssurprisesop.py +80 -0
  139. finance_dev/models/getebitdaestimatesop.py +91 -0
  140. finance_dev/models/getebitestimatesop.py +88 -0
  141. finance_dev/models/geteconomicscalendarop.py +92 -0
  142. finance_dev/models/geteconomicscalendarresponse.py +56 -0
  143. finance_dev/models/getepsestimatesop.py +88 -0
  144. finance_dev/models/getequitydetailsop.py +56 -0
  145. finance_dev/models/getequitydetailsresponse.py +45 -0
  146. finance_dev/models/getetblistop.py +40 -0
  147. finance_dev/models/getetfcountryallocationop.py +80 -0
  148. finance_dev/models/getetfholdingsop.py +96 -0
  149. finance_dev/models/getetfprofileop.py +77 -0
  150. finance_dev/models/getetfsectorallocationop.py +80 -0
  151. finance_dev/models/geteventcontractsop.py +87 -0
  152. finance_dev/models/getfdaadvisorycommitteecalendarop.py +47 -0
  153. finance_dev/models/getfilingssimilarityindexop.py +102 -0
  154. finance_dev/models/getfinancialratiosop.py +612 -0
  155. finance_dev/models/getfinancialstatementsop.py +117 -0
  156. finance_dev/models/getfundownershipop.py +77 -0
  157. finance_dev/models/gethistoricaldataop.py +61 -0
  158. finance_dev/models/gethistoricalesgop.py +53 -0
  159. finance_dev/models/gethistorybatchop.py +74 -0
  160. finance_dev/models/gethistoryop.py +123 -0
  161. finance_dev/models/getincomestatementsop.py +564 -0
  162. finance_dev/models/getindexbarop.py +140 -0
  163. finance_dev/models/getindexbarsop.py +149 -0
  164. finance_dev/models/getindexchartbarsop.py +178 -0
  165. finance_dev/models/getindexrealtimevaluesop.py +94 -0
  166. finance_dev/models/getinflationexpectationsop.py +157 -0
  167. finance_dev/models/getinflationop.py +154 -0
  168. finance_dev/models/getinsidertransactionsop.py +90 -0
  169. finance_dev/models/getinstitutionalownershipop.py +99 -0
  170. finance_dev/models/getinstitutionalportfolioop.py +75 -0
  171. finance_dev/models/getinvestmentthemeop.py +68 -0
  172. finance_dev/models/getipocalendarop.py +63 -0
  173. finance_dev/models/getlobbyingop.py +70 -0
  174. finance_dev/models/getmarketbreadthop.py +40 -0
  175. finance_dev/models/getmarketholidaysop.py +65 -0
  176. finance_dev/models/getmarketstatusop.py +65 -0
  177. finance_dev/models/getmergersandacquisitionsop.py +113 -0
  178. finance_dev/models/getnetinflowop.py +40 -0
  179. finance_dev/models/getnewsbyidop.py +73 -0
  180. finance_dev/models/getnewsop.py +98 -0
  181. finance_dev/models/getnewssentimentop.py +53 -0
  182. finance_dev/models/getoptionchainsnapshotop.py +244 -0
  183. finance_dev/models/getoptioncontractsnapshotop.py +69 -0
  184. finance_dev/models/getoptiondetailsop.py +56 -0
  185. finance_dev/models/getoptiondetailsresponse.py +45 -0
  186. finance_dev/models/getoptionlasttradeop.py +56 -0
  187. finance_dev/models/getoptionopencloseop.py +66 -0
  188. finance_dev/models/getoptionpreviousdayop.py +56 -0
  189. finance_dev/models/getoptionquotesop.py +177 -0
  190. finance_dev/models/getoptionsactivityop.py +111 -0
  191. finance_dev/models/getoptionsetfstopvolumeop.py +70 -0
  192. finance_dev/models/getoptionsstockstopgainersop.py +70 -0
  193. finance_dev/models/getoptionsstockstopvolumeop.py +70 -0
  194. finance_dev/models/getoptionsunusualactivityop.py +100 -0
  195. finance_dev/models/getoptiontradesop.py +177 -0
  196. finance_dev/models/getordersv2response.py +66 -0
  197. finance_dev/models/getownershipdataop.py +77 -0
  198. finance_dev/models/getpositionsresponse.py +39 -0
  199. finance_dev/models/getpredictionorderop.py +88 -0
  200. finance_dev/models/getpricetargetop.py +53 -0
  201. finance_dev/models/getquotesop.py +53 -0
  202. finance_dev/models/getratingsop.py +164 -0
  203. finance_dev/models/getratingsresponse.py +39 -0
  204. finance_dev/models/getreportedfinancialsop.py +127 -0
  205. finance_dev/models/getrevenuebreakdownop.py +85 -0
  206. finance_dev/models/getrevenueestimatesop.py +91 -0
  207. finance_dev/models/getsecfilingsop.py +113 -0
  208. finance_dev/models/getsectortickersop.py +124 -0
  209. finance_dev/models/getsectorwisechangeop.py +84 -0
  210. finance_dev/models/getshortinterestop.py +334 -0
  211. finance_dev/models/getshortvolumeop.py +333 -0
  212. finance_dev/models/getsocialsentimentop.py +90 -0
  213. finance_dev/models/getspinoffsop.py +112 -0
  214. finance_dev/models/getstockaggregatesop.py +174 -0
  215. finance_dev/models/getstocklastquoteop.py +56 -0
  216. finance_dev/models/getstocklasttradeop.py +56 -0
  217. finance_dev/models/getstockopencloseop.py +90 -0
  218. finance_dev/models/getstockpreviousdayop.py +80 -0
  219. finance_dev/models/getstockquotesop.py +177 -0
  220. finance_dev/models/getstocksnapshotsop.py +82 -0
  221. finance_dev/models/getstocksplitsop.py +243 -0
  222. finance_dev/models/getstocktradesop.py +177 -0
  223. finance_dev/models/getsupplychainop.py +53 -0
  224. finance_dev/models/getsupportresistancelevelsop.py +90 -0
  225. finance_dev/models/getsymbolinfoop.py +53 -0
  226. finance_dev/models/gettechnicalindicatorop.py +172 -0
  227. finance_dev/models/gettechnicalpatternsop.py +88 -0
  228. finance_dev/models/gettenderoffersop.py +112 -0
  229. finance_dev/models/gettickhistoryop.py +104 -0
  230. finance_dev/models/gettopgainersop.py +78 -0
  231. finance_dev/models/gettoplosersop.py +78 -0
  232. finance_dev/models/gettopmostactiveop.py +78 -0
  233. finance_dev/models/gettranscriptop.py +53 -0
  234. finance_dev/models/gettreasuryyieldsop.py +157 -0
  235. finance_dev/models/getunifiedsnapshotop.py +223 -0
  236. finance_dev/models/getupgradesdowngradesop.py +91 -0
  237. finance_dev/models/getusaspendingop.py +70 -0
  238. finance_dev/models/getuseraccountsop.py +40 -0
  239. finance_dev/models/getusptopatentsop.py +70 -0
  240. finance_dev/models/getvisaapplicationsop.py +73 -0
  241. finance_dev/models/historicalesgresponse.py +439 -0
  242. finance_dev/models/httpmetadata.py +24 -0
  243. finance_dev/models/incomestatement.py +296 -0
  244. finance_dev/models/incomestatementsresponse.py +61 -0
  245. finance_dev/models/indexbarresponse.py +194 -0
  246. finance_dev/models/indexbarsresponse.py +123 -0
  247. finance_dev/models/indexchartbarsresponse.py +213 -0
  248. finance_dev/models/indexgroupsresponse.py +78 -0
  249. finance_dev/models/indexlistresponse.py +95 -0
  250. finance_dev/models/indexsearchresponse.py +93 -0
  251. finance_dev/models/indicesbygroupresponse.py +93 -0
  252. finance_dev/models/indicesidentifiertype.py +28 -0
  253. finance_dev/models/indicesrealtimeindexinfo.py +67 -0
  254. finance_dev/models/indicesrealtimeindexvalue.py +157 -0
  255. finance_dev/models/indicesrealtimevaluesitem.py +80 -0
  256. finance_dev/models/indicesrealtimevaluesresponse.py +42 -0
  257. finance_dev/models/inflationexpectationsresponse.py +140 -0
  258. finance_dev/models/inflationresponse.py +132 -0
  259. finance_dev/models/insidertransaction.py +97 -0
  260. finance_dev/models/insidertransactionsresponse.py +39 -0
  261. finance_dev/models/institutionalholding.py +77 -0
  262. finance_dev/models/institutionalownershipresponse.py +39 -0
  263. finance_dev/models/institutionalportfolioresponse.py +39 -0
  264. finance_dev/models/investmentthemeid.py +35 -0
  265. finance_dev/models/investmentthemeresponse.py +80 -0
  266. finance_dev/models/ipocalendarresponse.py +39 -0
  267. finance_dev/models/ipoitem.py +93 -0
  268. finance_dev/models/listactiveordersop.py +87 -0
  269. finance_dev/models/listcategoriesop.py +79 -0
  270. finance_dev/models/listindexgroupsop.py +40 -0
  271. finance_dev/models/listindicesbygroupop.py +58 -0
  272. finance_dev/models/listindicesop.py +91 -0
  273. finance_dev/models/listoptioncontractsop.py +66 -0
  274. finance_dev/models/listoptionexpirydatesop.py +56 -0
  275. finance_dev/models/listorderhistoryop.py +139 -0
  276. finance_dev/models/listpredictionordersop.py +134 -0
  277. finance_dev/models/listtranscriptsop.py +53 -0
  278. finance_dev/models/lobbyingresponse.py +166 -0
  279. finance_dev/models/logosearchresponse.py +152 -0
  280. finance_dev/models/logosyncresponse.py +277 -0
  281. finance_dev/models/marketbreadth.py +97 -0
  282. finance_dev/models/marketbreadthresponse.py +44 -0
  283. finance_dev/models/marketholiday.py +56 -0
  284. finance_dev/models/marketholidayresponse.py +39 -0
  285. finance_dev/models/marketstatus.py +67 -0
  286. finance_dev/models/mergersandacquisitionsresponse.py +186 -0
  287. finance_dev/models/metricseriespoint.py +43 -0
  288. finance_dev/models/netinflow.py +81 -0
  289. finance_dev/models/netinflowresponse.py +44 -0
  290. finance_dev/models/newsitem.py +102 -0
  291. finance_dev/models/newslistresponse.py +128 -0
  292. finance_dev/models/newssentimentresponse.py +176 -0
  293. finance_dev/models/newstypeenum.py +16 -0
  294. finance_dev/models/optionchainsnapshotresponse.py +64 -0
  295. finance_dev/models/optioncontractsnapshotresponse.py +64 -0
  296. finance_dev/models/optioncontractsnapshotrow.py +164 -0
  297. finance_dev/models/optioncontractsresponse.py +131 -0
  298. finance_dev/models/optiondetailsdto.py +72 -0
  299. finance_dev/models/optionexpirydatesresponse.py +53 -0
  300. finance_dev/models/optionlasttraderesponse.py +169 -0
  301. finance_dev/models/optionopencloseresponse.py +97 -0
  302. finance_dev/models/optionpreviousdayresponse.py +89 -0
  303. finance_dev/models/optionquotesresponse.py +138 -0
  304. finance_dev/models/optionsactivityresponse.py +265 -0
  305. finance_dev/models/optionsnapshotcontractdetails.py +85 -0
  306. finance_dev/models/optionsnapshotdaybar.py +107 -0
  307. finance_dev/models/optionsnapshotgreeks.py +67 -0
  308. finance_dev/models/optionsnapshotlastquote.py +116 -0
  309. finance_dev/models/optionsnapshotlasttrade.py +102 -0
  310. finance_dev/models/optionsnapshotunderlying.py +86 -0
  311. finance_dev/models/optionsscreeneritem.py +151 -0
  312. finance_dev/models/optionsunusualactivityresponse.py +62 -0
  313. finance_dev/models/optionsunusualactivitytrade.py +103 -0
  314. finance_dev/models/optiontradesresponse.py +132 -0
  315. finance_dev/models/orderrequesttimeinforceenum.py +29 -0
  316. finance_dev/models/ordersideenum.py +20 -0
  317. finance_dev/models/ordertypeenum.py +20 -0
  318. finance_dev/models/ordleg.py +162 -0
  319. finance_dev/models/ordresponse.py +202 -0
  320. finance_dev/models/ownershipdataresponse.py +39 -0
  321. finance_dev/models/ownershiprecord.py +74 -0
  322. finance_dev/models/placeorderop.py +40 -0
  323. finance_dev/models/placeordrequest_union.py +335 -0
  324. finance_dev/models/placepredictionorderop.py +114 -0
  325. finance_dev/models/predmdbaseevent.py +62 -0
  326. finance_dev/models/predmdbaseeventhit.py +53 -0
  327. finance_dev/models/predmdbaseeventsearchresult.py +46 -0
  328. finance_dev/models/predmdbaseeventwithevents.py +32 -0
  329. finance_dev/models/predmdbatchhistoryrequest.py +16 -0
  330. finance_dev/models/predmdbatchhistoryresponse.py +16 -0
  331. finance_dev/models/predmdcategory.py +48 -0
  332. finance_dev/models/predmdcontract.py +177 -0
  333. finance_dev/models/predmdcontracthit.py +157 -0
  334. finance_dev/models/predmdcontractsearchresult.py +46 -0
  335. finance_dev/models/predmdevent.py +136 -0
  336. finance_dev/models/predmdeventhit.py +73 -0
  337. finance_dev/models/predmdeventsearchresult.py +46 -0
  338. finance_dev/models/predmdeventwithcontracts.py +22 -0
  339. finance_dev/models/predmdhistoryrequest.py +59 -0
  340. finance_dev/models/predmdhistoryresponse.py +53 -0
  341. finance_dev/models/predmdtick.py +53 -0
  342. finance_dev/models/predordersapperror.py +78 -0
  343. finance_dev/models/predordersorder.py +267 -0
  344. finance_dev/models/predordersorderdetail.py +26 -0
  345. finance_dev/models/predordersorderpage.py +45 -0
  346. finance_dev/models/predordersorderreport.py +88 -0
  347. finance_dev/models/predordersplaceorderrequest.py +159 -0
  348. finance_dev/models/previeworderop.py +40 -0
  349. finance_dev/models/previeworderresponse.py +127 -0
  350. finance_dev/models/pricetargetresponse.py +89 -0
  351. finance_dev/models/quotedata.py +49 -0
  352. finance_dev/models/quotesresponse.py +62 -0
  353. finance_dev/models/quotevalues.py +114 -0
  354. finance_dev/models/rating.py +193 -0
  355. finance_dev/models/ratingsaccuracy.py +242 -0
  356. finance_dev/models/replaceconfigwatchlistsop.py +40 -0
  357. finance_dev/models/replaceorderop.py +40 -0
  358. finance_dev/models/replaceordrequest_union.py +367 -0
  359. finance_dev/models/replaceordresponse.py +144 -0
  360. finance_dev/models/reportedbsitem.py +53 -0
  361. finance_dev/models/reportedfiling.py +110 -0
  362. finance_dev/models/reportedreport.py +39 -0
  363. finance_dev/models/reportingfrequency.py +16 -0
  364. finance_dev/models/revenuebreakdownaxis.py +52 -0
  365. finance_dev/models/revenuebreakdowndatapoint.py +58 -0
  366. finance_dev/models/revenuebreakdownentry.py +51 -0
  367. finance_dev/models/revenuebreakdowninner.py +75 -0
  368. finance_dev/models/revenueestimatesresponse.py +176 -0
  369. finance_dev/models/screenclause.py +70 -0
  370. finance_dev/models/screengroup.py +75 -0
  371. finance_dev/models/searchetbsymbolsop.py +40 -0
  372. finance_dev/models/searchindicesop.py +55 -0
  373. finance_dev/models/searchlogosop.py +158 -0
  374. finance_dev/models/searchmarketsymbolsop.py +80 -0
  375. finance_dev/models/searchop.py +232 -0
  376. finance_dev/models/searchsymbolitem.py +76 -0
  377. finance_dev/models/searchsymbolresponseitem.py +71 -0
  378. finance_dev/models/searchsymbolsop.py +77 -0
  379. finance_dev/models/secfiling.py +91 -0
  380. finance_dev/models/secfilingsresponse.py +39 -0
  381. finance_dev/models/sectoravgchange.py +50 -0
  382. finance_dev/models/security.py +59 -0
  383. finance_dev/models/securitytypeenum.py +16 -0
  384. finance_dev/models/shortinterestresponse.py +126 -0
  385. finance_dev/models/shortvolumeresponse.py +198 -0
  386. finance_dev/models/socialsentimentresponse.py +124 -0
  387. finance_dev/models/sortorderenum.py +13 -0
  388. finance_dev/models/spinoffsresponse.py +136 -0
  389. finance_dev/models/stockaggregatesresponse.py +92 -0
  390. finance_dev/models/stocklastquoteresponse.py +175 -0
  391. finance_dev/models/stocklasttraderesponse.py +169 -0
  392. finance_dev/models/stockohlcbar.py +85 -0
  393. finance_dev/models/stockopencloseresponse.py +109 -0
  394. finance_dev/models/stockpreviousdayresponse.py +86 -0
  395. finance_dev/models/stockquotesresponse.py +170 -0
  396. finance_dev/models/stockscreenerop.py +144 -0
  397. finance_dev/models/stockscreenerrequest.py +131 -0
  398. finance_dev/models/stockscreenerresponse.py +197 -0
  399. finance_dev/models/stocksnapshotsresponse.py +454 -0
  400. finance_dev/models/stocksplitsresponse.py +144 -0
  401. finance_dev/models/stocktradesresponse.py +164 -0
  402. finance_dev/models/supplychainresponse.py +158 -0
  403. finance_dev/models/supportresistancelevelsresponse.py +68 -0
  404. finance_dev/models/symboldetails.py +119 -0
  405. finance_dev/models/symbolerror.py +43 -0
  406. finance_dev/models/symbolinfo.py +183 -0
  407. finance_dev/models/synclogosop.py +146 -0
  408. finance_dev/models/technicalindicatorresponse.py +43 -0
  409. finance_dev/models/technicalindicatortype.py +21 -0
  410. finance_dev/models/technicalpatternsresponse.py +249 -0
  411. finance_dev/models/tenderofferidentifiertype.py +26 -0
  412. finance_dev/models/tenderoffersresponse.py +548 -0
  413. finance_dev/models/tickchartbars.py +104 -0
  414. finance_dev/models/tickresolution.py +20 -0
  415. finance_dev/models/timeinforceenum.py +26 -0
  416. finance_dev/models/tradeorderlegv2.py +164 -0
  417. finance_dev/models/tradeorderv2.py +434 -0
  418. finance_dev/models/transcriptresponse.py +162 -0
  419. finance_dev/models/transcriptsresponse.py +89 -0
  420. finance_dev/models/treasuryyieldsresponse.py +160 -0
  421. finance_dev/models/unifiedsnapshotresponse.py +308 -0
  422. finance_dev/models/updateconfigwatchlistbyidop.py +65 -0
  423. finance_dev/models/updatewatchlistrequest_union.py +134 -0
  424. finance_dev/models/upgradesdowngradesresponse.py +98 -0
  425. finance_dev/models/usaspendingresponse.py +222 -0
  426. finance_dev/models/usptopatentsresponse.py +134 -0
  427. finance_dev/models/visaapplicationsresponse.py +228 -0
  428. finance_dev/models/watchlist.py +68 -0
  429. finance_dev/models/watchlistrequest.py +43 -0
  430. finance_dev/models/watchlistresponse.py +44 -0
  431. finance_dev/news_sdk.py +829 -0
  432. finance_dev/options.py +3443 -0
  433. finance_dev/orders.py +1907 -0
  434. finance_dev/ownership.py +1386 -0
  435. finance_dev/predictions.py +29 -0
  436. finance_dev/predictions_orders.py +852 -0
  437. finance_dev/py.typed +1 -0
  438. finance_dev/sdk.py +347 -0
  439. finance_dev/sdkconfiguration.py +50 -0
  440. finance_dev/signals.py +338 -0
  441. finance_dev/stocks.py +3131 -0
  442. finance_dev/technicalanalysis_sdk.py +1137 -0
  443. finance_dev/types/__init__.py +25 -0
  444. finance_dev/types/base64fileinput.py +44 -0
  445. finance_dev/types/basemodel.py +78 -0
  446. finance_dev/utils/__init__.py +181 -0
  447. finance_dev/utils/annotations.py +80 -0
  448. finance_dev/utils/datetimes.py +42 -0
  449. finance_dev/utils/dynamic_imports.py +55 -0
  450. finance_dev/utils/enums.py +135 -0
  451. finance_dev/utils/eventstreaming.py +327 -0
  452. finance_dev/utils/forms.py +240 -0
  453. finance_dev/utils/headers.py +137 -0
  454. finance_dev/utils/logger.py +23 -0
  455. finance_dev/utils/metadata.py +120 -0
  456. finance_dev/utils/queryparams.py +218 -0
  457. finance_dev/utils/requestbodies.py +68 -0
  458. finance_dev/utils/retries.py +373 -0
  459. finance_dev/utils/security.py +199 -0
  460. finance_dev/utils/serializers.py +327 -0
  461. finance_dev/utils/unmarshal_json_response.py +39 -0
  462. finance_dev/utils/url.py +155 -0
  463. finance_dev/utils/values.py +143 -0
  464. finance_dev/watchlist_sdk.py +1583 -0
  465. finance_dev/websocket/__init__.py +57 -0
  466. finance_dev/websocket/account.py +5 -0
  467. finance_dev/websocket/auth.py +124 -0
  468. finance_dev/websocket/chart.py +5 -0
  469. finance_dev/websocket/codec.py +66 -0
  470. finance_dev/websocket/config.py +52 -0
  471. finance_dev/websocket/errors.py +54 -0
  472. finance_dev/websocket/market.py +5 -0
  473. finance_dev/websocket/models/__init__.py +52 -0
  474. finance_dev/websocket/models/account.py +60 -0
  475. finance_dev/websocket/models/chart.py +44 -0
  476. finance_dev/websocket/models/common.py +85 -0
  477. finance_dev/websocket/models/market.py +113 -0
  478. finance_dev/websocket/resources.py +327 -0
  479. finance_dev/websocket/sdk.py +13 -0
  480. finance_dev/websocket/transport/async_connection.py +493 -0
  481. finance_dev/websocket/transport/base.py +78 -0
  482. finance_dev/websocket/transport/sync_connection.py +470 -0
  483. finance_dev-0.9.0.dist-info/METADATA +913 -0
  484. finance_dev-0.9.0.dist-info/RECORD +486 -0
  485. finance_dev-0.9.0.dist-info/WHEEL +5 -0
  486. finance_dev-0.9.0.dist-info/top_level.txt +1 -0
finance_dev/indices.py ADDED
@@ -0,0 +1,2308 @@
1
+ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
+ # @generated-id: 46e5220fc8c7
3
+
4
+ from .basesdk import BaseSDK
5
+ from finance_dev import errors, models, utils
6
+ from finance_dev._hooks import HookContext
7
+ from finance_dev.types import OptionalNullable, UNSET
8
+ from finance_dev.utils.unmarshal_json_response import unmarshal_json_response
9
+ from jsonpath import JSONPath
10
+ from typing import Any, Dict, List, Mapping, Optional, Union
11
+
12
+
13
+ class Indices(BaseSDK):
14
+ def get_index_bar(
15
+ self,
16
+ *,
17
+ identifier: str,
18
+ end_time: str,
19
+ identifier_type: Optional[
20
+ models.IndicesIdentifierType
21
+ ] = models.IndicesIdentifierType.SYMBOL,
22
+ precision: Optional[models.GetIndexBarPrecision] = None,
23
+ period: Optional[int] = None,
24
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
25
+ server_url: Optional[str] = None,
26
+ timeout_ms: Optional[int] = None,
27
+ http_headers: Optional[Mapping[str, str]] = None,
28
+ ) -> models.GetIndexBarResponse:
29
+ r"""Get Index Bar Data
30
+
31
+ Retrieve OHLC (Open, High, Low, Close) bar data for indices across various timeframes for technical analysis.
32
+
33
+ If set, this operation will use `client_id` from the global security.
34
+
35
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM` for the S&P 500 in the CBOE CSMI group). For other identifier types (CUSIP, ISIN, etc.), set `identifierType` accordingly.
36
+ :param end_time: End time for the bar window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 10:30 am`).
37
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
38
+ :param precision: How long each bar covers. Pair with `period` to set the exact size (e.g. `precision=Minutes`, `period=5` = 5-minute bars). Allowed values:
39
+ - `Minutes` — minute bars (combine with `period` for 1, 5, 15, 30-minute candles).
40
+ - `Hours` — hour bars (combine with `period` for 1, 2, 4-hour candles).
41
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Examples: `precision=Minutes` + `period=5` = 5-minute bars; `precision=Hours` + `period=4` = 4-hour bars.
42
+ :param retries: Override the default retry configuration for this method
43
+ :param server_url: Override the default server URL for this method
44
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
45
+ :param http_headers: Additional headers to set or replace on requests.
46
+ """
47
+ base_url = None
48
+ url_variables = None
49
+ if timeout_ms is None:
50
+ timeout_ms = self.sdk_configuration.timeout_ms
51
+
52
+ if timeout_ms is None:
53
+ timeout_ms = 30000
54
+
55
+ if server_url is not None:
56
+ base_url = server_url
57
+ else:
58
+ base_url = self._get_url(base_url, url_variables)
59
+
60
+ request = models.GetIndexBarRequest(
61
+ identifier=identifier,
62
+ identifier_type=identifier_type,
63
+ end_time=end_time,
64
+ precision=precision,
65
+ period=period,
66
+ )
67
+
68
+ req = self._build_request(
69
+ method="GET",
70
+ path="/v1/indices/bar",
71
+ base_url=base_url,
72
+ url_variables=url_variables,
73
+ request=request,
74
+ request_body_required=False,
75
+ request_has_path_params=False,
76
+ request_has_query_params=True,
77
+ user_agent_header="user-agent",
78
+ accept_header_value="application/json",
79
+ http_headers=http_headers,
80
+ security=self.sdk_configuration.security,
81
+ allow_empty_value=None,
82
+ allowed_fields=["client_id"],
83
+ timeout_ms=timeout_ms,
84
+ )
85
+
86
+ if retries == UNSET:
87
+ if self.sdk_configuration.retry_config is not UNSET:
88
+ retries = self.sdk_configuration.retry_config
89
+ else:
90
+ retries = utils.RetryConfig(
91
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
92
+ )
93
+
94
+ retry_config = None
95
+ if isinstance(retries, utils.RetryConfig):
96
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
97
+
98
+ http_res = self.do_request(
99
+ hook_ctx=HookContext(
100
+ config=self.sdk_configuration,
101
+ base_url=base_url or "",
102
+ operation_id="getIndexBar",
103
+ oauth2_scopes=["market:supplemental"],
104
+ security_source=self.sdk_configuration.security,
105
+ tags=["Indices"],
106
+ extensions=None,
107
+ ),
108
+ request=req,
109
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
110
+ retry_config=retry_config,
111
+ )
112
+
113
+ response_data: Any = None
114
+ if utils.match_response(http_res, "200", "application/json"):
115
+ return models.GetIndexBarResponse(
116
+ index_bar_response=unmarshal_json_response(
117
+ Optional[models.IndexBarResponse], http_res
118
+ ),
119
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
120
+ )
121
+ if utils.match_response(http_res, "400", "application/json"):
122
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
123
+ response_data.http_meta = models.HTTPMetadata(
124
+ request=req, response=http_res
125
+ )
126
+ raise errors.BadRequest(response_data, http_res)
127
+ if utils.match_response(http_res, "401", "application/json"):
128
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
129
+ response_data.http_meta = models.HTTPMetadata(
130
+ request=req, response=http_res
131
+ )
132
+ raise errors.Unauthorized(response_data, http_res)
133
+ if utils.match_response(http_res, "403", "application/json"):
134
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
135
+ response_data.http_meta = models.HTTPMetadata(
136
+ request=req, response=http_res
137
+ )
138
+ raise errors.Forbidden(response_data, http_res)
139
+ if utils.match_response(http_res, "404", "application/json"):
140
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
141
+ response_data.http_meta = models.HTTPMetadata(
142
+ request=req, response=http_res
143
+ )
144
+ raise errors.NotFound(response_data, http_res)
145
+ if utils.match_response(http_res, "500", "application/json"):
146
+ response_data = unmarshal_json_response(
147
+ errors.InternalServerErrorUnion, http_res
148
+ )
149
+ response_data.http_meta = models.HTTPMetadata(
150
+ request=req, response=http_res
151
+ )
152
+ raise errors.InternalServerError(response_data, http_res)
153
+ if utils.match_response(http_res, "4XX", "*"):
154
+ http_res_text = utils.stream_to_text(http_res)
155
+ raise errors.APIError("API error occurred", http_res, http_res_text)
156
+ if utils.match_response(http_res, "5XX", "*"):
157
+ http_res_text = utils.stream_to_text(http_res)
158
+ raise errors.APIError("API error occurred", http_res, http_res_text)
159
+
160
+ raise errors.APIError("Unexpected response received", http_res)
161
+
162
+ async def get_index_bar_async(
163
+ self,
164
+ *,
165
+ identifier: str,
166
+ end_time: str,
167
+ identifier_type: Optional[
168
+ models.IndicesIdentifierType
169
+ ] = models.IndicesIdentifierType.SYMBOL,
170
+ precision: Optional[models.GetIndexBarPrecision] = None,
171
+ period: Optional[int] = None,
172
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
173
+ server_url: Optional[str] = None,
174
+ timeout_ms: Optional[int] = None,
175
+ http_headers: Optional[Mapping[str, str]] = None,
176
+ ) -> models.GetIndexBarResponse:
177
+ r"""Get Index Bar Data
178
+
179
+ Retrieve OHLC (Open, High, Low, Close) bar data for indices across various timeframes for technical analysis.
180
+
181
+ If set, this operation will use `client_id` from the global security.
182
+
183
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM` for the S&P 500 in the CBOE CSMI group). For other identifier types (CUSIP, ISIN, etc.), set `identifierType` accordingly.
184
+ :param end_time: End time for the bar window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 10:30 am`).
185
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
186
+ :param precision: How long each bar covers. Pair with `period` to set the exact size (e.g. `precision=Minutes`, `period=5` = 5-minute bars). Allowed values:
187
+ - `Minutes` — minute bars (combine with `period` for 1, 5, 15, 30-minute candles).
188
+ - `Hours` — hour bars (combine with `period` for 1, 2, 4-hour candles).
189
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Examples: `precision=Minutes` + `period=5` = 5-minute bars; `precision=Hours` + `period=4` = 4-hour bars.
190
+ :param retries: Override the default retry configuration for this method
191
+ :param server_url: Override the default server URL for this method
192
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
193
+ :param http_headers: Additional headers to set or replace on requests.
194
+ """
195
+ base_url = None
196
+ url_variables = None
197
+ if timeout_ms is None:
198
+ timeout_ms = self.sdk_configuration.timeout_ms
199
+
200
+ if timeout_ms is None:
201
+ timeout_ms = 30000
202
+
203
+ if server_url is not None:
204
+ base_url = server_url
205
+ else:
206
+ base_url = self._get_url(base_url, url_variables)
207
+
208
+ request = models.GetIndexBarRequest(
209
+ identifier=identifier,
210
+ identifier_type=identifier_type,
211
+ end_time=end_time,
212
+ precision=precision,
213
+ period=period,
214
+ )
215
+
216
+ req = self._build_request_async(
217
+ method="GET",
218
+ path="/v1/indices/bar",
219
+ base_url=base_url,
220
+ url_variables=url_variables,
221
+ request=request,
222
+ request_body_required=False,
223
+ request_has_path_params=False,
224
+ request_has_query_params=True,
225
+ user_agent_header="user-agent",
226
+ accept_header_value="application/json",
227
+ http_headers=http_headers,
228
+ security=self.sdk_configuration.security,
229
+ allow_empty_value=None,
230
+ allowed_fields=["client_id"],
231
+ timeout_ms=timeout_ms,
232
+ )
233
+
234
+ if retries == UNSET:
235
+ if self.sdk_configuration.retry_config is not UNSET:
236
+ retries = self.sdk_configuration.retry_config
237
+ else:
238
+ retries = utils.RetryConfig(
239
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
240
+ )
241
+
242
+ retry_config = None
243
+ if isinstance(retries, utils.RetryConfig):
244
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
245
+
246
+ http_res = await self.do_request_async(
247
+ hook_ctx=HookContext(
248
+ config=self.sdk_configuration,
249
+ base_url=base_url or "",
250
+ operation_id="getIndexBar",
251
+ oauth2_scopes=["market:supplemental"],
252
+ security_source=self.sdk_configuration.security,
253
+ tags=["Indices"],
254
+ extensions=None,
255
+ ),
256
+ request=req,
257
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
258
+ retry_config=retry_config,
259
+ )
260
+
261
+ response_data: Any = None
262
+ if utils.match_response(http_res, "200", "application/json"):
263
+ return models.GetIndexBarResponse(
264
+ index_bar_response=unmarshal_json_response(
265
+ Optional[models.IndexBarResponse], http_res
266
+ ),
267
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
268
+ )
269
+ if utils.match_response(http_res, "400", "application/json"):
270
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
271
+ response_data.http_meta = models.HTTPMetadata(
272
+ request=req, response=http_res
273
+ )
274
+ raise errors.BadRequest(response_data, http_res)
275
+ if utils.match_response(http_res, "401", "application/json"):
276
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
277
+ response_data.http_meta = models.HTTPMetadata(
278
+ request=req, response=http_res
279
+ )
280
+ raise errors.Unauthorized(response_data, http_res)
281
+ if utils.match_response(http_res, "403", "application/json"):
282
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
283
+ response_data.http_meta = models.HTTPMetadata(
284
+ request=req, response=http_res
285
+ )
286
+ raise errors.Forbidden(response_data, http_res)
287
+ if utils.match_response(http_res, "404", "application/json"):
288
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
289
+ response_data.http_meta = models.HTTPMetadata(
290
+ request=req, response=http_res
291
+ )
292
+ raise errors.NotFound(response_data, http_res)
293
+ if utils.match_response(http_res, "500", "application/json"):
294
+ response_data = unmarshal_json_response(
295
+ errors.InternalServerErrorUnion, http_res
296
+ )
297
+ response_data.http_meta = models.HTTPMetadata(
298
+ request=req, response=http_res
299
+ )
300
+ raise errors.InternalServerError(response_data, http_res)
301
+ if utils.match_response(http_res, "4XX", "*"):
302
+ http_res_text = await utils.stream_to_text_async(http_res)
303
+ raise errors.APIError("API error occurred", http_res, http_res_text)
304
+ if utils.match_response(http_res, "5XX", "*"):
305
+ http_res_text = await utils.stream_to_text_async(http_res)
306
+ raise errors.APIError("API error occurred", http_res, http_res_text)
307
+
308
+ raise errors.APIError("Unexpected response received", http_res)
309
+
310
+ def get_index_bars(
311
+ self,
312
+ *,
313
+ identifier: str,
314
+ start_time: str,
315
+ end_time: str,
316
+ identifier_type: Optional[
317
+ models.IndicesIdentifierType
318
+ ] = models.IndicesIdentifierType.SYMBOL,
319
+ precision: Optional[models.GetIndexBarsPrecision] = None,
320
+ period: Optional[int] = None,
321
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
322
+ server_url: Optional[str] = None,
323
+ timeout_ms: Optional[int] = None,
324
+ http_headers: Optional[Mapping[str, str]] = None,
325
+ ) -> models.GetIndexBarsResponse:
326
+ r"""Get Index Bars Data
327
+
328
+ Retrieve OHLC (Open, High, Low, Close) bar data for multiple market indices in a single request. Returns historical price bars with volume data for batch analysis of index movements.
329
+
330
+ If set, this operation will use `client_id` from the global security.
331
+
332
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM`). For other identifier types, set `identifierType` accordingly.
333
+ :param start_time: Start of the bars window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 9:30 am`).
334
+ :param end_time: End of the bars window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 4:00 pm`).
335
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
336
+ :param precision: How long each bar covers. Pair with `period` to set the exact size (e.g. `precision=Minutes`, `period=5` = 5-minute bars). Allowed values:
337
+ - `Minutes` — minute bars (combine with `period` for 1, 5, 15, 30-minute candles).
338
+ - `Hours` — hour bars (combine with `period` for 1, 2, 4-hour candles).
339
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Examples: `precision=Minutes` + `period=5` = 5-minute bars; `precision=Hours` + `period=4` = 4-hour bars.
340
+ :param retries: Override the default retry configuration for this method
341
+ :param server_url: Override the default server URL for this method
342
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
343
+ :param http_headers: Additional headers to set or replace on requests.
344
+ """
345
+ base_url = None
346
+ url_variables = None
347
+ if timeout_ms is None:
348
+ timeout_ms = self.sdk_configuration.timeout_ms
349
+
350
+ if timeout_ms is None:
351
+ timeout_ms = 30000
352
+
353
+ if server_url is not None:
354
+ base_url = server_url
355
+ else:
356
+ base_url = self._get_url(base_url, url_variables)
357
+
358
+ request = models.GetIndexBarsRequest(
359
+ identifier=identifier,
360
+ identifier_type=identifier_type,
361
+ start_time=start_time,
362
+ end_time=end_time,
363
+ precision=precision,
364
+ period=period,
365
+ )
366
+
367
+ req = self._build_request(
368
+ method="GET",
369
+ path="/v1/indices/bars",
370
+ base_url=base_url,
371
+ url_variables=url_variables,
372
+ request=request,
373
+ request_body_required=False,
374
+ request_has_path_params=False,
375
+ request_has_query_params=True,
376
+ user_agent_header="user-agent",
377
+ accept_header_value="application/json",
378
+ http_headers=http_headers,
379
+ security=self.sdk_configuration.security,
380
+ allow_empty_value=None,
381
+ allowed_fields=["client_id"],
382
+ timeout_ms=timeout_ms,
383
+ )
384
+
385
+ if retries == UNSET:
386
+ if self.sdk_configuration.retry_config is not UNSET:
387
+ retries = self.sdk_configuration.retry_config
388
+ else:
389
+ retries = utils.RetryConfig(
390
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
391
+ )
392
+
393
+ retry_config = None
394
+ if isinstance(retries, utils.RetryConfig):
395
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
396
+
397
+ http_res = self.do_request(
398
+ hook_ctx=HookContext(
399
+ config=self.sdk_configuration,
400
+ base_url=base_url or "",
401
+ operation_id="getIndexBars",
402
+ oauth2_scopes=["market:supplemental"],
403
+ security_source=self.sdk_configuration.security,
404
+ tags=["Indices"],
405
+ extensions=None,
406
+ ),
407
+ request=req,
408
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
409
+ retry_config=retry_config,
410
+ )
411
+
412
+ response_data: Any = None
413
+ if utils.match_response(http_res, "200", "application/json"):
414
+ return models.GetIndexBarsResponse(
415
+ index_bars_response=unmarshal_json_response(
416
+ Optional[models.IndexBarsResponse], http_res
417
+ ),
418
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
419
+ )
420
+ if utils.match_response(http_res, "400", "application/json"):
421
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
422
+ response_data.http_meta = models.HTTPMetadata(
423
+ request=req, response=http_res
424
+ )
425
+ raise errors.BadRequest(response_data, http_res)
426
+ if utils.match_response(http_res, "401", "application/json"):
427
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
428
+ response_data.http_meta = models.HTTPMetadata(
429
+ request=req, response=http_res
430
+ )
431
+ raise errors.Unauthorized(response_data, http_res)
432
+ if utils.match_response(http_res, "403", "application/json"):
433
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
434
+ response_data.http_meta = models.HTTPMetadata(
435
+ request=req, response=http_res
436
+ )
437
+ raise errors.Forbidden(response_data, http_res)
438
+ if utils.match_response(http_res, "404", "application/json"):
439
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
440
+ response_data.http_meta = models.HTTPMetadata(
441
+ request=req, response=http_res
442
+ )
443
+ raise errors.NotFound(response_data, http_res)
444
+ if utils.match_response(http_res, "500", "application/json"):
445
+ response_data = unmarshal_json_response(
446
+ errors.InternalServerErrorUnion, http_res
447
+ )
448
+ response_data.http_meta = models.HTTPMetadata(
449
+ request=req, response=http_res
450
+ )
451
+ raise errors.InternalServerError(response_data, http_res)
452
+ if utils.match_response(http_res, "4XX", "*"):
453
+ http_res_text = utils.stream_to_text(http_res)
454
+ raise errors.APIError("API error occurred", http_res, http_res_text)
455
+ if utils.match_response(http_res, "5XX", "*"):
456
+ http_res_text = utils.stream_to_text(http_res)
457
+ raise errors.APIError("API error occurred", http_res, http_res_text)
458
+
459
+ raise errors.APIError("Unexpected response received", http_res)
460
+
461
+ async def get_index_bars_async(
462
+ self,
463
+ *,
464
+ identifier: str,
465
+ start_time: str,
466
+ end_time: str,
467
+ identifier_type: Optional[
468
+ models.IndicesIdentifierType
469
+ ] = models.IndicesIdentifierType.SYMBOL,
470
+ precision: Optional[models.GetIndexBarsPrecision] = None,
471
+ period: Optional[int] = None,
472
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
473
+ server_url: Optional[str] = None,
474
+ timeout_ms: Optional[int] = None,
475
+ http_headers: Optional[Mapping[str, str]] = None,
476
+ ) -> models.GetIndexBarsResponse:
477
+ r"""Get Index Bars Data
478
+
479
+ Retrieve OHLC (Open, High, Low, Close) bar data for multiple market indices in a single request. Returns historical price bars with volume data for batch analysis of index movements.
480
+
481
+ If set, this operation will use `client_id` from the global security.
482
+
483
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM`). For other identifier types, set `identifierType` accordingly.
484
+ :param start_time: Start of the bars window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 9:30 am`).
485
+ :param end_time: End of the bars window. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/22/2025 4:00 pm`).
486
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
487
+ :param precision: How long each bar covers. Pair with `period` to set the exact size (e.g. `precision=Minutes`, `period=5` = 5-minute bars). Allowed values:
488
+ - `Minutes` — minute bars (combine with `period` for 1, 5, 15, 30-minute candles).
489
+ - `Hours` — hour bars (combine with `period` for 1, 2, 4-hour candles).
490
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Examples: `precision=Minutes` + `period=5` = 5-minute bars; `precision=Hours` + `period=4` = 4-hour bars.
491
+ :param retries: Override the default retry configuration for this method
492
+ :param server_url: Override the default server URL for this method
493
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
494
+ :param http_headers: Additional headers to set or replace on requests.
495
+ """
496
+ base_url = None
497
+ url_variables = None
498
+ if timeout_ms is None:
499
+ timeout_ms = self.sdk_configuration.timeout_ms
500
+
501
+ if timeout_ms is None:
502
+ timeout_ms = 30000
503
+
504
+ if server_url is not None:
505
+ base_url = server_url
506
+ else:
507
+ base_url = self._get_url(base_url, url_variables)
508
+
509
+ request = models.GetIndexBarsRequest(
510
+ identifier=identifier,
511
+ identifier_type=identifier_type,
512
+ start_time=start_time,
513
+ end_time=end_time,
514
+ precision=precision,
515
+ period=period,
516
+ )
517
+
518
+ req = self._build_request_async(
519
+ method="GET",
520
+ path="/v1/indices/bars",
521
+ base_url=base_url,
522
+ url_variables=url_variables,
523
+ request=request,
524
+ request_body_required=False,
525
+ request_has_path_params=False,
526
+ request_has_query_params=True,
527
+ user_agent_header="user-agent",
528
+ accept_header_value="application/json",
529
+ http_headers=http_headers,
530
+ security=self.sdk_configuration.security,
531
+ allow_empty_value=None,
532
+ allowed_fields=["client_id"],
533
+ timeout_ms=timeout_ms,
534
+ )
535
+
536
+ if retries == UNSET:
537
+ if self.sdk_configuration.retry_config is not UNSET:
538
+ retries = self.sdk_configuration.retry_config
539
+ else:
540
+ retries = utils.RetryConfig(
541
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
542
+ )
543
+
544
+ retry_config = None
545
+ if isinstance(retries, utils.RetryConfig):
546
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
547
+
548
+ http_res = await self.do_request_async(
549
+ hook_ctx=HookContext(
550
+ config=self.sdk_configuration,
551
+ base_url=base_url or "",
552
+ operation_id="getIndexBars",
553
+ oauth2_scopes=["market:supplemental"],
554
+ security_source=self.sdk_configuration.security,
555
+ tags=["Indices"],
556
+ extensions=None,
557
+ ),
558
+ request=req,
559
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
560
+ retry_config=retry_config,
561
+ )
562
+
563
+ response_data: Any = None
564
+ if utils.match_response(http_res, "200", "application/json"):
565
+ return models.GetIndexBarsResponse(
566
+ index_bars_response=unmarshal_json_response(
567
+ Optional[models.IndexBarsResponse], http_res
568
+ ),
569
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
570
+ )
571
+ if utils.match_response(http_res, "400", "application/json"):
572
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
573
+ response_data.http_meta = models.HTTPMetadata(
574
+ request=req, response=http_res
575
+ )
576
+ raise errors.BadRequest(response_data, http_res)
577
+ if utils.match_response(http_res, "401", "application/json"):
578
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
579
+ response_data.http_meta = models.HTTPMetadata(
580
+ request=req, response=http_res
581
+ )
582
+ raise errors.Unauthorized(response_data, http_res)
583
+ if utils.match_response(http_res, "403", "application/json"):
584
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
585
+ response_data.http_meta = models.HTTPMetadata(
586
+ request=req, response=http_res
587
+ )
588
+ raise errors.Forbidden(response_data, http_res)
589
+ if utils.match_response(http_res, "404", "application/json"):
590
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
591
+ response_data.http_meta = models.HTTPMetadata(
592
+ request=req, response=http_res
593
+ )
594
+ raise errors.NotFound(response_data, http_res)
595
+ if utils.match_response(http_res, "500", "application/json"):
596
+ response_data = unmarshal_json_response(
597
+ errors.InternalServerErrorUnion, http_res
598
+ )
599
+ response_data.http_meta = models.HTTPMetadata(
600
+ request=req, response=http_res
601
+ )
602
+ raise errors.InternalServerError(response_data, http_res)
603
+ if utils.match_response(http_res, "4XX", "*"):
604
+ http_res_text = await utils.stream_to_text_async(http_res)
605
+ raise errors.APIError("API error occurred", http_res, http_res_text)
606
+ if utils.match_response(http_res, "5XX", "*"):
607
+ http_res_text = await utils.stream_to_text_async(http_res)
608
+ raise errors.APIError("API error occurred", http_res, http_res_text)
609
+
610
+ raise errors.APIError("Unexpected response received", http_res)
611
+
612
+ def list_indices_by_group(
613
+ self,
614
+ *,
615
+ index_group: str,
616
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
617
+ server_url: Optional[str] = None,
618
+ timeout_ms: Optional[int] = None,
619
+ http_headers: Optional[Mapping[str, str]] = None,
620
+ ) -> models.ListIndicesByGroupResponse:
621
+ r"""Get Indices By Group
622
+
623
+ Retrieve all market indices belonging to a specific group category. Returns detailed information about indices within groups like Technology, Healthcare, International, or Custom portfolios.
624
+
625
+ If set, this operation will use `client_id` from the global security.
626
+
627
+ :param index_group: Index group to retrieve recently-updated members from. Use [GET /v1/indices/groups](/api-reference/supplemental/indices-groups) to discover the live list — see `IndexGroup` for the current published set with plain-English labels.
628
+ :param retries: Override the default retry configuration for this method
629
+ :param server_url: Override the default server URL for this method
630
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
631
+ :param http_headers: Additional headers to set or replace on requests.
632
+ """
633
+ base_url = None
634
+ url_variables = None
635
+ if timeout_ms is None:
636
+ timeout_ms = self.sdk_configuration.timeout_ms
637
+
638
+ if timeout_ms is None:
639
+ timeout_ms = 30000
640
+
641
+ if server_url is not None:
642
+ base_url = server_url
643
+ else:
644
+ base_url = self._get_url(base_url, url_variables)
645
+
646
+ request = models.ListIndicesByGroupRequest(
647
+ index_group=index_group,
648
+ )
649
+
650
+ req = self._build_request(
651
+ method="GET",
652
+ path="/v1/indices/by-group",
653
+ base_url=base_url,
654
+ url_variables=url_variables,
655
+ request=request,
656
+ request_body_required=False,
657
+ request_has_path_params=False,
658
+ request_has_query_params=True,
659
+ user_agent_header="user-agent",
660
+ accept_header_value="application/json",
661
+ http_headers=http_headers,
662
+ security=self.sdk_configuration.security,
663
+ allow_empty_value=None,
664
+ allowed_fields=["client_id"],
665
+ timeout_ms=timeout_ms,
666
+ )
667
+
668
+ if retries == UNSET:
669
+ if self.sdk_configuration.retry_config is not UNSET:
670
+ retries = self.sdk_configuration.retry_config
671
+ else:
672
+ retries = utils.RetryConfig(
673
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
674
+ )
675
+
676
+ retry_config = None
677
+ if isinstance(retries, utils.RetryConfig):
678
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
679
+
680
+ http_res = self.do_request(
681
+ hook_ctx=HookContext(
682
+ config=self.sdk_configuration,
683
+ base_url=base_url or "",
684
+ operation_id="listIndicesByGroup",
685
+ oauth2_scopes=["market:supplemental"],
686
+ security_source=self.sdk_configuration.security,
687
+ tags=["Indices"],
688
+ extensions=None,
689
+ ),
690
+ request=req,
691
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
692
+ retry_config=retry_config,
693
+ )
694
+
695
+ response_data: Any = None
696
+ if utils.match_response(http_res, "200", "application/json"):
697
+ return models.ListIndicesByGroupResponse(
698
+ indices_by_group_response=unmarshal_json_response(
699
+ Optional[models.IndicesByGroupResponse], http_res
700
+ ),
701
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
702
+ )
703
+ if utils.match_response(http_res, "400", "application/json"):
704
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
705
+ response_data.http_meta = models.HTTPMetadata(
706
+ request=req, response=http_res
707
+ )
708
+ raise errors.BadRequest(response_data, http_res)
709
+ if utils.match_response(http_res, "401", "application/json"):
710
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
711
+ response_data.http_meta = models.HTTPMetadata(
712
+ request=req, response=http_res
713
+ )
714
+ raise errors.Unauthorized(response_data, http_res)
715
+ if utils.match_response(http_res, "403", "application/json"):
716
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
717
+ response_data.http_meta = models.HTTPMetadata(
718
+ request=req, response=http_res
719
+ )
720
+ raise errors.Forbidden(response_data, http_res)
721
+ if utils.match_response(http_res, "404", "application/json"):
722
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
723
+ response_data.http_meta = models.HTTPMetadata(
724
+ request=req, response=http_res
725
+ )
726
+ raise errors.NotFound(response_data, http_res)
727
+ if utils.match_response(http_res, "500", "application/json"):
728
+ response_data = unmarshal_json_response(
729
+ errors.InternalServerErrorUnion, http_res
730
+ )
731
+ response_data.http_meta = models.HTTPMetadata(
732
+ request=req, response=http_res
733
+ )
734
+ raise errors.InternalServerError(response_data, http_res)
735
+ if utils.match_response(http_res, "4XX", "*"):
736
+ http_res_text = utils.stream_to_text(http_res)
737
+ raise errors.APIError("API error occurred", http_res, http_res_text)
738
+ if utils.match_response(http_res, "5XX", "*"):
739
+ http_res_text = utils.stream_to_text(http_res)
740
+ raise errors.APIError("API error occurred", http_res, http_res_text)
741
+
742
+ raise errors.APIError("Unexpected response received", http_res)
743
+
744
+ async def list_indices_by_group_async(
745
+ self,
746
+ *,
747
+ index_group: str,
748
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
749
+ server_url: Optional[str] = None,
750
+ timeout_ms: Optional[int] = None,
751
+ http_headers: Optional[Mapping[str, str]] = None,
752
+ ) -> models.ListIndicesByGroupResponse:
753
+ r"""Get Indices By Group
754
+
755
+ Retrieve all market indices belonging to a specific group category. Returns detailed information about indices within groups like Technology, Healthcare, International, or Custom portfolios.
756
+
757
+ If set, this operation will use `client_id` from the global security.
758
+
759
+ :param index_group: Index group to retrieve recently-updated members from. Use [GET /v1/indices/groups](/api-reference/supplemental/indices-groups) to discover the live list — see `IndexGroup` for the current published set with plain-English labels.
760
+ :param retries: Override the default retry configuration for this method
761
+ :param server_url: Override the default server URL for this method
762
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
763
+ :param http_headers: Additional headers to set or replace on requests.
764
+ """
765
+ base_url = None
766
+ url_variables = None
767
+ if timeout_ms is None:
768
+ timeout_ms = self.sdk_configuration.timeout_ms
769
+
770
+ if timeout_ms is None:
771
+ timeout_ms = 30000
772
+
773
+ if server_url is not None:
774
+ base_url = server_url
775
+ else:
776
+ base_url = self._get_url(base_url, url_variables)
777
+
778
+ request = models.ListIndicesByGroupRequest(
779
+ index_group=index_group,
780
+ )
781
+
782
+ req = self._build_request_async(
783
+ method="GET",
784
+ path="/v1/indices/by-group",
785
+ base_url=base_url,
786
+ url_variables=url_variables,
787
+ request=request,
788
+ request_body_required=False,
789
+ request_has_path_params=False,
790
+ request_has_query_params=True,
791
+ user_agent_header="user-agent",
792
+ accept_header_value="application/json",
793
+ http_headers=http_headers,
794
+ security=self.sdk_configuration.security,
795
+ allow_empty_value=None,
796
+ allowed_fields=["client_id"],
797
+ timeout_ms=timeout_ms,
798
+ )
799
+
800
+ if retries == UNSET:
801
+ if self.sdk_configuration.retry_config is not UNSET:
802
+ retries = self.sdk_configuration.retry_config
803
+ else:
804
+ retries = utils.RetryConfig(
805
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
806
+ )
807
+
808
+ retry_config = None
809
+ if isinstance(retries, utils.RetryConfig):
810
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
811
+
812
+ http_res = await self.do_request_async(
813
+ hook_ctx=HookContext(
814
+ config=self.sdk_configuration,
815
+ base_url=base_url or "",
816
+ operation_id="listIndicesByGroup",
817
+ oauth2_scopes=["market:supplemental"],
818
+ security_source=self.sdk_configuration.security,
819
+ tags=["Indices"],
820
+ extensions=None,
821
+ ),
822
+ request=req,
823
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
824
+ retry_config=retry_config,
825
+ )
826
+
827
+ response_data: Any = None
828
+ if utils.match_response(http_res, "200", "application/json"):
829
+ return models.ListIndicesByGroupResponse(
830
+ indices_by_group_response=unmarshal_json_response(
831
+ Optional[models.IndicesByGroupResponse], http_res
832
+ ),
833
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
834
+ )
835
+ if utils.match_response(http_res, "400", "application/json"):
836
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
837
+ response_data.http_meta = models.HTTPMetadata(
838
+ request=req, response=http_res
839
+ )
840
+ raise errors.BadRequest(response_data, http_res)
841
+ if utils.match_response(http_res, "401", "application/json"):
842
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
843
+ response_data.http_meta = models.HTTPMetadata(
844
+ request=req, response=http_res
845
+ )
846
+ raise errors.Unauthorized(response_data, http_res)
847
+ if utils.match_response(http_res, "403", "application/json"):
848
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
849
+ response_data.http_meta = models.HTTPMetadata(
850
+ request=req, response=http_res
851
+ )
852
+ raise errors.Forbidden(response_data, http_res)
853
+ if utils.match_response(http_res, "404", "application/json"):
854
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
855
+ response_data.http_meta = models.HTTPMetadata(
856
+ request=req, response=http_res
857
+ )
858
+ raise errors.NotFound(response_data, http_res)
859
+ if utils.match_response(http_res, "500", "application/json"):
860
+ response_data = unmarshal_json_response(
861
+ errors.InternalServerErrorUnion, http_res
862
+ )
863
+ response_data.http_meta = models.HTTPMetadata(
864
+ request=req, response=http_res
865
+ )
866
+ raise errors.InternalServerError(response_data, http_res)
867
+ if utils.match_response(http_res, "4XX", "*"):
868
+ http_res_text = await utils.stream_to_text_async(http_res)
869
+ raise errors.APIError("API error occurred", http_res, http_res_text)
870
+ if utils.match_response(http_res, "5XX", "*"):
871
+ http_res_text = await utils.stream_to_text_async(http_res)
872
+ raise errors.APIError("API error occurred", http_res, http_res_text)
873
+
874
+ raise errors.APIError("Unexpected response received", http_res)
875
+
876
+ def get_index_chart_bars(
877
+ self,
878
+ *,
879
+ identifier: str,
880
+ start_time: str,
881
+ end_time: str,
882
+ identifier_type: Optional[
883
+ models.IndicesIdentifierType
884
+ ] = models.IndicesIdentifierType.SYMBOL,
885
+ precision: Optional[models.GetIndexChartBarsPrecision] = None,
886
+ period: Optional[int] = None,
887
+ adjustment_method: Optional[str] = None,
888
+ include_extended: Optional[bool] = False,
889
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
890
+ server_url: Optional[str] = None,
891
+ timeout_ms: Optional[int] = None,
892
+ http_headers: Optional[Mapping[str, str]] = None,
893
+ ) -> models.GetIndexChartBarsResponse:
894
+ r"""Get Index Chart Data
895
+
896
+ Retrieve historical chart data for indices including price history, volume, and returns for creating index performance charts.
897
+
898
+ If set, this operation will use `client_id` from the global security.
899
+
900
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM`). For other identifier types, set `identifierType` accordingly.
901
+ :param start_time: Start of the chart range, inclusive. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/15/2025 9:00 am`).
902
+ :param end_time: End of the chart range, inclusive. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/15/2025 9:30 am`).
903
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
904
+ :param precision: How long each chart bar covers. Pair with `period` to set the exact size. Note the singular form (different from `/v1/indices/bar` and `/v1/indices/bars`). Allowed values:
905
+ - `Minute` — minute bars (intraday).
906
+ - `Hour` — hour bars.
907
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Example: `precision=Minute` + `period=15` = 15-minute bars.
908
+ :param adjustment_method: How to adjust historical prices for corporate actions like dividends and splits. Pass the literal value supported by the upstream data provider. Omit to leave prices unadjusted.
909
+ :param include_extended: Include pre-market and after-hours sessions in the returned chart bars. Defaults to `false` (regular hours only). Set `true` when you want a continuous extended-session chart.
910
+ :param retries: Override the default retry configuration for this method
911
+ :param server_url: Override the default server URL for this method
912
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
913
+ :param http_headers: Additional headers to set or replace on requests.
914
+ """
915
+ base_url = None
916
+ url_variables = None
917
+ if timeout_ms is None:
918
+ timeout_ms = self.sdk_configuration.timeout_ms
919
+
920
+ if timeout_ms is None:
921
+ timeout_ms = 30000
922
+
923
+ if server_url is not None:
924
+ base_url = server_url
925
+ else:
926
+ base_url = self._get_url(base_url, url_variables)
927
+
928
+ request = models.GetIndexChartBarsRequest(
929
+ identifier=identifier,
930
+ identifier_type=identifier_type,
931
+ start_time=start_time,
932
+ end_time=end_time,
933
+ precision=precision,
934
+ period=period,
935
+ adjustment_method=adjustment_method,
936
+ include_extended=include_extended,
937
+ )
938
+
939
+ req = self._build_request(
940
+ method="GET",
941
+ path="/v1/indices/chart-bars",
942
+ base_url=base_url,
943
+ url_variables=url_variables,
944
+ request=request,
945
+ request_body_required=False,
946
+ request_has_path_params=False,
947
+ request_has_query_params=True,
948
+ user_agent_header="user-agent",
949
+ accept_header_value="application/json",
950
+ http_headers=http_headers,
951
+ security=self.sdk_configuration.security,
952
+ allow_empty_value=None,
953
+ allowed_fields=["client_id"],
954
+ timeout_ms=timeout_ms,
955
+ )
956
+
957
+ if retries == UNSET:
958
+ if self.sdk_configuration.retry_config is not UNSET:
959
+ retries = self.sdk_configuration.retry_config
960
+ else:
961
+ retries = utils.RetryConfig(
962
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
963
+ )
964
+
965
+ retry_config = None
966
+ if isinstance(retries, utils.RetryConfig):
967
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
968
+
969
+ http_res = self.do_request(
970
+ hook_ctx=HookContext(
971
+ config=self.sdk_configuration,
972
+ base_url=base_url or "",
973
+ operation_id="getIndexChartBars",
974
+ oauth2_scopes=["market:supplemental"],
975
+ security_source=self.sdk_configuration.security,
976
+ tags=["Indices"],
977
+ extensions=None,
978
+ ),
979
+ request=req,
980
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
981
+ retry_config=retry_config,
982
+ )
983
+
984
+ response_data: Any = None
985
+ if utils.match_response(http_res, "200", "application/json"):
986
+ return models.GetIndexChartBarsResponse(
987
+ index_chart_bars_response=unmarshal_json_response(
988
+ Optional[models.IndexChartBarsResponse], http_res
989
+ ),
990
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
991
+ )
992
+ if utils.match_response(http_res, "400", "application/json"):
993
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
994
+ response_data.http_meta = models.HTTPMetadata(
995
+ request=req, response=http_res
996
+ )
997
+ raise errors.BadRequest(response_data, http_res)
998
+ if utils.match_response(http_res, "401", "application/json"):
999
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1000
+ response_data.http_meta = models.HTTPMetadata(
1001
+ request=req, response=http_res
1002
+ )
1003
+ raise errors.Unauthorized(response_data, http_res)
1004
+ if utils.match_response(http_res, "403", "application/json"):
1005
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1006
+ response_data.http_meta = models.HTTPMetadata(
1007
+ request=req, response=http_res
1008
+ )
1009
+ raise errors.Forbidden(response_data, http_res)
1010
+ if utils.match_response(http_res, "404", "application/json"):
1011
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1012
+ response_data.http_meta = models.HTTPMetadata(
1013
+ request=req, response=http_res
1014
+ )
1015
+ raise errors.NotFound(response_data, http_res)
1016
+ if utils.match_response(http_res, "500", "application/json"):
1017
+ response_data = unmarshal_json_response(
1018
+ errors.InternalServerErrorUnion, http_res
1019
+ )
1020
+ response_data.http_meta = models.HTTPMetadata(
1021
+ request=req, response=http_res
1022
+ )
1023
+ raise errors.InternalServerError(response_data, http_res)
1024
+ if utils.match_response(http_res, "4XX", "*"):
1025
+ http_res_text = utils.stream_to_text(http_res)
1026
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1027
+ if utils.match_response(http_res, "5XX", "*"):
1028
+ http_res_text = utils.stream_to_text(http_res)
1029
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1030
+
1031
+ raise errors.APIError("Unexpected response received", http_res)
1032
+
1033
+ async def get_index_chart_bars_async(
1034
+ self,
1035
+ *,
1036
+ identifier: str,
1037
+ start_time: str,
1038
+ end_time: str,
1039
+ identifier_type: Optional[
1040
+ models.IndicesIdentifierType
1041
+ ] = models.IndicesIdentifierType.SYMBOL,
1042
+ precision: Optional[models.GetIndexChartBarsPrecision] = None,
1043
+ period: Optional[int] = None,
1044
+ adjustment_method: Optional[str] = None,
1045
+ include_extended: Optional[bool] = False,
1046
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1047
+ server_url: Optional[str] = None,
1048
+ timeout_ms: Optional[int] = None,
1049
+ http_headers: Optional[Mapping[str, str]] = None,
1050
+ ) -> models.GetIndexChartBarsResponse:
1051
+ r"""Get Index Chart Data
1052
+
1053
+ Retrieve historical chart data for indices including price history, volume, and returns for creating index performance charts.
1054
+
1055
+ If set, this operation will use `client_id` from the global security.
1056
+
1057
+ :param identifier: Index identifier to query. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM`). For other identifier types, set `identifierType` accordingly.
1058
+ :param start_time: Start of the chart range, inclusive. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/15/2025 9:00 am`).
1059
+ :param end_time: End of the chart range, inclusive. Format: `MM/DD/YYYY hh:mm am/pm` in the index's native timezone (e.g. `12/15/2025 9:30 am`).
1060
+ :param identifier_type: How to interpret the value you sent in `identifier`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values.
1061
+ :param precision: How long each chart bar covers. Pair with `period` to set the exact size. Note the singular form (different from `/v1/indices/bar` and `/v1/indices/bars`). Allowed values:
1062
+ - `Minute` — minute bars (intraday).
1063
+ - `Hour` — hour bars.
1064
+ :param period: Multiplier on `precision` to set the bar size. Defaults to `1`. Example: `precision=Minute` + `period=15` = 15-minute bars.
1065
+ :param adjustment_method: How to adjust historical prices for corporate actions like dividends and splits. Pass the literal value supported by the upstream data provider. Omit to leave prices unadjusted.
1066
+ :param include_extended: Include pre-market and after-hours sessions in the returned chart bars. Defaults to `false` (regular hours only). Set `true` when you want a continuous extended-session chart.
1067
+ :param retries: Override the default retry configuration for this method
1068
+ :param server_url: Override the default server URL for this method
1069
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1070
+ :param http_headers: Additional headers to set or replace on requests.
1071
+ """
1072
+ base_url = None
1073
+ url_variables = None
1074
+ if timeout_ms is None:
1075
+ timeout_ms = self.sdk_configuration.timeout_ms
1076
+
1077
+ if timeout_ms is None:
1078
+ timeout_ms = 30000
1079
+
1080
+ if server_url is not None:
1081
+ base_url = server_url
1082
+ else:
1083
+ base_url = self._get_url(base_url, url_variables)
1084
+
1085
+ request = models.GetIndexChartBarsRequest(
1086
+ identifier=identifier,
1087
+ identifier_type=identifier_type,
1088
+ start_time=start_time,
1089
+ end_time=end_time,
1090
+ precision=precision,
1091
+ period=period,
1092
+ adjustment_method=adjustment_method,
1093
+ include_extended=include_extended,
1094
+ )
1095
+
1096
+ req = self._build_request_async(
1097
+ method="GET",
1098
+ path="/v1/indices/chart-bars",
1099
+ base_url=base_url,
1100
+ url_variables=url_variables,
1101
+ request=request,
1102
+ request_body_required=False,
1103
+ request_has_path_params=False,
1104
+ request_has_query_params=True,
1105
+ user_agent_header="user-agent",
1106
+ accept_header_value="application/json",
1107
+ http_headers=http_headers,
1108
+ security=self.sdk_configuration.security,
1109
+ allow_empty_value=None,
1110
+ allowed_fields=["client_id"],
1111
+ timeout_ms=timeout_ms,
1112
+ )
1113
+
1114
+ if retries == UNSET:
1115
+ if self.sdk_configuration.retry_config is not UNSET:
1116
+ retries = self.sdk_configuration.retry_config
1117
+ else:
1118
+ retries = utils.RetryConfig(
1119
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1120
+ )
1121
+
1122
+ retry_config = None
1123
+ if isinstance(retries, utils.RetryConfig):
1124
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1125
+
1126
+ http_res = await self.do_request_async(
1127
+ hook_ctx=HookContext(
1128
+ config=self.sdk_configuration,
1129
+ base_url=base_url or "",
1130
+ operation_id="getIndexChartBars",
1131
+ oauth2_scopes=["market:supplemental"],
1132
+ security_source=self.sdk_configuration.security,
1133
+ tags=["Indices"],
1134
+ extensions=None,
1135
+ ),
1136
+ request=req,
1137
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1138
+ retry_config=retry_config,
1139
+ )
1140
+
1141
+ response_data: Any = None
1142
+ if utils.match_response(http_res, "200", "application/json"):
1143
+ return models.GetIndexChartBarsResponse(
1144
+ index_chart_bars_response=unmarshal_json_response(
1145
+ Optional[models.IndexChartBarsResponse], http_res
1146
+ ),
1147
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1148
+ )
1149
+ if utils.match_response(http_res, "400", "application/json"):
1150
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1151
+ response_data.http_meta = models.HTTPMetadata(
1152
+ request=req, response=http_res
1153
+ )
1154
+ raise errors.BadRequest(response_data, http_res)
1155
+ if utils.match_response(http_res, "401", "application/json"):
1156
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1157
+ response_data.http_meta = models.HTTPMetadata(
1158
+ request=req, response=http_res
1159
+ )
1160
+ raise errors.Unauthorized(response_data, http_res)
1161
+ if utils.match_response(http_res, "403", "application/json"):
1162
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1163
+ response_data.http_meta = models.HTTPMetadata(
1164
+ request=req, response=http_res
1165
+ )
1166
+ raise errors.Forbidden(response_data, http_res)
1167
+ if utils.match_response(http_res, "404", "application/json"):
1168
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1169
+ response_data.http_meta = models.HTTPMetadata(
1170
+ request=req, response=http_res
1171
+ )
1172
+ raise errors.NotFound(response_data, http_res)
1173
+ if utils.match_response(http_res, "500", "application/json"):
1174
+ response_data = unmarshal_json_response(
1175
+ errors.InternalServerErrorUnion, http_res
1176
+ )
1177
+ response_data.http_meta = models.HTTPMetadata(
1178
+ request=req, response=http_res
1179
+ )
1180
+ raise errors.InternalServerError(response_data, http_res)
1181
+ if utils.match_response(http_res, "4XX", "*"):
1182
+ http_res_text = await utils.stream_to_text_async(http_res)
1183
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1184
+ if utils.match_response(http_res, "5XX", "*"):
1185
+ http_res_text = await utils.stream_to_text_async(http_res)
1186
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1187
+
1188
+ raise errors.APIError("Unexpected response received", http_res)
1189
+
1190
+ def list_index_groups(
1191
+ self,
1192
+ *,
1193
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1194
+ server_url: Optional[str] = None,
1195
+ timeout_ms: Optional[int] = None,
1196
+ http_headers: Optional[Mapping[str, str]] = None,
1197
+ ) -> models.ListIndexGroupsResponse:
1198
+ r"""Get Index Groups
1199
+
1200
+ List all index groups (publishers / index families) currently available. The response is the canonical source — fetch this and cache it locally to populate dropdown menus that drive other indices endpoints, instead of hard-coding the group list in your app.
1201
+
1202
+ If set, this operation will use `client_id` from the global security.
1203
+
1204
+ :param retries: Override the default retry configuration for this method
1205
+ :param server_url: Override the default server URL for this method
1206
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1207
+ :param http_headers: Additional headers to set or replace on requests.
1208
+ """
1209
+ base_url = None
1210
+ url_variables = None
1211
+ if timeout_ms is None:
1212
+ timeout_ms = self.sdk_configuration.timeout_ms
1213
+
1214
+ if timeout_ms is None:
1215
+ timeout_ms = 30000
1216
+
1217
+ if server_url is not None:
1218
+ base_url = server_url
1219
+ else:
1220
+ base_url = self._get_url(base_url, url_variables)
1221
+ req = self._build_request(
1222
+ method="GET",
1223
+ path="/v1/indices/groups",
1224
+ base_url=base_url,
1225
+ url_variables=url_variables,
1226
+ request=None,
1227
+ request_body_required=False,
1228
+ request_has_path_params=False,
1229
+ request_has_query_params=True,
1230
+ user_agent_header="user-agent",
1231
+ accept_header_value="application/json",
1232
+ http_headers=http_headers,
1233
+ security=self.sdk_configuration.security,
1234
+ allow_empty_value=None,
1235
+ allowed_fields=["client_id"],
1236
+ timeout_ms=timeout_ms,
1237
+ )
1238
+
1239
+ if retries == UNSET:
1240
+ if self.sdk_configuration.retry_config is not UNSET:
1241
+ retries = self.sdk_configuration.retry_config
1242
+ else:
1243
+ retries = utils.RetryConfig(
1244
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1245
+ )
1246
+
1247
+ retry_config = None
1248
+ if isinstance(retries, utils.RetryConfig):
1249
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1250
+
1251
+ http_res = self.do_request(
1252
+ hook_ctx=HookContext(
1253
+ config=self.sdk_configuration,
1254
+ base_url=base_url or "",
1255
+ operation_id="listIndexGroups",
1256
+ oauth2_scopes=["market:supplemental"],
1257
+ security_source=self.sdk_configuration.security,
1258
+ tags=["Indices"],
1259
+ extensions=None,
1260
+ ),
1261
+ request=req,
1262
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1263
+ retry_config=retry_config,
1264
+ )
1265
+
1266
+ response_data: Any = None
1267
+ if utils.match_response(http_res, "200", "application/json"):
1268
+ return models.ListIndexGroupsResponse(
1269
+ index_groups_response=unmarshal_json_response(
1270
+ Optional[models.IndexGroupsResponse], http_res
1271
+ ),
1272
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1273
+ )
1274
+ if utils.match_response(http_res, "400", "application/json"):
1275
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1276
+ response_data.http_meta = models.HTTPMetadata(
1277
+ request=req, response=http_res
1278
+ )
1279
+ raise errors.BadRequest(response_data, http_res)
1280
+ if utils.match_response(http_res, "401", "application/json"):
1281
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1282
+ response_data.http_meta = models.HTTPMetadata(
1283
+ request=req, response=http_res
1284
+ )
1285
+ raise errors.Unauthorized(response_data, http_res)
1286
+ if utils.match_response(http_res, "403", "application/json"):
1287
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1288
+ response_data.http_meta = models.HTTPMetadata(
1289
+ request=req, response=http_res
1290
+ )
1291
+ raise errors.Forbidden(response_data, http_res)
1292
+ if utils.match_response(http_res, "404", "application/json"):
1293
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1294
+ response_data.http_meta = models.HTTPMetadata(
1295
+ request=req, response=http_res
1296
+ )
1297
+ raise errors.NotFound(response_data, http_res)
1298
+ if utils.match_response(http_res, "500", "application/json"):
1299
+ response_data = unmarshal_json_response(
1300
+ errors.InternalServerErrorUnion, http_res
1301
+ )
1302
+ response_data.http_meta = models.HTTPMetadata(
1303
+ request=req, response=http_res
1304
+ )
1305
+ raise errors.InternalServerError(response_data, http_res)
1306
+ if utils.match_response(http_res, "4XX", "*"):
1307
+ http_res_text = utils.stream_to_text(http_res)
1308
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1309
+ if utils.match_response(http_res, "5XX", "*"):
1310
+ http_res_text = utils.stream_to_text(http_res)
1311
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1312
+
1313
+ raise errors.APIError("Unexpected response received", http_res)
1314
+
1315
+ async def list_index_groups_async(
1316
+ self,
1317
+ *,
1318
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1319
+ server_url: Optional[str] = None,
1320
+ timeout_ms: Optional[int] = None,
1321
+ http_headers: Optional[Mapping[str, str]] = None,
1322
+ ) -> models.ListIndexGroupsResponse:
1323
+ r"""Get Index Groups
1324
+
1325
+ List all index groups (publishers / index families) currently available. The response is the canonical source — fetch this and cache it locally to populate dropdown menus that drive other indices endpoints, instead of hard-coding the group list in your app.
1326
+
1327
+ If set, this operation will use `client_id` from the global security.
1328
+
1329
+ :param retries: Override the default retry configuration for this method
1330
+ :param server_url: Override the default server URL for this method
1331
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1332
+ :param http_headers: Additional headers to set or replace on requests.
1333
+ """
1334
+ base_url = None
1335
+ url_variables = None
1336
+ if timeout_ms is None:
1337
+ timeout_ms = self.sdk_configuration.timeout_ms
1338
+
1339
+ if timeout_ms is None:
1340
+ timeout_ms = 30000
1341
+
1342
+ if server_url is not None:
1343
+ base_url = server_url
1344
+ else:
1345
+ base_url = self._get_url(base_url, url_variables)
1346
+ req = self._build_request_async(
1347
+ method="GET",
1348
+ path="/v1/indices/groups",
1349
+ base_url=base_url,
1350
+ url_variables=url_variables,
1351
+ request=None,
1352
+ request_body_required=False,
1353
+ request_has_path_params=False,
1354
+ request_has_query_params=True,
1355
+ user_agent_header="user-agent",
1356
+ accept_header_value="application/json",
1357
+ http_headers=http_headers,
1358
+ security=self.sdk_configuration.security,
1359
+ allow_empty_value=None,
1360
+ allowed_fields=["client_id"],
1361
+ timeout_ms=timeout_ms,
1362
+ )
1363
+
1364
+ if retries == UNSET:
1365
+ if self.sdk_configuration.retry_config is not UNSET:
1366
+ retries = self.sdk_configuration.retry_config
1367
+ else:
1368
+ retries = utils.RetryConfig(
1369
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1370
+ )
1371
+
1372
+ retry_config = None
1373
+ if isinstance(retries, utils.RetryConfig):
1374
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1375
+
1376
+ http_res = await self.do_request_async(
1377
+ hook_ctx=HookContext(
1378
+ config=self.sdk_configuration,
1379
+ base_url=base_url or "",
1380
+ operation_id="listIndexGroups",
1381
+ oauth2_scopes=["market:supplemental"],
1382
+ security_source=self.sdk_configuration.security,
1383
+ tags=["Indices"],
1384
+ extensions=None,
1385
+ ),
1386
+ request=req,
1387
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1388
+ retry_config=retry_config,
1389
+ )
1390
+
1391
+ response_data: Any = None
1392
+ if utils.match_response(http_res, "200", "application/json"):
1393
+ return models.ListIndexGroupsResponse(
1394
+ index_groups_response=unmarshal_json_response(
1395
+ Optional[models.IndexGroupsResponse], http_res
1396
+ ),
1397
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1398
+ )
1399
+ if utils.match_response(http_res, "400", "application/json"):
1400
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1401
+ response_data.http_meta = models.HTTPMetadata(
1402
+ request=req, response=http_res
1403
+ )
1404
+ raise errors.BadRequest(response_data, http_res)
1405
+ if utils.match_response(http_res, "401", "application/json"):
1406
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1407
+ response_data.http_meta = models.HTTPMetadata(
1408
+ request=req, response=http_res
1409
+ )
1410
+ raise errors.Unauthorized(response_data, http_res)
1411
+ if utils.match_response(http_res, "403", "application/json"):
1412
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1413
+ response_data.http_meta = models.HTTPMetadata(
1414
+ request=req, response=http_res
1415
+ )
1416
+ raise errors.Forbidden(response_data, http_res)
1417
+ if utils.match_response(http_res, "404", "application/json"):
1418
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1419
+ response_data.http_meta = models.HTTPMetadata(
1420
+ request=req, response=http_res
1421
+ )
1422
+ raise errors.NotFound(response_data, http_res)
1423
+ if utils.match_response(http_res, "500", "application/json"):
1424
+ response_data = unmarshal_json_response(
1425
+ errors.InternalServerErrorUnion, http_res
1426
+ )
1427
+ response_data.http_meta = models.HTTPMetadata(
1428
+ request=req, response=http_res
1429
+ )
1430
+ raise errors.InternalServerError(response_data, http_res)
1431
+ if utils.match_response(http_res, "4XX", "*"):
1432
+ http_res_text = await utils.stream_to_text_async(http_res)
1433
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1434
+ if utils.match_response(http_res, "5XX", "*"):
1435
+ http_res_text = await utils.stream_to_text_async(http_res)
1436
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1437
+
1438
+ raise errors.APIError("Unexpected response received", http_res)
1439
+
1440
+ def list_indices(
1441
+ self,
1442
+ *,
1443
+ index_group: str,
1444
+ page_size: Optional[int] = None,
1445
+ next_page: Optional[str] = None,
1446
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1447
+ server_url: Optional[str] = None,
1448
+ timeout_ms: Optional[int] = None,
1449
+ http_headers: Optional[Mapping[str, str]] = None,
1450
+ ) -> Optional[models.ListIndicesResponse]:
1451
+ r"""Get Index List
1452
+
1453
+ Retrieve comprehensive list of available indices including major market indices, sector indices, and international benchmarks.
1454
+
1455
+ If set, this operation will use `client_id` from the global security.
1456
+
1457
+ :param index_group: Index group whose members you want to list (paginated). Use [GET /v1/indices/groups](/api-reference/supplemental/indices-groups) to discover the live list of groups — see `IndexGroup` for the current published set with plain-English labels.
1458
+ :param page_size: Number of results per page. Use this to control pagination size in list views. (default: 100, max: 1000)
1459
+ :param next_page: Pagination token for the next page. Omit it on the first request, then send the returned token to continue paging.
1460
+ :param retries: Override the default retry configuration for this method
1461
+ :param server_url: Override the default server URL for this method
1462
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1463
+ :param http_headers: Additional headers to set or replace on requests.
1464
+ """
1465
+ base_url = None
1466
+ url_variables = None
1467
+ if timeout_ms is None:
1468
+ timeout_ms = self.sdk_configuration.timeout_ms
1469
+
1470
+ if timeout_ms is None:
1471
+ timeout_ms = 30000
1472
+
1473
+ if server_url is not None:
1474
+ base_url = server_url
1475
+ else:
1476
+ base_url = self._get_url(base_url, url_variables)
1477
+
1478
+ request = models.ListIndicesRequest(
1479
+ index_group=index_group,
1480
+ page_size=page_size,
1481
+ next_page=next_page,
1482
+ )
1483
+
1484
+ req = self._build_request(
1485
+ method="GET",
1486
+ path="/v1/indices/list",
1487
+ base_url=base_url,
1488
+ url_variables=url_variables,
1489
+ request=request,
1490
+ request_body_required=False,
1491
+ request_has_path_params=False,
1492
+ request_has_query_params=True,
1493
+ user_agent_header="user-agent",
1494
+ accept_header_value="application/json",
1495
+ http_headers=http_headers,
1496
+ security=self.sdk_configuration.security,
1497
+ allow_empty_value=None,
1498
+ allowed_fields=["client_id"],
1499
+ timeout_ms=timeout_ms,
1500
+ )
1501
+
1502
+ if retries == UNSET:
1503
+ if self.sdk_configuration.retry_config is not UNSET:
1504
+ retries = self.sdk_configuration.retry_config
1505
+ else:
1506
+ retries = utils.RetryConfig(
1507
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1508
+ )
1509
+
1510
+ retry_config = None
1511
+ if isinstance(retries, utils.RetryConfig):
1512
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1513
+
1514
+ http_res = self.do_request(
1515
+ hook_ctx=HookContext(
1516
+ config=self.sdk_configuration,
1517
+ base_url=base_url or "",
1518
+ operation_id="listIndices",
1519
+ oauth2_scopes=["market:supplemental"],
1520
+ security_source=self.sdk_configuration.security,
1521
+ tags=["Indices"],
1522
+ extensions=None,
1523
+ ),
1524
+ request=req,
1525
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1526
+ retry_config=retry_config,
1527
+ )
1528
+
1529
+ def next_func() -> Optional[models.ListIndicesResponse]:
1530
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
1531
+ next_cursor = JSONPath("$.nextPage").parse(body)
1532
+
1533
+ if len(next_cursor) == 0:
1534
+ return None
1535
+
1536
+ next_cursor = next_cursor[0]
1537
+ if next_cursor is None or str(next_cursor).strip() == "":
1538
+ return None
1539
+ results = JSONPath("$.indices").parse(body)
1540
+ if len(results) == 0 or len(results[0]) == 0:
1541
+ return None
1542
+ limit_ = request.page_size if isinstance(request.page_size, int) else 0
1543
+ if len(results[0]) < limit_:
1544
+ return None
1545
+
1546
+ return self.list_indices(
1547
+ index_group=index_group,
1548
+ page_size=page_size,
1549
+ next_page=next_cursor,
1550
+ retries=retries,
1551
+ server_url=server_url,
1552
+ timeout_ms=timeout_ms,
1553
+ http_headers=http_headers,
1554
+ )
1555
+
1556
+ response_data: Any = None
1557
+ if utils.match_response(http_res, "200", "application/json"):
1558
+ return models.ListIndicesResponse(
1559
+ index_list_response=unmarshal_json_response(
1560
+ Optional[models.IndexListResponse], http_res
1561
+ ),
1562
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1563
+ next=next_func,
1564
+ )
1565
+ if utils.match_response(http_res, "400", "application/json"):
1566
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1567
+ response_data.http_meta = models.HTTPMetadata(
1568
+ request=req, response=http_res
1569
+ )
1570
+ raise errors.BadRequest(response_data, http_res)
1571
+ if utils.match_response(http_res, "401", "application/json"):
1572
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1573
+ response_data.http_meta = models.HTTPMetadata(
1574
+ request=req, response=http_res
1575
+ )
1576
+ raise errors.Unauthorized(response_data, http_res)
1577
+ if utils.match_response(http_res, "403", "application/json"):
1578
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1579
+ response_data.http_meta = models.HTTPMetadata(
1580
+ request=req, response=http_res
1581
+ )
1582
+ raise errors.Forbidden(response_data, http_res)
1583
+ if utils.match_response(http_res, "404", "application/json"):
1584
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1585
+ response_data.http_meta = models.HTTPMetadata(
1586
+ request=req, response=http_res
1587
+ )
1588
+ raise errors.NotFound(response_data, http_res)
1589
+ if utils.match_response(http_res, "500", "application/json"):
1590
+ response_data = unmarshal_json_response(
1591
+ errors.InternalServerErrorUnion, http_res
1592
+ )
1593
+ response_data.http_meta = models.HTTPMetadata(
1594
+ request=req, response=http_res
1595
+ )
1596
+ raise errors.InternalServerError(response_data, http_res)
1597
+ if utils.match_response(http_res, "4XX", "*"):
1598
+ http_res_text = utils.stream_to_text(http_res)
1599
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1600
+ if utils.match_response(http_res, "5XX", "*"):
1601
+ http_res_text = utils.stream_to_text(http_res)
1602
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1603
+
1604
+ raise errors.APIError("Unexpected response received", http_res)
1605
+
1606
+ async def list_indices_async(
1607
+ self,
1608
+ *,
1609
+ index_group: str,
1610
+ page_size: Optional[int] = None,
1611
+ next_page: Optional[str] = None,
1612
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1613
+ server_url: Optional[str] = None,
1614
+ timeout_ms: Optional[int] = None,
1615
+ http_headers: Optional[Mapping[str, str]] = None,
1616
+ ) -> Optional[models.ListIndicesResponse]:
1617
+ r"""Get Index List
1618
+
1619
+ Retrieve comprehensive list of available indices including major market indices, sector indices, and international benchmarks.
1620
+
1621
+ If set, this operation will use `client_id` from the global security.
1622
+
1623
+ :param index_group: Index group whose members you want to list (paginated). Use [GET /v1/indices/groups](/api-reference/supplemental/indices-groups) to discover the live list of groups — see `IndexGroup` for the current published set with plain-English labels.
1624
+ :param page_size: Number of results per page. Use this to control pagination size in list views. (default: 100, max: 1000)
1625
+ :param next_page: Pagination token for the next page. Omit it on the first request, then send the returned token to continue paging.
1626
+ :param retries: Override the default retry configuration for this method
1627
+ :param server_url: Override the default server URL for this method
1628
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1629
+ :param http_headers: Additional headers to set or replace on requests.
1630
+ """
1631
+ base_url = None
1632
+ url_variables = None
1633
+ if timeout_ms is None:
1634
+ timeout_ms = self.sdk_configuration.timeout_ms
1635
+
1636
+ if timeout_ms is None:
1637
+ timeout_ms = 30000
1638
+
1639
+ if server_url is not None:
1640
+ base_url = server_url
1641
+ else:
1642
+ base_url = self._get_url(base_url, url_variables)
1643
+
1644
+ request = models.ListIndicesRequest(
1645
+ index_group=index_group,
1646
+ page_size=page_size,
1647
+ next_page=next_page,
1648
+ )
1649
+
1650
+ req = self._build_request_async(
1651
+ method="GET",
1652
+ path="/v1/indices/list",
1653
+ base_url=base_url,
1654
+ url_variables=url_variables,
1655
+ request=request,
1656
+ request_body_required=False,
1657
+ request_has_path_params=False,
1658
+ request_has_query_params=True,
1659
+ user_agent_header="user-agent",
1660
+ accept_header_value="application/json",
1661
+ http_headers=http_headers,
1662
+ security=self.sdk_configuration.security,
1663
+ allow_empty_value=None,
1664
+ allowed_fields=["client_id"],
1665
+ timeout_ms=timeout_ms,
1666
+ )
1667
+
1668
+ if retries == UNSET:
1669
+ if self.sdk_configuration.retry_config is not UNSET:
1670
+ retries = self.sdk_configuration.retry_config
1671
+ else:
1672
+ retries = utils.RetryConfig(
1673
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1674
+ )
1675
+
1676
+ retry_config = None
1677
+ if isinstance(retries, utils.RetryConfig):
1678
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1679
+
1680
+ http_res = await self.do_request_async(
1681
+ hook_ctx=HookContext(
1682
+ config=self.sdk_configuration,
1683
+ base_url=base_url or "",
1684
+ operation_id="listIndices",
1685
+ oauth2_scopes=["market:supplemental"],
1686
+ security_source=self.sdk_configuration.security,
1687
+ tags=["Indices"],
1688
+ extensions=None,
1689
+ ),
1690
+ request=req,
1691
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1692
+ retry_config=retry_config,
1693
+ )
1694
+
1695
+ def next_func() -> Optional[models.ListIndicesResponse]:
1696
+ body = utils.unmarshal_json(http_res.text, Union[Dict[Any, Any], List[Any]])
1697
+ next_cursor = JSONPath("$.nextPage").parse(body)
1698
+
1699
+ if len(next_cursor) == 0:
1700
+ return None
1701
+
1702
+ next_cursor = next_cursor[0]
1703
+ if next_cursor is None or str(next_cursor).strip() == "":
1704
+ return None
1705
+ results = JSONPath("$.indices").parse(body)
1706
+ if len(results) == 0 or len(results[0]) == 0:
1707
+ return None
1708
+ limit_ = request.page_size if isinstance(request.page_size, int) else 0
1709
+ if len(results[0]) < limit_:
1710
+ return None
1711
+
1712
+ return self.list_indices(
1713
+ index_group=index_group,
1714
+ page_size=page_size,
1715
+ next_page=next_cursor,
1716
+ retries=retries,
1717
+ server_url=server_url,
1718
+ timeout_ms=timeout_ms,
1719
+ http_headers=http_headers,
1720
+ )
1721
+
1722
+ response_data: Any = None
1723
+ if utils.match_response(http_res, "200", "application/json"):
1724
+ return models.ListIndicesResponse(
1725
+ index_list_response=unmarshal_json_response(
1726
+ Optional[models.IndexListResponse], http_res
1727
+ ),
1728
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1729
+ next=next_func,
1730
+ )
1731
+ if utils.match_response(http_res, "400", "application/json"):
1732
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1733
+ response_data.http_meta = models.HTTPMetadata(
1734
+ request=req, response=http_res
1735
+ )
1736
+ raise errors.BadRequest(response_data, http_res)
1737
+ if utils.match_response(http_res, "401", "application/json"):
1738
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1739
+ response_data.http_meta = models.HTTPMetadata(
1740
+ request=req, response=http_res
1741
+ )
1742
+ raise errors.Unauthorized(response_data, http_res)
1743
+ if utils.match_response(http_res, "403", "application/json"):
1744
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1745
+ response_data.http_meta = models.HTTPMetadata(
1746
+ request=req, response=http_res
1747
+ )
1748
+ raise errors.Forbidden(response_data, http_res)
1749
+ if utils.match_response(http_res, "404", "application/json"):
1750
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1751
+ response_data.http_meta = models.HTTPMetadata(
1752
+ request=req, response=http_res
1753
+ )
1754
+ raise errors.NotFound(response_data, http_res)
1755
+ if utils.match_response(http_res, "500", "application/json"):
1756
+ response_data = unmarshal_json_response(
1757
+ errors.InternalServerErrorUnion, http_res
1758
+ )
1759
+ response_data.http_meta = models.HTTPMetadata(
1760
+ request=req, response=http_res
1761
+ )
1762
+ raise errors.InternalServerError(response_data, http_res)
1763
+ if utils.match_response(http_res, "4XX", "*"):
1764
+ http_res_text = await utils.stream_to_text_async(http_res)
1765
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1766
+ if utils.match_response(http_res, "5XX", "*"):
1767
+ http_res_text = await utils.stream_to_text_async(http_res)
1768
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1769
+
1770
+ raise errors.APIError("Unexpected response received", http_res)
1771
+
1772
+ def get_index_realtime_values(
1773
+ self,
1774
+ *,
1775
+ identifiers: str,
1776
+ identifier_type: Optional[
1777
+ models.IndicesIdentifierType
1778
+ ] = models.IndicesIdentifierType.SYMBOL,
1779
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1780
+ server_url: Optional[str] = None,
1781
+ timeout_ms: Optional[int] = None,
1782
+ http_headers: Optional[Mapping[str, str]] = None,
1783
+ ) -> models.GetIndexRealtimeValuesResponse:
1784
+ r"""Get Realtime Indices Values
1785
+
1786
+ Retrieve real-time values for multiple market indices simultaneously. Returns current index levels, percentage changes, and last update timestamps for a batch of indices in a single request.
1787
+
1788
+ If set, this operation will use `client_id` from the global security.
1789
+
1790
+ :param identifiers: One or more index identifiers to fetch real-time values for, comma-separated. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM,COMP.IND_CBOM,DJI.IND_DJI`). All identifiers in one request must be the same type (set via `identifierType`).
1791
+ :param identifier_type: How to interpret each value in `identifiers`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values. All identifiers in one request must be the same type.
1792
+ :param retries: Override the default retry configuration for this method
1793
+ :param server_url: Override the default server URL for this method
1794
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1795
+ :param http_headers: Additional headers to set or replace on requests.
1796
+ """
1797
+ base_url = None
1798
+ url_variables = None
1799
+ if timeout_ms is None:
1800
+ timeout_ms = self.sdk_configuration.timeout_ms
1801
+
1802
+ if timeout_ms is None:
1803
+ timeout_ms = 30000
1804
+
1805
+ if server_url is not None:
1806
+ base_url = server_url
1807
+ else:
1808
+ base_url = self._get_url(base_url, url_variables)
1809
+
1810
+ request = models.GetIndexRealtimeValuesRequest(
1811
+ identifiers=identifiers,
1812
+ identifier_type=identifier_type,
1813
+ )
1814
+
1815
+ req = self._build_request(
1816
+ method="GET",
1817
+ path="/v1/indices/realtime/values",
1818
+ base_url=base_url,
1819
+ url_variables=url_variables,
1820
+ request=request,
1821
+ request_body_required=False,
1822
+ request_has_path_params=False,
1823
+ request_has_query_params=True,
1824
+ user_agent_header="user-agent",
1825
+ accept_header_value="application/json",
1826
+ http_headers=http_headers,
1827
+ security=self.sdk_configuration.security,
1828
+ allow_empty_value=None,
1829
+ allowed_fields=["client_id"],
1830
+ timeout_ms=timeout_ms,
1831
+ )
1832
+
1833
+ if retries == UNSET:
1834
+ if self.sdk_configuration.retry_config is not UNSET:
1835
+ retries = self.sdk_configuration.retry_config
1836
+ else:
1837
+ retries = utils.RetryConfig(
1838
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1839
+ )
1840
+
1841
+ retry_config = None
1842
+ if isinstance(retries, utils.RetryConfig):
1843
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1844
+
1845
+ http_res = self.do_request(
1846
+ hook_ctx=HookContext(
1847
+ config=self.sdk_configuration,
1848
+ base_url=base_url or "",
1849
+ operation_id="getIndexRealtimeValues",
1850
+ oauth2_scopes=["market:supplemental"],
1851
+ security_source=self.sdk_configuration.security,
1852
+ tags=["Indices"],
1853
+ extensions=None,
1854
+ ),
1855
+ request=req,
1856
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1857
+ retry_config=retry_config,
1858
+ )
1859
+
1860
+ response_data: Any = None
1861
+ if utils.match_response(http_res, "200", "application/json"):
1862
+ return models.GetIndexRealtimeValuesResponse(
1863
+ indices_realtime_values_response=unmarshal_json_response(
1864
+ Optional[models.IndicesRealtimeValuesResponse], http_res
1865
+ ),
1866
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
1867
+ )
1868
+ if utils.match_response(http_res, "400", "application/json"):
1869
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
1870
+ response_data.http_meta = models.HTTPMetadata(
1871
+ request=req, response=http_res
1872
+ )
1873
+ raise errors.BadRequest(response_data, http_res)
1874
+ if utils.match_response(http_res, "401", "application/json"):
1875
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
1876
+ response_data.http_meta = models.HTTPMetadata(
1877
+ request=req, response=http_res
1878
+ )
1879
+ raise errors.Unauthorized(response_data, http_res)
1880
+ if utils.match_response(http_res, "403", "application/json"):
1881
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
1882
+ response_data.http_meta = models.HTTPMetadata(
1883
+ request=req, response=http_res
1884
+ )
1885
+ raise errors.Forbidden(response_data, http_res)
1886
+ if utils.match_response(http_res, "404", "application/json"):
1887
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
1888
+ response_data.http_meta = models.HTTPMetadata(
1889
+ request=req, response=http_res
1890
+ )
1891
+ raise errors.NotFound(response_data, http_res)
1892
+ if utils.match_response(http_res, "500", "application/json"):
1893
+ response_data = unmarshal_json_response(
1894
+ errors.InternalServerErrorUnion, http_res
1895
+ )
1896
+ response_data.http_meta = models.HTTPMetadata(
1897
+ request=req, response=http_res
1898
+ )
1899
+ raise errors.InternalServerError(response_data, http_res)
1900
+ if utils.match_response(http_res, "4XX", "*"):
1901
+ http_res_text = utils.stream_to_text(http_res)
1902
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1903
+ if utils.match_response(http_res, "5XX", "*"):
1904
+ http_res_text = utils.stream_to_text(http_res)
1905
+ raise errors.APIError("API error occurred", http_res, http_res_text)
1906
+
1907
+ raise errors.APIError("Unexpected response received", http_res)
1908
+
1909
+ async def get_index_realtime_values_async(
1910
+ self,
1911
+ *,
1912
+ identifiers: str,
1913
+ identifier_type: Optional[
1914
+ models.IndicesIdentifierType
1915
+ ] = models.IndicesIdentifierType.SYMBOL,
1916
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
1917
+ server_url: Optional[str] = None,
1918
+ timeout_ms: Optional[int] = None,
1919
+ http_headers: Optional[Mapping[str, str]] = None,
1920
+ ) -> models.GetIndexRealtimeValuesResponse:
1921
+ r"""Get Realtime Indices Values
1922
+
1923
+ Retrieve real-time values for multiple market indices simultaneously. Returns current index levels, percentage changes, and last update timestamps for a batch of indices in a single request.
1924
+
1925
+ If set, this operation will use `client_id` from the global security.
1926
+
1927
+ :param identifiers: One or more index identifiers to fetch real-time values for, comma-separated. For `Symbol`-type identifiers, use the full `<SYMBOL>.<GROUP>` form (e.g. `SPX.IND_CBOM,COMP.IND_CBOM,DJI.IND_DJI`). All identifiers in one request must be the same type (set via `identifierType`).
1928
+ :param identifier_type: How to interpret each value in `identifiers`. Defaults to `Symbol`. See `IndicesIdentifierType` for the full set of accepted values. All identifiers in one request must be the same type.
1929
+ :param retries: Override the default retry configuration for this method
1930
+ :param server_url: Override the default server URL for this method
1931
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
1932
+ :param http_headers: Additional headers to set or replace on requests.
1933
+ """
1934
+ base_url = None
1935
+ url_variables = None
1936
+ if timeout_ms is None:
1937
+ timeout_ms = self.sdk_configuration.timeout_ms
1938
+
1939
+ if timeout_ms is None:
1940
+ timeout_ms = 30000
1941
+
1942
+ if server_url is not None:
1943
+ base_url = server_url
1944
+ else:
1945
+ base_url = self._get_url(base_url, url_variables)
1946
+
1947
+ request = models.GetIndexRealtimeValuesRequest(
1948
+ identifiers=identifiers,
1949
+ identifier_type=identifier_type,
1950
+ )
1951
+
1952
+ req = self._build_request_async(
1953
+ method="GET",
1954
+ path="/v1/indices/realtime/values",
1955
+ base_url=base_url,
1956
+ url_variables=url_variables,
1957
+ request=request,
1958
+ request_body_required=False,
1959
+ request_has_path_params=False,
1960
+ request_has_query_params=True,
1961
+ user_agent_header="user-agent",
1962
+ accept_header_value="application/json",
1963
+ http_headers=http_headers,
1964
+ security=self.sdk_configuration.security,
1965
+ allow_empty_value=None,
1966
+ allowed_fields=["client_id"],
1967
+ timeout_ms=timeout_ms,
1968
+ )
1969
+
1970
+ if retries == UNSET:
1971
+ if self.sdk_configuration.retry_config is not UNSET:
1972
+ retries = self.sdk_configuration.retry_config
1973
+ else:
1974
+ retries = utils.RetryConfig(
1975
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
1976
+ )
1977
+
1978
+ retry_config = None
1979
+ if isinstance(retries, utils.RetryConfig):
1980
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
1981
+
1982
+ http_res = await self.do_request_async(
1983
+ hook_ctx=HookContext(
1984
+ config=self.sdk_configuration,
1985
+ base_url=base_url or "",
1986
+ operation_id="getIndexRealtimeValues",
1987
+ oauth2_scopes=["market:supplemental"],
1988
+ security_source=self.sdk_configuration.security,
1989
+ tags=["Indices"],
1990
+ extensions=None,
1991
+ ),
1992
+ request=req,
1993
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
1994
+ retry_config=retry_config,
1995
+ )
1996
+
1997
+ response_data: Any = None
1998
+ if utils.match_response(http_res, "200", "application/json"):
1999
+ return models.GetIndexRealtimeValuesResponse(
2000
+ indices_realtime_values_response=unmarshal_json_response(
2001
+ Optional[models.IndicesRealtimeValuesResponse], http_res
2002
+ ),
2003
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
2004
+ )
2005
+ if utils.match_response(http_res, "400", "application/json"):
2006
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
2007
+ response_data.http_meta = models.HTTPMetadata(
2008
+ request=req, response=http_res
2009
+ )
2010
+ raise errors.BadRequest(response_data, http_res)
2011
+ if utils.match_response(http_res, "401", "application/json"):
2012
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
2013
+ response_data.http_meta = models.HTTPMetadata(
2014
+ request=req, response=http_res
2015
+ )
2016
+ raise errors.Unauthorized(response_data, http_res)
2017
+ if utils.match_response(http_res, "403", "application/json"):
2018
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
2019
+ response_data.http_meta = models.HTTPMetadata(
2020
+ request=req, response=http_res
2021
+ )
2022
+ raise errors.Forbidden(response_data, http_res)
2023
+ if utils.match_response(http_res, "404", "application/json"):
2024
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
2025
+ response_data.http_meta = models.HTTPMetadata(
2026
+ request=req, response=http_res
2027
+ )
2028
+ raise errors.NotFound(response_data, http_res)
2029
+ if utils.match_response(http_res, "500", "application/json"):
2030
+ response_data = unmarshal_json_response(
2031
+ errors.InternalServerErrorUnion, http_res
2032
+ )
2033
+ response_data.http_meta = models.HTTPMetadata(
2034
+ request=req, response=http_res
2035
+ )
2036
+ raise errors.InternalServerError(response_data, http_res)
2037
+ if utils.match_response(http_res, "4XX", "*"):
2038
+ http_res_text = await utils.stream_to_text_async(http_res)
2039
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2040
+ if utils.match_response(http_res, "5XX", "*"):
2041
+ http_res_text = await utils.stream_to_text_async(http_res)
2042
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2043
+
2044
+ raise errors.APIError("Unexpected response received", http_res)
2045
+
2046
+ def search_indices(
2047
+ self,
2048
+ *,
2049
+ index_name: str,
2050
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
2051
+ server_url: Optional[str] = None,
2052
+ timeout_ms: Optional[int] = None,
2053
+ http_headers: Optional[Mapping[str, str]] = None,
2054
+ ) -> models.SearchIndicesResponse:
2055
+ r"""Search Indices
2056
+
2057
+ Search for market indices by name, symbol, or keyword to find specific benchmark indices and sector trackers.
2058
+
2059
+ If set, this operation will use `client_id` from the global security.
2060
+
2061
+ :param index_name: Full or partial index name to search for. Case-insensitive substring match against the index display name (e.g. `S&P 500`, `Dow`, `NASDAQ`). Returns matching indices with their `symbol`, `indexGroup`, and `currency`.
2062
+ :param retries: Override the default retry configuration for this method
2063
+ :param server_url: Override the default server URL for this method
2064
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
2065
+ :param http_headers: Additional headers to set or replace on requests.
2066
+ """
2067
+ base_url = None
2068
+ url_variables = None
2069
+ if timeout_ms is None:
2070
+ timeout_ms = self.sdk_configuration.timeout_ms
2071
+
2072
+ if timeout_ms is None:
2073
+ timeout_ms = 30000
2074
+
2075
+ if server_url is not None:
2076
+ base_url = server_url
2077
+ else:
2078
+ base_url = self._get_url(base_url, url_variables)
2079
+
2080
+ request = models.SearchIndicesRequest(
2081
+ index_name=index_name,
2082
+ )
2083
+
2084
+ req = self._build_request(
2085
+ method="GET",
2086
+ path="/v1/indices/search",
2087
+ base_url=base_url,
2088
+ url_variables=url_variables,
2089
+ request=request,
2090
+ request_body_required=False,
2091
+ request_has_path_params=False,
2092
+ request_has_query_params=True,
2093
+ user_agent_header="user-agent",
2094
+ accept_header_value="application/json",
2095
+ http_headers=http_headers,
2096
+ security=self.sdk_configuration.security,
2097
+ allow_empty_value=None,
2098
+ allowed_fields=["client_id"],
2099
+ timeout_ms=timeout_ms,
2100
+ )
2101
+
2102
+ if retries == UNSET:
2103
+ if self.sdk_configuration.retry_config is not UNSET:
2104
+ retries = self.sdk_configuration.retry_config
2105
+ else:
2106
+ retries = utils.RetryConfig(
2107
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
2108
+ )
2109
+
2110
+ retry_config = None
2111
+ if isinstance(retries, utils.RetryConfig):
2112
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
2113
+
2114
+ http_res = self.do_request(
2115
+ hook_ctx=HookContext(
2116
+ config=self.sdk_configuration,
2117
+ base_url=base_url or "",
2118
+ operation_id="searchIndices",
2119
+ oauth2_scopes=["market:supplemental"],
2120
+ security_source=self.sdk_configuration.security,
2121
+ tags=["Indices"],
2122
+ extensions=None,
2123
+ ),
2124
+ request=req,
2125
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
2126
+ retry_config=retry_config,
2127
+ )
2128
+
2129
+ response_data: Any = None
2130
+ if utils.match_response(http_res, "200", "application/json"):
2131
+ return models.SearchIndicesResponse(
2132
+ index_search_response=unmarshal_json_response(
2133
+ Optional[models.IndexSearchResponse], http_res
2134
+ ),
2135
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
2136
+ )
2137
+ if utils.match_response(http_res, "400", "application/json"):
2138
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
2139
+ response_data.http_meta = models.HTTPMetadata(
2140
+ request=req, response=http_res
2141
+ )
2142
+ raise errors.BadRequest(response_data, http_res)
2143
+ if utils.match_response(http_res, "401", "application/json"):
2144
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
2145
+ response_data.http_meta = models.HTTPMetadata(
2146
+ request=req, response=http_res
2147
+ )
2148
+ raise errors.Unauthorized(response_data, http_res)
2149
+ if utils.match_response(http_res, "403", "application/json"):
2150
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
2151
+ response_data.http_meta = models.HTTPMetadata(
2152
+ request=req, response=http_res
2153
+ )
2154
+ raise errors.Forbidden(response_data, http_res)
2155
+ if utils.match_response(http_res, "404", "application/json"):
2156
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
2157
+ response_data.http_meta = models.HTTPMetadata(
2158
+ request=req, response=http_res
2159
+ )
2160
+ raise errors.NotFound(response_data, http_res)
2161
+ if utils.match_response(http_res, "500", "application/json"):
2162
+ response_data = unmarshal_json_response(
2163
+ errors.InternalServerErrorUnion, http_res
2164
+ )
2165
+ response_data.http_meta = models.HTTPMetadata(
2166
+ request=req, response=http_res
2167
+ )
2168
+ raise errors.InternalServerError(response_data, http_res)
2169
+ if utils.match_response(http_res, "4XX", "*"):
2170
+ http_res_text = utils.stream_to_text(http_res)
2171
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2172
+ if utils.match_response(http_res, "5XX", "*"):
2173
+ http_res_text = utils.stream_to_text(http_res)
2174
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2175
+
2176
+ raise errors.APIError("Unexpected response received", http_res)
2177
+
2178
+ async def search_indices_async(
2179
+ self,
2180
+ *,
2181
+ index_name: str,
2182
+ retries: OptionalNullable[utils.RetryConfig] = UNSET,
2183
+ server_url: Optional[str] = None,
2184
+ timeout_ms: Optional[int] = None,
2185
+ http_headers: Optional[Mapping[str, str]] = None,
2186
+ ) -> models.SearchIndicesResponse:
2187
+ r"""Search Indices
2188
+
2189
+ Search for market indices by name, symbol, or keyword to find specific benchmark indices and sector trackers.
2190
+
2191
+ If set, this operation will use `client_id` from the global security.
2192
+
2193
+ :param index_name: Full or partial index name to search for. Case-insensitive substring match against the index display name (e.g. `S&P 500`, `Dow`, `NASDAQ`). Returns matching indices with their `symbol`, `indexGroup`, and `currency`.
2194
+ :param retries: Override the default retry configuration for this method
2195
+ :param server_url: Override the default server URL for this method
2196
+ :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
2197
+ :param http_headers: Additional headers to set or replace on requests.
2198
+ """
2199
+ base_url = None
2200
+ url_variables = None
2201
+ if timeout_ms is None:
2202
+ timeout_ms = self.sdk_configuration.timeout_ms
2203
+
2204
+ if timeout_ms is None:
2205
+ timeout_ms = 30000
2206
+
2207
+ if server_url is not None:
2208
+ base_url = server_url
2209
+ else:
2210
+ base_url = self._get_url(base_url, url_variables)
2211
+
2212
+ request = models.SearchIndicesRequest(
2213
+ index_name=index_name,
2214
+ )
2215
+
2216
+ req = self._build_request_async(
2217
+ method="GET",
2218
+ path="/v1/indices/search",
2219
+ base_url=base_url,
2220
+ url_variables=url_variables,
2221
+ request=request,
2222
+ request_body_required=False,
2223
+ request_has_path_params=False,
2224
+ request_has_query_params=True,
2225
+ user_agent_header="user-agent",
2226
+ accept_header_value="application/json",
2227
+ http_headers=http_headers,
2228
+ security=self.sdk_configuration.security,
2229
+ allow_empty_value=None,
2230
+ allowed_fields=["client_id"],
2231
+ timeout_ms=timeout_ms,
2232
+ )
2233
+
2234
+ if retries == UNSET:
2235
+ if self.sdk_configuration.retry_config is not UNSET:
2236
+ retries = self.sdk_configuration.retry_config
2237
+ else:
2238
+ retries = utils.RetryConfig(
2239
+ "backoff", utils.BackoffStrategy(500, 8000, 1.5, 60000), True
2240
+ )
2241
+
2242
+ retry_config = None
2243
+ if isinstance(retries, utils.RetryConfig):
2244
+ retry_config = (retries, ["429", "500", "502", "503", "504"])
2245
+
2246
+ http_res = await self.do_request_async(
2247
+ hook_ctx=HookContext(
2248
+ config=self.sdk_configuration,
2249
+ base_url=base_url or "",
2250
+ operation_id="searchIndices",
2251
+ oauth2_scopes=["market:supplemental"],
2252
+ security_source=self.sdk_configuration.security,
2253
+ tags=["Indices"],
2254
+ extensions=None,
2255
+ ),
2256
+ request=req,
2257
+ is_error_status_code=lambda c: utils.match_status_codes(["4XX", "5XX"], c),
2258
+ retry_config=retry_config,
2259
+ )
2260
+
2261
+ response_data: Any = None
2262
+ if utils.match_response(http_res, "200", "application/json"):
2263
+ return models.SearchIndicesResponse(
2264
+ index_search_response=unmarshal_json_response(
2265
+ Optional[models.IndexSearchResponse], http_res
2266
+ ),
2267
+ http_meta=models.HTTPMetadata(request=req, response=http_res),
2268
+ )
2269
+ if utils.match_response(http_res, "400", "application/json"):
2270
+ response_data = unmarshal_json_response(errors.BadRequestUnion, http_res)
2271
+ response_data.http_meta = models.HTTPMetadata(
2272
+ request=req, response=http_res
2273
+ )
2274
+ raise errors.BadRequest(response_data, http_res)
2275
+ if utils.match_response(http_res, "401", "application/json"):
2276
+ response_data = unmarshal_json_response(errors.UnauthorizedUnion, http_res)
2277
+ response_data.http_meta = models.HTTPMetadata(
2278
+ request=req, response=http_res
2279
+ )
2280
+ raise errors.Unauthorized(response_data, http_res)
2281
+ if utils.match_response(http_res, "403", "application/json"):
2282
+ response_data = unmarshal_json_response(errors.ForbiddenUnion, http_res)
2283
+ response_data.http_meta = models.HTTPMetadata(
2284
+ request=req, response=http_res
2285
+ )
2286
+ raise errors.Forbidden(response_data, http_res)
2287
+ if utils.match_response(http_res, "404", "application/json"):
2288
+ response_data = unmarshal_json_response(errors.NotFoundUnion, http_res)
2289
+ response_data.http_meta = models.HTTPMetadata(
2290
+ request=req, response=http_res
2291
+ )
2292
+ raise errors.NotFound(response_data, http_res)
2293
+ if utils.match_response(http_res, "500", "application/json"):
2294
+ response_data = unmarshal_json_response(
2295
+ errors.InternalServerErrorUnion, http_res
2296
+ )
2297
+ response_data.http_meta = models.HTTPMetadata(
2298
+ request=req, response=http_res
2299
+ )
2300
+ raise errors.InternalServerError(response_data, http_res)
2301
+ if utils.match_response(http_res, "4XX", "*"):
2302
+ http_res_text = await utils.stream_to_text_async(http_res)
2303
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2304
+ if utils.match_response(http_res, "5XX", "*"):
2305
+ http_res_text = await utils.stream_to_text_async(http_res)
2306
+ raise errors.APIError("API error occurred", http_res, http_res_text)
2307
+
2308
+ raise errors.APIError("Unexpected response received", http_res)