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.
- finance_dev/__init__.py +18 -0
- finance_dev/_hooks/__init__.py +7 -0
- finance_dev/_hooks/clientcredentials.py +319 -0
- finance_dev/_hooks/oauth2scopes.py +50 -0
- finance_dev/_hooks/registration.py +13 -0
- finance_dev/_hooks/sdkhooks.py +82 -0
- finance_dev/_hooks/types.py +125 -0
- finance_dev/_version.py +16 -0
- finance_dev/accounts.py +797 -0
- finance_dev/alternativedata.py +4830 -0
- finance_dev/analytics.py +3757 -0
- finance_dev/basesdk.py +393 -0
- finance_dev/calendar.py +1523 -0
- finance_dev/chart.py +1881 -0
- finance_dev/company.py +1105 -0
- finance_dev/corporateactions.py +1795 -0
- finance_dev/economy.py +1153 -0
- finance_dev/errors/__init__.py +94 -0
- finance_dev/errors/apierror.py +41 -0
- finance_dev/errors/authenticationerrorenvelope.py +43 -0
- finance_dev/errors/badrequest.py +34 -0
- finance_dev/errors/errorenvelope.py +42 -0
- finance_dev/errors/errorresponse.py +45 -0
- finance_dev/errors/financedevapierror.py +31 -0
- finance_dev/errors/forbidden.py +34 -0
- finance_dev/errors/internalservererror.py +35 -0
- finance_dev/errors/no_response_error.py +18 -0
- finance_dev/errors/notfound.py +34 -0
- finance_dev/errors/orderhistorybadrequest.py +35 -0
- finance_dev/errors/predorderserrorenvelope.py +42 -0
- finance_dev/errors/responsevalidationerror.py +28 -0
- finance_dev/errors/unauthorized.py +34 -0
- finance_dev/estimates.py +1906 -0
- finance_dev/etf.py +1108 -0
- finance_dev/filings.py +586 -0
- finance_dev/financials.py +4079 -0
- finance_dev/history.py +477 -0
- finance_dev/httpclient.py +126 -0
- finance_dev/indices.py +2308 -0
- finance_dev/logos.py +692 -0
- finance_dev/market.py +1825 -0
- finance_dev/markets.py +952 -0
- finance_dev/models/__init__.py +4568 -0
- finance_dev/models/accountbalancev2.py +340 -0
- finance_dev/models/accountitem.py +78 -0
- finance_dev/models/accountposition.py +147 -0
- finance_dev/models/aggregatetechnicalindicatorsresponse.py +192 -0
- finance_dev/models/analystinsightitem.py +161 -0
- finance_dev/models/analystinsightsresponse.py +39 -0
- finance_dev/models/apperror.py +123 -0
- finance_dev/models/authenticationerrordetail.py +58 -0
- finance_dev/models/bankbranchesresponse.py +96 -0
- finance_dev/models/basicfinancials.py +243 -0
- finance_dev/models/bullbearanalysisresponse.py +150 -0
- finance_dev/models/cancelorderop.py +40 -0
- finance_dev/models/cancelordrequest_union.py +287 -0
- finance_dev/models/cancelordresponse.py +115 -0
- finance_dev/models/cashflowstatement.py +290 -0
- finance_dev/models/cashflowstatementsresponse.py +61 -0
- finance_dev/models/chartbars.py +111 -0
- finance_dev/models/chartconfig.py +81 -0
- finance_dev/models/chartresolution.py +46 -0
- finance_dev/models/companyesgresponse.py +408 -0
- finance_dev/models/companyexecutive.py +70 -0
- finance_dev/models/companyexecutiveresponse.py +39 -0
- finance_dev/models/companypeersresponse.py +38 -0
- finance_dev/models/companypresentationresponse.py +96 -0
- finance_dev/models/companyprofile.py +255 -0
- finance_dev/models/conferencecallsresponse.py +169 -0
- finance_dev/models/congressionaltradingresponse.py +138 -0
- finance_dev/models/covid19uscasesresponse.py +79 -0
- finance_dev/models/createconfigwatchlistop.py +40 -0
- finance_dev/models/createwatchlistrequest.py +43 -0
- finance_dev/models/dailymarketsummaryresponse.py +73 -0
- finance_dev/models/deleteconfigwatchlistbyidop.py +53 -0
- finance_dev/models/dividenditem.py +125 -0
- finance_dev/models/dividendsresponse.py +61 -0
- finance_dev/models/earningrelease.py +291 -0
- finance_dev/models/earningscallliveresponse.py +103 -0
- finance_dev/models/earningsqualityscoreresponse.py +140 -0
- finance_dev/models/earningssurprisesresponse.py +125 -0
- finance_dev/models/ebitdaestimatesresponse.py +176 -0
- finance_dev/models/ebitestimatesresponse.py +176 -0
- finance_dev/models/economicscalendarevent.py +160 -0
- finance_dev/models/economicsindicator.py +87 -0
- finance_dev/models/epsestimatesresponse.py +176 -0
- finance_dev/models/equitydetailsdto.py +569 -0
- finance_dev/models/errorcode.py +48 -0
- finance_dev/models/etblistresponse.py +43 -0
- finance_dev/models/etbsearchrequest.py +21 -0
- finance_dev/models/etbsearchresponse.py +43 -0
- finance_dev/models/etfcountryallocationresponse.py +113 -0
- finance_dev/models/etfholdingsresponse.py +163 -0
- finance_dev/models/etfprofileresponse.py +234 -0
- finance_dev/models/etfsectorallocationresponse.py +113 -0
- finance_dev/models/exchangecode.py +90 -0
- finance_dev/models/fdaadvisorycommitteecalendarresponse.py +88 -0
- finance_dev/models/filingsimilarityrecord.py +115 -0
- finance_dev/models/filingssimilarityindexdatawrapper.py +52 -0
- finance_dev/models/filingssimilarityindexresponse.py +42 -0
- finance_dev/models/financialratiosresponse.py +252 -0
- finance_dev/models/financialsreporteddatawrapper.py +49 -0
- finance_dev/models/financialsreportedresponse.py +42 -0
- finance_dev/models/financialsrevenuebreakdowndatawrapper.py +49 -0
- finance_dev/models/financialsrevenuebreakdownresponse.py +42 -0
- finance_dev/models/financialsstatementsdatawrapper.py +44 -0
- finance_dev/models/financialsstatementsresponse.py +42 -0
- finance_dev/models/financialstatement.py +171 -0
- finance_dev/models/financialstatementtype.py +14 -0
- finance_dev/models/getaccountbalanceop.py +53 -0
- finance_dev/models/getaccountpositionsop.py +53 -0
- finance_dev/models/getaccountsresponse.py +22 -0
- finance_dev/models/getaggregatetechnicalindicatorsop.py +94 -0
- finance_dev/models/getanalystinsightsop.py +164 -0
- finance_dev/models/getbankbranchesop.py +53 -0
- finance_dev/models/getbaseeventop.py +87 -0
- finance_dev/models/getbullbearanalysisop.py +91 -0
- finance_dev/models/getcashflowstatementsop.py +564 -0
- finance_dev/models/getchartconfigop.py +40 -0
- finance_dev/models/getcharthistoryop.py +122 -0
- finance_dev/models/getcharttimeop.py +39 -0
- finance_dev/models/getcompanyesgop.py +53 -0
- finance_dev/models/getcompanyexecutivesop.py +56 -0
- finance_dev/models/getcompanymetricsop.py +68 -0
- finance_dev/models/getcompanypeersop.py +53 -0
- finance_dev/models/getcompanypresentationop.py +56 -0
- finance_dev/models/getcompanyprofileop.py +86 -0
- finance_dev/models/getconferencecallsop.py +111 -0
- finance_dev/models/getconfigwatchlistbyidop.py +53 -0
- finance_dev/models/getconfigwatchlistsop.py +40 -0
- finance_dev/models/getcongressionaltradingop.py +73 -0
- finance_dev/models/getcovid19uscasesop.py +43 -0
- finance_dev/models/getdailymarketsummaryop.py +92 -0
- finance_dev/models/getdividendsop.py +294 -0
- finance_dev/models/getearningscalendarop.py +87 -0
- finance_dev/models/getearningscallliveop.py +91 -0
- finance_dev/models/getearningsqualityscoreop.py +81 -0
- finance_dev/models/getearningssurprisesop.py +80 -0
- finance_dev/models/getebitdaestimatesop.py +91 -0
- finance_dev/models/getebitestimatesop.py +88 -0
- finance_dev/models/geteconomicscalendarop.py +92 -0
- finance_dev/models/geteconomicscalendarresponse.py +56 -0
- finance_dev/models/getepsestimatesop.py +88 -0
- finance_dev/models/getequitydetailsop.py +56 -0
- finance_dev/models/getequitydetailsresponse.py +45 -0
- finance_dev/models/getetblistop.py +40 -0
- finance_dev/models/getetfcountryallocationop.py +80 -0
- finance_dev/models/getetfholdingsop.py +96 -0
- finance_dev/models/getetfprofileop.py +77 -0
- finance_dev/models/getetfsectorallocationop.py +80 -0
- finance_dev/models/geteventcontractsop.py +87 -0
- finance_dev/models/getfdaadvisorycommitteecalendarop.py +47 -0
- finance_dev/models/getfilingssimilarityindexop.py +102 -0
- finance_dev/models/getfinancialratiosop.py +612 -0
- finance_dev/models/getfinancialstatementsop.py +117 -0
- finance_dev/models/getfundownershipop.py +77 -0
- finance_dev/models/gethistoricaldataop.py +61 -0
- finance_dev/models/gethistoricalesgop.py +53 -0
- finance_dev/models/gethistorybatchop.py +74 -0
- finance_dev/models/gethistoryop.py +123 -0
- finance_dev/models/getincomestatementsop.py +564 -0
- finance_dev/models/getindexbarop.py +140 -0
- finance_dev/models/getindexbarsop.py +149 -0
- finance_dev/models/getindexchartbarsop.py +178 -0
- finance_dev/models/getindexrealtimevaluesop.py +94 -0
- finance_dev/models/getinflationexpectationsop.py +157 -0
- finance_dev/models/getinflationop.py +154 -0
- finance_dev/models/getinsidertransactionsop.py +90 -0
- finance_dev/models/getinstitutionalownershipop.py +99 -0
- finance_dev/models/getinstitutionalportfolioop.py +75 -0
- finance_dev/models/getinvestmentthemeop.py +68 -0
- finance_dev/models/getipocalendarop.py +63 -0
- finance_dev/models/getlobbyingop.py +70 -0
- finance_dev/models/getmarketbreadthop.py +40 -0
- finance_dev/models/getmarketholidaysop.py +65 -0
- finance_dev/models/getmarketstatusop.py +65 -0
- finance_dev/models/getmergersandacquisitionsop.py +113 -0
- finance_dev/models/getnetinflowop.py +40 -0
- finance_dev/models/getnewsbyidop.py +73 -0
- finance_dev/models/getnewsop.py +98 -0
- finance_dev/models/getnewssentimentop.py +53 -0
- finance_dev/models/getoptionchainsnapshotop.py +244 -0
- finance_dev/models/getoptioncontractsnapshotop.py +69 -0
- finance_dev/models/getoptiondetailsop.py +56 -0
- finance_dev/models/getoptiondetailsresponse.py +45 -0
- finance_dev/models/getoptionlasttradeop.py +56 -0
- finance_dev/models/getoptionopencloseop.py +66 -0
- finance_dev/models/getoptionpreviousdayop.py +56 -0
- finance_dev/models/getoptionquotesop.py +177 -0
- finance_dev/models/getoptionsactivityop.py +111 -0
- finance_dev/models/getoptionsetfstopvolumeop.py +70 -0
- finance_dev/models/getoptionsstockstopgainersop.py +70 -0
- finance_dev/models/getoptionsstockstopvolumeop.py +70 -0
- finance_dev/models/getoptionsunusualactivityop.py +100 -0
- finance_dev/models/getoptiontradesop.py +177 -0
- finance_dev/models/getordersv2response.py +66 -0
- finance_dev/models/getownershipdataop.py +77 -0
- finance_dev/models/getpositionsresponse.py +39 -0
- finance_dev/models/getpredictionorderop.py +88 -0
- finance_dev/models/getpricetargetop.py +53 -0
- finance_dev/models/getquotesop.py +53 -0
- finance_dev/models/getratingsop.py +164 -0
- finance_dev/models/getratingsresponse.py +39 -0
- finance_dev/models/getreportedfinancialsop.py +127 -0
- finance_dev/models/getrevenuebreakdownop.py +85 -0
- finance_dev/models/getrevenueestimatesop.py +91 -0
- finance_dev/models/getsecfilingsop.py +113 -0
- finance_dev/models/getsectortickersop.py +124 -0
- finance_dev/models/getsectorwisechangeop.py +84 -0
- finance_dev/models/getshortinterestop.py +334 -0
- finance_dev/models/getshortvolumeop.py +333 -0
- finance_dev/models/getsocialsentimentop.py +90 -0
- finance_dev/models/getspinoffsop.py +112 -0
- finance_dev/models/getstockaggregatesop.py +174 -0
- finance_dev/models/getstocklastquoteop.py +56 -0
- finance_dev/models/getstocklasttradeop.py +56 -0
- finance_dev/models/getstockopencloseop.py +90 -0
- finance_dev/models/getstockpreviousdayop.py +80 -0
- finance_dev/models/getstockquotesop.py +177 -0
- finance_dev/models/getstocksnapshotsop.py +82 -0
- finance_dev/models/getstocksplitsop.py +243 -0
- finance_dev/models/getstocktradesop.py +177 -0
- finance_dev/models/getsupplychainop.py +53 -0
- finance_dev/models/getsupportresistancelevelsop.py +90 -0
- finance_dev/models/getsymbolinfoop.py +53 -0
- finance_dev/models/gettechnicalindicatorop.py +172 -0
- finance_dev/models/gettechnicalpatternsop.py +88 -0
- finance_dev/models/gettenderoffersop.py +112 -0
- finance_dev/models/gettickhistoryop.py +104 -0
- finance_dev/models/gettopgainersop.py +78 -0
- finance_dev/models/gettoplosersop.py +78 -0
- finance_dev/models/gettopmostactiveop.py +78 -0
- finance_dev/models/gettranscriptop.py +53 -0
- finance_dev/models/gettreasuryyieldsop.py +157 -0
- finance_dev/models/getunifiedsnapshotop.py +223 -0
- finance_dev/models/getupgradesdowngradesop.py +91 -0
- finance_dev/models/getusaspendingop.py +70 -0
- finance_dev/models/getuseraccountsop.py +40 -0
- finance_dev/models/getusptopatentsop.py +70 -0
- finance_dev/models/getvisaapplicationsop.py +73 -0
- finance_dev/models/historicalesgresponse.py +439 -0
- finance_dev/models/httpmetadata.py +24 -0
- finance_dev/models/incomestatement.py +296 -0
- finance_dev/models/incomestatementsresponse.py +61 -0
- finance_dev/models/indexbarresponse.py +194 -0
- finance_dev/models/indexbarsresponse.py +123 -0
- finance_dev/models/indexchartbarsresponse.py +213 -0
- finance_dev/models/indexgroupsresponse.py +78 -0
- finance_dev/models/indexlistresponse.py +95 -0
- finance_dev/models/indexsearchresponse.py +93 -0
- finance_dev/models/indicesbygroupresponse.py +93 -0
- finance_dev/models/indicesidentifiertype.py +28 -0
- finance_dev/models/indicesrealtimeindexinfo.py +67 -0
- finance_dev/models/indicesrealtimeindexvalue.py +157 -0
- finance_dev/models/indicesrealtimevaluesitem.py +80 -0
- finance_dev/models/indicesrealtimevaluesresponse.py +42 -0
- finance_dev/models/inflationexpectationsresponse.py +140 -0
- finance_dev/models/inflationresponse.py +132 -0
- finance_dev/models/insidertransaction.py +97 -0
- finance_dev/models/insidertransactionsresponse.py +39 -0
- finance_dev/models/institutionalholding.py +77 -0
- finance_dev/models/institutionalownershipresponse.py +39 -0
- finance_dev/models/institutionalportfolioresponse.py +39 -0
- finance_dev/models/investmentthemeid.py +35 -0
- finance_dev/models/investmentthemeresponse.py +80 -0
- finance_dev/models/ipocalendarresponse.py +39 -0
- finance_dev/models/ipoitem.py +93 -0
- finance_dev/models/listactiveordersop.py +87 -0
- finance_dev/models/listcategoriesop.py +79 -0
- finance_dev/models/listindexgroupsop.py +40 -0
- finance_dev/models/listindicesbygroupop.py +58 -0
- finance_dev/models/listindicesop.py +91 -0
- finance_dev/models/listoptioncontractsop.py +66 -0
- finance_dev/models/listoptionexpirydatesop.py +56 -0
- finance_dev/models/listorderhistoryop.py +139 -0
- finance_dev/models/listpredictionordersop.py +134 -0
- finance_dev/models/listtranscriptsop.py +53 -0
- finance_dev/models/lobbyingresponse.py +166 -0
- finance_dev/models/logosearchresponse.py +152 -0
- finance_dev/models/logosyncresponse.py +277 -0
- finance_dev/models/marketbreadth.py +97 -0
- finance_dev/models/marketbreadthresponse.py +44 -0
- finance_dev/models/marketholiday.py +56 -0
- finance_dev/models/marketholidayresponse.py +39 -0
- finance_dev/models/marketstatus.py +67 -0
- finance_dev/models/mergersandacquisitionsresponse.py +186 -0
- finance_dev/models/metricseriespoint.py +43 -0
- finance_dev/models/netinflow.py +81 -0
- finance_dev/models/netinflowresponse.py +44 -0
- finance_dev/models/newsitem.py +102 -0
- finance_dev/models/newslistresponse.py +128 -0
- finance_dev/models/newssentimentresponse.py +176 -0
- finance_dev/models/newstypeenum.py +16 -0
- finance_dev/models/optionchainsnapshotresponse.py +64 -0
- finance_dev/models/optioncontractsnapshotresponse.py +64 -0
- finance_dev/models/optioncontractsnapshotrow.py +164 -0
- finance_dev/models/optioncontractsresponse.py +131 -0
- finance_dev/models/optiondetailsdto.py +72 -0
- finance_dev/models/optionexpirydatesresponse.py +53 -0
- finance_dev/models/optionlasttraderesponse.py +169 -0
- finance_dev/models/optionopencloseresponse.py +97 -0
- finance_dev/models/optionpreviousdayresponse.py +89 -0
- finance_dev/models/optionquotesresponse.py +138 -0
- finance_dev/models/optionsactivityresponse.py +265 -0
- finance_dev/models/optionsnapshotcontractdetails.py +85 -0
- finance_dev/models/optionsnapshotdaybar.py +107 -0
- finance_dev/models/optionsnapshotgreeks.py +67 -0
- finance_dev/models/optionsnapshotlastquote.py +116 -0
- finance_dev/models/optionsnapshotlasttrade.py +102 -0
- finance_dev/models/optionsnapshotunderlying.py +86 -0
- finance_dev/models/optionsscreeneritem.py +151 -0
- finance_dev/models/optionsunusualactivityresponse.py +62 -0
- finance_dev/models/optionsunusualactivitytrade.py +103 -0
- finance_dev/models/optiontradesresponse.py +132 -0
- finance_dev/models/orderrequesttimeinforceenum.py +29 -0
- finance_dev/models/ordersideenum.py +20 -0
- finance_dev/models/ordertypeenum.py +20 -0
- finance_dev/models/ordleg.py +162 -0
- finance_dev/models/ordresponse.py +202 -0
- finance_dev/models/ownershipdataresponse.py +39 -0
- finance_dev/models/ownershiprecord.py +74 -0
- finance_dev/models/placeorderop.py +40 -0
- finance_dev/models/placeordrequest_union.py +335 -0
- finance_dev/models/placepredictionorderop.py +114 -0
- finance_dev/models/predmdbaseevent.py +62 -0
- finance_dev/models/predmdbaseeventhit.py +53 -0
- finance_dev/models/predmdbaseeventsearchresult.py +46 -0
- finance_dev/models/predmdbaseeventwithevents.py +32 -0
- finance_dev/models/predmdbatchhistoryrequest.py +16 -0
- finance_dev/models/predmdbatchhistoryresponse.py +16 -0
- finance_dev/models/predmdcategory.py +48 -0
- finance_dev/models/predmdcontract.py +177 -0
- finance_dev/models/predmdcontracthit.py +157 -0
- finance_dev/models/predmdcontractsearchresult.py +46 -0
- finance_dev/models/predmdevent.py +136 -0
- finance_dev/models/predmdeventhit.py +73 -0
- finance_dev/models/predmdeventsearchresult.py +46 -0
- finance_dev/models/predmdeventwithcontracts.py +22 -0
- finance_dev/models/predmdhistoryrequest.py +59 -0
- finance_dev/models/predmdhistoryresponse.py +53 -0
- finance_dev/models/predmdtick.py +53 -0
- finance_dev/models/predordersapperror.py +78 -0
- finance_dev/models/predordersorder.py +267 -0
- finance_dev/models/predordersorderdetail.py +26 -0
- finance_dev/models/predordersorderpage.py +45 -0
- finance_dev/models/predordersorderreport.py +88 -0
- finance_dev/models/predordersplaceorderrequest.py +159 -0
- finance_dev/models/previeworderop.py +40 -0
- finance_dev/models/previeworderresponse.py +127 -0
- finance_dev/models/pricetargetresponse.py +89 -0
- finance_dev/models/quotedata.py +49 -0
- finance_dev/models/quotesresponse.py +62 -0
- finance_dev/models/quotevalues.py +114 -0
- finance_dev/models/rating.py +193 -0
- finance_dev/models/ratingsaccuracy.py +242 -0
- finance_dev/models/replaceconfigwatchlistsop.py +40 -0
- finance_dev/models/replaceorderop.py +40 -0
- finance_dev/models/replaceordrequest_union.py +367 -0
- finance_dev/models/replaceordresponse.py +144 -0
- finance_dev/models/reportedbsitem.py +53 -0
- finance_dev/models/reportedfiling.py +110 -0
- finance_dev/models/reportedreport.py +39 -0
- finance_dev/models/reportingfrequency.py +16 -0
- finance_dev/models/revenuebreakdownaxis.py +52 -0
- finance_dev/models/revenuebreakdowndatapoint.py +58 -0
- finance_dev/models/revenuebreakdownentry.py +51 -0
- finance_dev/models/revenuebreakdowninner.py +75 -0
- finance_dev/models/revenueestimatesresponse.py +176 -0
- finance_dev/models/screenclause.py +70 -0
- finance_dev/models/screengroup.py +75 -0
- finance_dev/models/searchetbsymbolsop.py +40 -0
- finance_dev/models/searchindicesop.py +55 -0
- finance_dev/models/searchlogosop.py +158 -0
- finance_dev/models/searchmarketsymbolsop.py +80 -0
- finance_dev/models/searchop.py +232 -0
- finance_dev/models/searchsymbolitem.py +76 -0
- finance_dev/models/searchsymbolresponseitem.py +71 -0
- finance_dev/models/searchsymbolsop.py +77 -0
- finance_dev/models/secfiling.py +91 -0
- finance_dev/models/secfilingsresponse.py +39 -0
- finance_dev/models/sectoravgchange.py +50 -0
- finance_dev/models/security.py +59 -0
- finance_dev/models/securitytypeenum.py +16 -0
- finance_dev/models/shortinterestresponse.py +126 -0
- finance_dev/models/shortvolumeresponse.py +198 -0
- finance_dev/models/socialsentimentresponse.py +124 -0
- finance_dev/models/sortorderenum.py +13 -0
- finance_dev/models/spinoffsresponse.py +136 -0
- finance_dev/models/stockaggregatesresponse.py +92 -0
- finance_dev/models/stocklastquoteresponse.py +175 -0
- finance_dev/models/stocklasttraderesponse.py +169 -0
- finance_dev/models/stockohlcbar.py +85 -0
- finance_dev/models/stockopencloseresponse.py +109 -0
- finance_dev/models/stockpreviousdayresponse.py +86 -0
- finance_dev/models/stockquotesresponse.py +170 -0
- finance_dev/models/stockscreenerop.py +144 -0
- finance_dev/models/stockscreenerrequest.py +131 -0
- finance_dev/models/stockscreenerresponse.py +197 -0
- finance_dev/models/stocksnapshotsresponse.py +454 -0
- finance_dev/models/stocksplitsresponse.py +144 -0
- finance_dev/models/stocktradesresponse.py +164 -0
- finance_dev/models/supplychainresponse.py +158 -0
- finance_dev/models/supportresistancelevelsresponse.py +68 -0
- finance_dev/models/symboldetails.py +119 -0
- finance_dev/models/symbolerror.py +43 -0
- finance_dev/models/symbolinfo.py +183 -0
- finance_dev/models/synclogosop.py +146 -0
- finance_dev/models/technicalindicatorresponse.py +43 -0
- finance_dev/models/technicalindicatortype.py +21 -0
- finance_dev/models/technicalpatternsresponse.py +249 -0
- finance_dev/models/tenderofferidentifiertype.py +26 -0
- finance_dev/models/tenderoffersresponse.py +548 -0
- finance_dev/models/tickchartbars.py +104 -0
- finance_dev/models/tickresolution.py +20 -0
- finance_dev/models/timeinforceenum.py +26 -0
- finance_dev/models/tradeorderlegv2.py +164 -0
- finance_dev/models/tradeorderv2.py +434 -0
- finance_dev/models/transcriptresponse.py +162 -0
- finance_dev/models/transcriptsresponse.py +89 -0
- finance_dev/models/treasuryyieldsresponse.py +160 -0
- finance_dev/models/unifiedsnapshotresponse.py +308 -0
- finance_dev/models/updateconfigwatchlistbyidop.py +65 -0
- finance_dev/models/updatewatchlistrequest_union.py +134 -0
- finance_dev/models/upgradesdowngradesresponse.py +98 -0
- finance_dev/models/usaspendingresponse.py +222 -0
- finance_dev/models/usptopatentsresponse.py +134 -0
- finance_dev/models/visaapplicationsresponse.py +228 -0
- finance_dev/models/watchlist.py +68 -0
- finance_dev/models/watchlistrequest.py +43 -0
- finance_dev/models/watchlistresponse.py +44 -0
- finance_dev/news_sdk.py +829 -0
- finance_dev/options.py +3443 -0
- finance_dev/orders.py +1907 -0
- finance_dev/ownership.py +1386 -0
- finance_dev/predictions.py +29 -0
- finance_dev/predictions_orders.py +852 -0
- finance_dev/py.typed +1 -0
- finance_dev/sdk.py +347 -0
- finance_dev/sdkconfiguration.py +50 -0
- finance_dev/signals.py +338 -0
- finance_dev/stocks.py +3131 -0
- finance_dev/technicalanalysis_sdk.py +1137 -0
- finance_dev/types/__init__.py +25 -0
- finance_dev/types/base64fileinput.py +44 -0
- finance_dev/types/basemodel.py +78 -0
- finance_dev/utils/__init__.py +181 -0
- finance_dev/utils/annotations.py +80 -0
- finance_dev/utils/datetimes.py +42 -0
- finance_dev/utils/dynamic_imports.py +55 -0
- finance_dev/utils/enums.py +135 -0
- finance_dev/utils/eventstreaming.py +327 -0
- finance_dev/utils/forms.py +240 -0
- finance_dev/utils/headers.py +137 -0
- finance_dev/utils/logger.py +23 -0
- finance_dev/utils/metadata.py +120 -0
- finance_dev/utils/queryparams.py +218 -0
- finance_dev/utils/requestbodies.py +68 -0
- finance_dev/utils/retries.py +373 -0
- finance_dev/utils/security.py +199 -0
- finance_dev/utils/serializers.py +327 -0
- finance_dev/utils/unmarshal_json_response.py +39 -0
- finance_dev/utils/url.py +155 -0
- finance_dev/utils/values.py +143 -0
- finance_dev/watchlist_sdk.py +1583 -0
- finance_dev/websocket/__init__.py +57 -0
- finance_dev/websocket/account.py +5 -0
- finance_dev/websocket/auth.py +124 -0
- finance_dev/websocket/chart.py +5 -0
- finance_dev/websocket/codec.py +66 -0
- finance_dev/websocket/config.py +52 -0
- finance_dev/websocket/errors.py +54 -0
- finance_dev/websocket/market.py +5 -0
- finance_dev/websocket/models/__init__.py +52 -0
- finance_dev/websocket/models/account.py +60 -0
- finance_dev/websocket/models/chart.py +44 -0
- finance_dev/websocket/models/common.py +85 -0
- finance_dev/websocket/models/market.py +113 -0
- finance_dev/websocket/resources.py +327 -0
- finance_dev/websocket/sdk.py +13 -0
- finance_dev/websocket/transport/async_connection.py +493 -0
- finance_dev/websocket/transport/base.py +78 -0
- finance_dev/websocket/transport/sync_connection.py +470 -0
- finance_dev-0.9.0.dist-info/METADATA +913 -0
- finance_dev-0.9.0.dist-info/RECORD +486 -0
- finance_dev-0.9.0.dist-info/WHEEL +5 -0
- finance_dev-0.9.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,367 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
# @generated-id: c53ee292474c
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
from .orderrequesttimeinforceenum import OrderRequestTimeInForceEnum
|
|
6
|
+
from .ordersideenum import OrderSideEnum
|
|
7
|
+
from .ordertypeenum import OrderTypeEnum
|
|
8
|
+
from .ordleg import OrdLeg, OrdLegTypedDict
|
|
9
|
+
from finance_dev import models
|
|
10
|
+
from finance_dev.types import BaseModel, UNSET_SENTINEL
|
|
11
|
+
import pydantic
|
|
12
|
+
from pydantic import field_serializer, model_serializer
|
|
13
|
+
from typing import List, Optional, Union
|
|
14
|
+
from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class ReplaceOrdRequest2TypedDict(TypedDict):
|
|
18
|
+
orig_cl_ord_id: str
|
|
19
|
+
r"""Client order ID of the original open order you want to replace. Use the `clOrdId` returned by Place Order or List active orders. **Important — ID cycling:** each successful replace returns a new `clOrdId` in the response. For any subsequent replace of the same order, send this new `clOrdId` as `origClOrdId` — not the ID from the original placement. Reusing the old ID will be rejected."""
|
|
20
|
+
symbol: str
|
|
21
|
+
r"""Symbol on the original order. Use the exact symbol from the order record."""
|
|
22
|
+
trading_account_id: str
|
|
23
|
+
r"""Trading account identifier that owns the order being replaced. It must match the account on the original order."""
|
|
24
|
+
account_id: NotRequired[str]
|
|
25
|
+
r"""Account identifier; provide accountId or tradingAccountId. Both may be supplied."""
|
|
26
|
+
client_id: NotRequired[str]
|
|
27
|
+
r"""Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately."""
|
|
28
|
+
currency: NotRequired[str]
|
|
29
|
+
r"""Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency."""
|
|
30
|
+
legs: NotRequired[List[OrdLegTypedDict]]
|
|
31
|
+
r"""Option legs to replace, for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread/multi-leg strategy. The instrument is identified from the legs (single leg) or auto-parsed from an OSI symbol when `legs` is omitted."""
|
|
32
|
+
price: NotRequired[str]
|
|
33
|
+
r"""Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price."""
|
|
34
|
+
qty: NotRequired[str]
|
|
35
|
+
r"""Replacement order quantity as a decimal string. Send it when changing order size."""
|
|
36
|
+
side: NotRequired[OrderSideEnum]
|
|
37
|
+
r"""Which direction to trade in. Pick one:
|
|
38
|
+
- `BUY` — buying shares or contracts (opens a long position or closes an existing short).
|
|
39
|
+
- `SELL` — selling shares or contracts you already hold (closes a long position).
|
|
40
|
+
- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.
|
|
41
|
+
- `BUY_TO_COVER` — buying shares to close an open short position.
|
|
42
|
+
"""
|
|
43
|
+
stop_price: NotRequired[str]
|
|
44
|
+
r"""Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger."""
|
|
45
|
+
time_in_force: NotRequired[OrderRequestTimeInForceEnum]
|
|
46
|
+
r"""How long the order should stay alive before automatically cancelling. Pick one:
|
|
47
|
+
- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.
|
|
48
|
+
- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).
|
|
49
|
+
- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.
|
|
50
|
+
- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.
|
|
51
|
+
- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.
|
|
52
|
+
- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.
|
|
53
|
+
- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.
|
|
54
|
+
"""
|
|
55
|
+
type: NotRequired[OrderTypeEnum]
|
|
56
|
+
r"""How the order is priced. Pick one:
|
|
57
|
+
- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.
|
|
58
|
+
- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.
|
|
59
|
+
- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.
|
|
60
|
+
- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
class ReplaceOrdRequest2(BaseModel):
|
|
65
|
+
orig_cl_ord_id: Annotated[str, pydantic.Field(alias="origClOrdId")]
|
|
66
|
+
r"""Client order ID of the original open order you want to replace. Use the `clOrdId` returned by Place Order or List active orders. **Important — ID cycling:** each successful replace returns a new `clOrdId` in the response. For any subsequent replace of the same order, send this new `clOrdId` as `origClOrdId` — not the ID from the original placement. Reusing the old ID will be rejected."""
|
|
67
|
+
|
|
68
|
+
symbol: str
|
|
69
|
+
r"""Symbol on the original order. Use the exact symbol from the order record."""
|
|
70
|
+
|
|
71
|
+
trading_account_id: Annotated[str, pydantic.Field(alias="tradingAccountId")]
|
|
72
|
+
r"""Trading account identifier that owns the order being replaced. It must match the account on the original order."""
|
|
73
|
+
|
|
74
|
+
account_id: Annotated[Optional[str], pydantic.Field(alias="accountId")] = None
|
|
75
|
+
r"""Account identifier; provide accountId or tradingAccountId. Both may be supplied."""
|
|
76
|
+
|
|
77
|
+
client_id: Annotated[Optional[str], pydantic.Field(alias="clientId")] = None
|
|
78
|
+
r"""Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately."""
|
|
79
|
+
|
|
80
|
+
currency: Optional[str] = None
|
|
81
|
+
r"""Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency."""
|
|
82
|
+
|
|
83
|
+
legs: Optional[List[OrdLeg]] = None
|
|
84
|
+
r"""Option legs to replace, for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread/multi-leg strategy. The instrument is identified from the legs (single leg) or auto-parsed from an OSI symbol when `legs` is omitted."""
|
|
85
|
+
|
|
86
|
+
price: Optional[str] = None
|
|
87
|
+
r"""Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price."""
|
|
88
|
+
|
|
89
|
+
qty: Optional[str] = None
|
|
90
|
+
r"""Replacement order quantity as a decimal string. Send it when changing order size."""
|
|
91
|
+
|
|
92
|
+
side: Optional[OrderSideEnum] = None
|
|
93
|
+
r"""Which direction to trade in. Pick one:
|
|
94
|
+
- `BUY` — buying shares or contracts (opens a long position or closes an existing short).
|
|
95
|
+
- `SELL` — selling shares or contracts you already hold (closes a long position).
|
|
96
|
+
- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.
|
|
97
|
+
- `BUY_TO_COVER` — buying shares to close an open short position.
|
|
98
|
+
"""
|
|
99
|
+
|
|
100
|
+
stop_price: Annotated[Optional[str], pydantic.Field(alias="stopPrice")] = None
|
|
101
|
+
r"""Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger."""
|
|
102
|
+
|
|
103
|
+
time_in_force: Annotated[
|
|
104
|
+
Optional[OrderRequestTimeInForceEnum], pydantic.Field(alias="timeInForce")
|
|
105
|
+
] = None
|
|
106
|
+
r"""How long the order should stay alive before automatically cancelling. Pick one:
|
|
107
|
+
- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.
|
|
108
|
+
- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).
|
|
109
|
+
- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.
|
|
110
|
+
- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.
|
|
111
|
+
- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.
|
|
112
|
+
- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.
|
|
113
|
+
- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.
|
|
114
|
+
"""
|
|
115
|
+
|
|
116
|
+
type: Optional[OrderTypeEnum] = None
|
|
117
|
+
r"""How the order is priced. Pick one:
|
|
118
|
+
- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.
|
|
119
|
+
- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.
|
|
120
|
+
- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.
|
|
121
|
+
- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
@field_serializer("side")
|
|
125
|
+
def serialize_side(self, value):
|
|
126
|
+
if isinstance(value, str):
|
|
127
|
+
try:
|
|
128
|
+
return models.OrderSideEnum(value)
|
|
129
|
+
except ValueError:
|
|
130
|
+
return value
|
|
131
|
+
return value
|
|
132
|
+
|
|
133
|
+
@field_serializer("time_in_force")
|
|
134
|
+
def serialize_time_in_force(self, value):
|
|
135
|
+
if isinstance(value, str):
|
|
136
|
+
try:
|
|
137
|
+
return models.OrderRequestTimeInForceEnum(value)
|
|
138
|
+
except ValueError:
|
|
139
|
+
return value
|
|
140
|
+
return value
|
|
141
|
+
|
|
142
|
+
@field_serializer("type")
|
|
143
|
+
def serialize_type(self, value):
|
|
144
|
+
if isinstance(value, str):
|
|
145
|
+
try:
|
|
146
|
+
return models.OrderTypeEnum(value)
|
|
147
|
+
except ValueError:
|
|
148
|
+
return value
|
|
149
|
+
return value
|
|
150
|
+
|
|
151
|
+
@model_serializer(mode="wrap")
|
|
152
|
+
def serialize_model(self, handler):
|
|
153
|
+
optional_fields = set(
|
|
154
|
+
[
|
|
155
|
+
"accountId",
|
|
156
|
+
"clientId",
|
|
157
|
+
"currency",
|
|
158
|
+
"legs",
|
|
159
|
+
"price",
|
|
160
|
+
"qty",
|
|
161
|
+
"side",
|
|
162
|
+
"stopPrice",
|
|
163
|
+
"timeInForce",
|
|
164
|
+
"type",
|
|
165
|
+
]
|
|
166
|
+
)
|
|
167
|
+
serialized = handler(self)
|
|
168
|
+
m = {}
|
|
169
|
+
|
|
170
|
+
for n, f in type(self).model_fields.items():
|
|
171
|
+
k = f.alias or n
|
|
172
|
+
val = serialized.get(k, serialized.get(n))
|
|
173
|
+
|
|
174
|
+
if val != UNSET_SENTINEL:
|
|
175
|
+
if val is not None or k not in optional_fields:
|
|
176
|
+
m[k] = val
|
|
177
|
+
|
|
178
|
+
return m
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
class ReplaceOrdRequest1TypedDict(TypedDict):
|
|
182
|
+
account_id: str
|
|
183
|
+
r"""Account identifier; provide accountId or tradingAccountId. Both may be supplied."""
|
|
184
|
+
orig_cl_ord_id: str
|
|
185
|
+
r"""Client order ID of the original open order you want to replace. Use the `clOrdId` returned by Place Order or List active orders. **Important — ID cycling:** each successful replace returns a new `clOrdId` in the response. For any subsequent replace of the same order, send this new `clOrdId` as `origClOrdId` — not the ID from the original placement. Reusing the old ID will be rejected."""
|
|
186
|
+
symbol: str
|
|
187
|
+
r"""Symbol on the original order. Use the exact symbol from the order record."""
|
|
188
|
+
client_id: NotRequired[str]
|
|
189
|
+
r"""Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately."""
|
|
190
|
+
currency: NotRequired[str]
|
|
191
|
+
r"""Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency."""
|
|
192
|
+
legs: NotRequired[List[OrdLegTypedDict]]
|
|
193
|
+
r"""Option legs to replace, for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread/multi-leg strategy. The instrument is identified from the legs (single leg) or auto-parsed from an OSI symbol when `legs` is omitted."""
|
|
194
|
+
price: NotRequired[str]
|
|
195
|
+
r"""Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price."""
|
|
196
|
+
qty: NotRequired[str]
|
|
197
|
+
r"""Replacement order quantity as a decimal string. Send it when changing order size."""
|
|
198
|
+
side: NotRequired[OrderSideEnum]
|
|
199
|
+
r"""Which direction to trade in. Pick one:
|
|
200
|
+
- `BUY` — buying shares or contracts (opens a long position or closes an existing short).
|
|
201
|
+
- `SELL` — selling shares or contracts you already hold (closes a long position).
|
|
202
|
+
- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.
|
|
203
|
+
- `BUY_TO_COVER` — buying shares to close an open short position.
|
|
204
|
+
"""
|
|
205
|
+
stop_price: NotRequired[str]
|
|
206
|
+
r"""Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger."""
|
|
207
|
+
time_in_force: NotRequired[OrderRequestTimeInForceEnum]
|
|
208
|
+
r"""How long the order should stay alive before automatically cancelling. Pick one:
|
|
209
|
+
- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.
|
|
210
|
+
- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).
|
|
211
|
+
- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.
|
|
212
|
+
- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.
|
|
213
|
+
- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.
|
|
214
|
+
- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.
|
|
215
|
+
- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.
|
|
216
|
+
"""
|
|
217
|
+
trading_account_id: NotRequired[str]
|
|
218
|
+
r"""Trading account identifier that owns the order being replaced. It must match the account on the original order."""
|
|
219
|
+
type: NotRequired[OrderTypeEnum]
|
|
220
|
+
r"""How the order is priced. Pick one:
|
|
221
|
+
- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.
|
|
222
|
+
- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.
|
|
223
|
+
- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.
|
|
224
|
+
- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.
|
|
225
|
+
"""
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
class ReplaceOrdRequest1(BaseModel):
|
|
229
|
+
account_id: Annotated[str, pydantic.Field(alias="accountId")]
|
|
230
|
+
r"""Account identifier; provide accountId or tradingAccountId. Both may be supplied."""
|
|
231
|
+
|
|
232
|
+
orig_cl_ord_id: Annotated[str, pydantic.Field(alias="origClOrdId")]
|
|
233
|
+
r"""Client order ID of the original open order you want to replace. Use the `clOrdId` returned by Place Order or List active orders. **Important — ID cycling:** each successful replace returns a new `clOrdId` in the response. For any subsequent replace of the same order, send this new `clOrdId` as `origClOrdId` — not the ID from the original placement. Reusing the old ID will be rejected."""
|
|
234
|
+
|
|
235
|
+
symbol: str
|
|
236
|
+
r"""Symbol on the original order. Use the exact symbol from the order record."""
|
|
237
|
+
|
|
238
|
+
client_id: Annotated[Optional[str], pydantic.Field(alias="clientId")] = None
|
|
239
|
+
r"""Optional new client identifier from your app for the replacement order. Use this when you need to track replacement attempts separately."""
|
|
240
|
+
|
|
241
|
+
currency: Optional[str] = None
|
|
242
|
+
r"""Three-letter currency code for the replacement order. Use USD for U.S. dollar orders unless your integration supports another currency."""
|
|
243
|
+
|
|
244
|
+
legs: Optional[List[OrdLeg]] = None
|
|
245
|
+
r"""Option legs to replace, for single-leg or multi-leg option orders. Omit this field for equity orders. Send 1 leg for a single option contract or 2 to 4 legs for a spread/multi-leg strategy. The instrument is identified from the legs (single leg) or auto-parsed from an OSI symbol when `legs` is omitted."""
|
|
246
|
+
|
|
247
|
+
price: Optional[str] = None
|
|
248
|
+
r"""Replacement limit price as a decimal string. Send it when changing a LIMIT or STOP_LIMIT order price."""
|
|
249
|
+
|
|
250
|
+
qty: Optional[str] = None
|
|
251
|
+
r"""Replacement order quantity as a decimal string. Send it when changing order size."""
|
|
252
|
+
|
|
253
|
+
side: Optional[OrderSideEnum] = None
|
|
254
|
+
r"""Which direction to trade in. Pick one:
|
|
255
|
+
- `BUY` — buying shares or contracts (opens a long position or closes an existing short).
|
|
256
|
+
- `SELL` — selling shares or contracts you already hold (closes a long position).
|
|
257
|
+
- `SELL_SHORT` — selling shares you do not own (opens a short position). Subject to short-sale regulations.
|
|
258
|
+
- `BUY_TO_COVER` — buying shares to close an open short position.
|
|
259
|
+
"""
|
|
260
|
+
|
|
261
|
+
stop_price: Annotated[Optional[str], pydantic.Field(alias="stopPrice")] = None
|
|
262
|
+
r"""Replacement stop trigger as a decimal string. Send it when changing a STOP or STOP_LIMIT order trigger."""
|
|
263
|
+
|
|
264
|
+
time_in_force: Annotated[
|
|
265
|
+
Optional[OrderRequestTimeInForceEnum], pydantic.Field(alias="timeInForce")
|
|
266
|
+
] = None
|
|
267
|
+
r"""How long the order should stay alive before automatically cancelling. Pick one:
|
|
268
|
+
- `DAY` — Active until the end of today's regular trading session, then cancelled if not filled. The default choice for most orders.
|
|
269
|
+
- `GTC` — Good 'Til Cancelled. Stays open across multiple trading days until you cancel it (the broker may cap at 60–90 days).
|
|
270
|
+
- `IOC` — Immediate Or Cancel. Fill whatever you can right now; cancel the rest immediately. Useful when you want partial fills but no resting order.
|
|
271
|
+
- `FOK` — Fill Or Kill. Fill the entire order immediately, or cancel it entirely. No partial fills allowed.
|
|
272
|
+
- `EXTENDED_HOURS` — Active during pre-market and after-hours trading sessions in addition to regular hours.
|
|
273
|
+
- `AT_THE_OPENING` — Execute at the official market open price; if it can't fill at open, it's cancelled.
|
|
274
|
+
- `AT_THE_CLOSE` — Execute at the official market close price; if it can't fill at close, it's cancelled.
|
|
275
|
+
"""
|
|
276
|
+
|
|
277
|
+
trading_account_id: Annotated[
|
|
278
|
+
Optional[str], pydantic.Field(alias="tradingAccountId")
|
|
279
|
+
] = None
|
|
280
|
+
r"""Trading account identifier that owns the order being replaced. It must match the account on the original order."""
|
|
281
|
+
|
|
282
|
+
type: Optional[OrderTypeEnum] = None
|
|
283
|
+
r"""How the order is priced. Pick one:
|
|
284
|
+
- `MARKET` — Execute immediately at the best available price. Fast and guaranteed to fill, but no price guarantee — the actual fill price can move during execution.
|
|
285
|
+
- `LIMIT` — Execute only at the limit `price` or better (lower for buys, higher for sells). Gives you price control, no execution guarantee. Requires the `price` field.
|
|
286
|
+
- `STOP` — Sits inactive until the market hits `stopPrice`, then converts to a market order. Common for stop-loss exits. Requires the `stopPrice` field.
|
|
287
|
+
- `STOP_LIMIT` — Sits inactive until the market hits `stopPrice`, then converts to a limit order at `price`. More control than `STOP`, but the limit may not fill. Requires both `stopPrice` and `price`.
|
|
288
|
+
"""
|
|
289
|
+
|
|
290
|
+
@field_serializer("side")
|
|
291
|
+
def serialize_side(self, value):
|
|
292
|
+
if isinstance(value, str):
|
|
293
|
+
try:
|
|
294
|
+
return models.OrderSideEnum(value)
|
|
295
|
+
except ValueError:
|
|
296
|
+
return value
|
|
297
|
+
return value
|
|
298
|
+
|
|
299
|
+
@field_serializer("time_in_force")
|
|
300
|
+
def serialize_time_in_force(self, value):
|
|
301
|
+
if isinstance(value, str):
|
|
302
|
+
try:
|
|
303
|
+
return models.OrderRequestTimeInForceEnum(value)
|
|
304
|
+
except ValueError:
|
|
305
|
+
return value
|
|
306
|
+
return value
|
|
307
|
+
|
|
308
|
+
@field_serializer("type")
|
|
309
|
+
def serialize_type(self, value):
|
|
310
|
+
if isinstance(value, str):
|
|
311
|
+
try:
|
|
312
|
+
return models.OrderTypeEnum(value)
|
|
313
|
+
except ValueError:
|
|
314
|
+
return value
|
|
315
|
+
return value
|
|
316
|
+
|
|
317
|
+
@model_serializer(mode="wrap")
|
|
318
|
+
def serialize_model(self, handler):
|
|
319
|
+
optional_fields = set(
|
|
320
|
+
[
|
|
321
|
+
"clientId",
|
|
322
|
+
"currency",
|
|
323
|
+
"legs",
|
|
324
|
+
"price",
|
|
325
|
+
"qty",
|
|
326
|
+
"side",
|
|
327
|
+
"stopPrice",
|
|
328
|
+
"timeInForce",
|
|
329
|
+
"tradingAccountId",
|
|
330
|
+
"type",
|
|
331
|
+
]
|
|
332
|
+
)
|
|
333
|
+
serialized = handler(self)
|
|
334
|
+
m = {}
|
|
335
|
+
|
|
336
|
+
for n, f in type(self).model_fields.items():
|
|
337
|
+
k = f.alias or n
|
|
338
|
+
val = serialized.get(k, serialized.get(n))
|
|
339
|
+
|
|
340
|
+
if val != UNSET_SENTINEL:
|
|
341
|
+
if val is not None or k not in optional_fields:
|
|
342
|
+
m[k] = val
|
|
343
|
+
|
|
344
|
+
return m
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
ReplaceOrdRequestUnionTypedDict = TypeAliasType(
|
|
348
|
+
"ReplaceOrdRequestUnionTypedDict",
|
|
349
|
+
Union[ReplaceOrdRequest1TypedDict, ReplaceOrdRequest2TypedDict],
|
|
350
|
+
)
|
|
351
|
+
r"""Request body for replacing an open order through the core trading API. Use this when the user changes price, quantity, stop price, or time-in-force before the order fully fills."""
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
ReplaceOrdRequestUnion = TypeAliasType(
|
|
355
|
+
"ReplaceOrdRequestUnion", Union[ReplaceOrdRequest1, ReplaceOrdRequest2]
|
|
356
|
+
)
|
|
357
|
+
r"""Request body for replacing an open order through the core trading API. Use this when the user changes price, quantity, stop price, or time-in-force before the order fully fills."""
|
|
358
|
+
|
|
359
|
+
|
|
360
|
+
try:
|
|
361
|
+
ReplaceOrdRequest2.model_rebuild()
|
|
362
|
+
except NameError:
|
|
363
|
+
pass
|
|
364
|
+
try:
|
|
365
|
+
ReplaceOrdRequest1.model_rebuild()
|
|
366
|
+
except NameError:
|
|
367
|
+
pass
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
# @generated-id: 751fea35b9b6
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
from datetime import datetime
|
|
6
|
+
from enum import Enum
|
|
7
|
+
from finance_dev import models, utils
|
|
8
|
+
from finance_dev.types import BaseModel, UNSET_SENTINEL
|
|
9
|
+
import pydantic
|
|
10
|
+
from pydantic import field_serializer, model_serializer
|
|
11
|
+
from typing import Optional
|
|
12
|
+
from typing_extensions import Annotated, NotRequired, TypedDict
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class ReplaceOrdResponseStatus(str, Enum, metaclass=utils.OpenEnumMeta):
|
|
16
|
+
r"""Order status after the replace request. Typical values after a successful replace:
|
|
17
|
+
- `PENDING_REPLACE` — replace request accepted by the broker but not yet final. Keep monitoring; will move to `REPLACED` once confirmed.
|
|
18
|
+
- `REPLACED` — the modification took effect. From now on, refer to the order by the new `clOrdId`.
|
|
19
|
+
- `REJECTED` — the replace was refused (e.g. the order had already fully filled). The original order is unchanged.
|
|
20
|
+
|
|
21
|
+
The full FIX OrdStatus enum is supported — see the Place Order response for the complete list of possible values.
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
NEW = "NEW"
|
|
25
|
+
PARTIALLY_FILLED = "PARTIALLY_FILLED"
|
|
26
|
+
FILLED = "FILLED"
|
|
27
|
+
DONE_FOR_DAY = "DONE_FOR_DAY"
|
|
28
|
+
CANCELED = "CANCELED"
|
|
29
|
+
REPLACED = "REPLACED"
|
|
30
|
+
PENDING_CANCEL = "PENDING_CANCEL"
|
|
31
|
+
STOPPED = "STOPPED"
|
|
32
|
+
REJECTED = "REJECTED"
|
|
33
|
+
SUSPENDED = "SUSPENDED"
|
|
34
|
+
PENDING_NEW = "PENDING_NEW"
|
|
35
|
+
CALCULATED = "CALCULATED"
|
|
36
|
+
EXPIRED = "EXPIRED"
|
|
37
|
+
ACCEPTED_FOR_BID = "ACCEPTED_FOR_BID"
|
|
38
|
+
PENDING_REPLACE = "PENDING_REPLACE"
|
|
39
|
+
SUPERSEDED = "SUPERSEDED"
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class ReplaceOrdResponseTypedDict(TypedDict):
|
|
43
|
+
r"""Response returned after requesting an order replacement. Treat it as the replacement result and monitor the new client order ID going forward."""
|
|
44
|
+
|
|
45
|
+
cl_ord_id: NotRequired[str]
|
|
46
|
+
r"""New client order ID assigned to the replacement order. Store this for future status, replace, or cancel operations."""
|
|
47
|
+
orig_cl_ord_id: NotRequired[str]
|
|
48
|
+
r"""Client order ID of the order that was replaced. Use it to connect the replacement back to the original order."""
|
|
49
|
+
price: NotRequired[str]
|
|
50
|
+
r"""Replacement order price as a decimal string. Display this as the current limit or reference price after a successful replace."""
|
|
51
|
+
qty: NotRequired[str]
|
|
52
|
+
r"""Replacement order quantity as a decimal string. Display this as the current order size after a successful replace."""
|
|
53
|
+
status: NotRequired[ReplaceOrdResponseStatus]
|
|
54
|
+
r"""Order status after the replace request. Typical values after a successful replace:
|
|
55
|
+
- `PENDING_REPLACE` — replace request accepted by the broker but not yet final. Keep monitoring; will move to `REPLACED` once confirmed.
|
|
56
|
+
- `REPLACED` — the modification took effect. From now on, refer to the order by the new `clOrdId`.
|
|
57
|
+
- `REJECTED` — the replace was refused (e.g. the order had already fully filled). The original order is unchanged.
|
|
58
|
+
|
|
59
|
+
The full FIX OrdStatus enum is supported — see the Place Order response for the complete list of possible values.
|
|
60
|
+
"""
|
|
61
|
+
success: NotRequired[bool]
|
|
62
|
+
r"""Whether Aries or the broker accepted the replace request for processing."""
|
|
63
|
+
text: NotRequired[str]
|
|
64
|
+
r"""Broker or platform message about the replace result. Show it when replacement is rejected or pending."""
|
|
65
|
+
transact_time: NotRequired[datetime]
|
|
66
|
+
r"""Time the replace action was processed. Use it for order timelines and audit logs."""
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class ReplaceOrdResponse(BaseModel):
|
|
70
|
+
r"""Response returned after requesting an order replacement. Treat it as the replacement result and monitor the new client order ID going forward."""
|
|
71
|
+
|
|
72
|
+
cl_ord_id: Annotated[Optional[str], pydantic.Field(alias="clOrdId")] = None
|
|
73
|
+
r"""New client order ID assigned to the replacement order. Store this for future status, replace, or cancel operations."""
|
|
74
|
+
|
|
75
|
+
orig_cl_ord_id: Annotated[Optional[str], pydantic.Field(alias="origClOrdId")] = None
|
|
76
|
+
r"""Client order ID of the order that was replaced. Use it to connect the replacement back to the original order."""
|
|
77
|
+
|
|
78
|
+
price: Optional[str] = None
|
|
79
|
+
r"""Replacement order price as a decimal string. Display this as the current limit or reference price after a successful replace."""
|
|
80
|
+
|
|
81
|
+
qty: Optional[str] = None
|
|
82
|
+
r"""Replacement order quantity as a decimal string. Display this as the current order size after a successful replace."""
|
|
83
|
+
|
|
84
|
+
status: Optional[ReplaceOrdResponseStatus] = None
|
|
85
|
+
r"""Order status after the replace request. Typical values after a successful replace:
|
|
86
|
+
- `PENDING_REPLACE` — replace request accepted by the broker but not yet final. Keep monitoring; will move to `REPLACED` once confirmed.
|
|
87
|
+
- `REPLACED` — the modification took effect. From now on, refer to the order by the new `clOrdId`.
|
|
88
|
+
- `REJECTED` — the replace was refused (e.g. the order had already fully filled). The original order is unchanged.
|
|
89
|
+
|
|
90
|
+
The full FIX OrdStatus enum is supported — see the Place Order response for the complete list of possible values.
|
|
91
|
+
"""
|
|
92
|
+
|
|
93
|
+
success: Optional[bool] = None
|
|
94
|
+
r"""Whether Aries or the broker accepted the replace request for processing."""
|
|
95
|
+
|
|
96
|
+
text: Optional[str] = None
|
|
97
|
+
r"""Broker or platform message about the replace result. Show it when replacement is rejected or pending."""
|
|
98
|
+
|
|
99
|
+
transact_time: Annotated[
|
|
100
|
+
Optional[datetime], pydantic.Field(alias="transactTime")
|
|
101
|
+
] = None
|
|
102
|
+
r"""Time the replace action was processed. Use it for order timelines and audit logs."""
|
|
103
|
+
|
|
104
|
+
@field_serializer("status")
|
|
105
|
+
def serialize_status(self, value):
|
|
106
|
+
if isinstance(value, str):
|
|
107
|
+
try:
|
|
108
|
+
return models.ReplaceOrdResponseStatus(value)
|
|
109
|
+
except ValueError:
|
|
110
|
+
return value
|
|
111
|
+
return value
|
|
112
|
+
|
|
113
|
+
@model_serializer(mode="wrap")
|
|
114
|
+
def serialize_model(self, handler):
|
|
115
|
+
optional_fields = set(
|
|
116
|
+
[
|
|
117
|
+
"clOrdId",
|
|
118
|
+
"origClOrdId",
|
|
119
|
+
"price",
|
|
120
|
+
"qty",
|
|
121
|
+
"status",
|
|
122
|
+
"success",
|
|
123
|
+
"text",
|
|
124
|
+
"transactTime",
|
|
125
|
+
]
|
|
126
|
+
)
|
|
127
|
+
serialized = handler(self)
|
|
128
|
+
m = {}
|
|
129
|
+
|
|
130
|
+
for n, f in type(self).model_fields.items():
|
|
131
|
+
k = f.alias or n
|
|
132
|
+
val = serialized.get(k, serialized.get(n))
|
|
133
|
+
|
|
134
|
+
if val != UNSET_SENTINEL:
|
|
135
|
+
if val is not None or k not in optional_fields:
|
|
136
|
+
m[k] = val
|
|
137
|
+
|
|
138
|
+
return m
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
try:
|
|
142
|
+
ReplaceOrdResponse.model_rebuild()
|
|
143
|
+
except NameError:
|
|
144
|
+
pass
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
|
|
2
|
+
# @generated-id: 5c67c6833428
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
from finance_dev.types import BaseModel, UNSET_SENTINEL
|
|
6
|
+
from pydantic import model_serializer
|
|
7
|
+
from typing import Optional
|
|
8
|
+
from typing_extensions import NotRequired, TypedDict
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class ReportedBSItemTypedDict(TypedDict):
|
|
12
|
+
r"""Single balance sheet line item from a reported filing."""
|
|
13
|
+
|
|
14
|
+
concept: NotRequired[str]
|
|
15
|
+
r"""XBRL concept tag identifier for the financial line item"""
|
|
16
|
+
label: NotRequired[str]
|
|
17
|
+
r"""Human-readable label for the financial line item"""
|
|
18
|
+
unit: NotRequired[str]
|
|
19
|
+
r"""Unit of measurement (e.g., USD, shares)"""
|
|
20
|
+
value: NotRequired[float]
|
|
21
|
+
r"""Numerical value of the financial line item"""
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class ReportedBSItem(BaseModel):
|
|
25
|
+
r"""Single balance sheet line item from a reported filing."""
|
|
26
|
+
|
|
27
|
+
concept: Optional[str] = None
|
|
28
|
+
r"""XBRL concept tag identifier for the financial line item"""
|
|
29
|
+
|
|
30
|
+
label: Optional[str] = None
|
|
31
|
+
r"""Human-readable label for the financial line item"""
|
|
32
|
+
|
|
33
|
+
unit: Optional[str] = None
|
|
34
|
+
r"""Unit of measurement (e.g., USD, shares)"""
|
|
35
|
+
|
|
36
|
+
value: Optional[float] = None
|
|
37
|
+
r"""Numerical value of the financial line item"""
|
|
38
|
+
|
|
39
|
+
@model_serializer(mode="wrap")
|
|
40
|
+
def serialize_model(self, handler):
|
|
41
|
+
optional_fields = set(["concept", "label", "unit", "value"])
|
|
42
|
+
serialized = handler(self)
|
|
43
|
+
m = {}
|
|
44
|
+
|
|
45
|
+
for n, f in type(self).model_fields.items():
|
|
46
|
+
k = f.alias or n
|
|
47
|
+
val = serialized.get(k, serialized.get(n))
|
|
48
|
+
|
|
49
|
+
if val != UNSET_SENTINEL:
|
|
50
|
+
if val is not None or k not in optional_fields:
|
|
51
|
+
m[k] = val
|
|
52
|
+
|
|
53
|
+
return m
|