Commit Graph

119 Commits

Author SHA1 Message Date
Danglewood
6efab3fd15 [Feature] Add form_13f Endpoint to equity.ownership (#6122)
* add form_13f endpoint

* review things

* option_type validator

* black

* codespell

* add some comments to the code

* remove duplicated process

* static file

* remove warning

* static why no one updates you :-(

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-03-05 14:21:38 +00:00
Danglewood
e7896a839e [Feature] Add Currency Snapshots With Data From FMP (#6162)
* add obb.currency.snapshots() endpoint and create new standard model

* add standard model

* static assets

* add couple of comments

* codespell

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-03-05 13:14:08 +00:00
Danglewood
47541d4c95 [BugFix] Fix FMP Market Snapshots (#6160)
* fix FMP market snapshots

* exception handling

* model type

* forgot one line

* fix test

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-03-04 19:32:20 +00:00
Pratyush Shukla
ba18734f8e [Enhancement] Show the source of error in exception traceback (#6153)
* show source of error

* restructure code for readability
2024-02-29 17:48:19 +00:00
James Maslek
b458d2f4ba More v3 removals (#6141)
* remove ultima + althub

* move twitter keys

* economy kill bigmac + remove eval + plot+ stored data

* am losing track

* oanda is next

* brokers now

* fix sdk in case anyone wants it

* missed an sdk endpoint

* spec file

* small edits for installer

* stop the int tests on these

* always be fixin bugs

* some more removals
2024-02-29 12:45:19 -05:00
Danglewood
d46e96053f fix intraday check in charting ta_class (#6119)
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
2024-02-28 08:51:40 +00:00
James Maslek
3d34e56ca7 Fix the v3 markdown generation workflow (#6138)
* fix workflow

* debug time

* see if the docs generate at least

* ahhhh i found it

* getting there

* put the test first

* some keys cleanup

* small change to error message
2024-02-27 18:46:50 +00:00
Pratyush Shukla
577a42461d [Feature] - Platform V4 Markdown Generator V2 (#6094)
* add recent `openapi.json`

* fix data types in models

* removed `openapi.json`

* set default date value as None in PolygonCurrencyPairs class

* add function to generate reference.json file

* reworked function to improve readability

* reword function to add seo metadata

* add functions for creating markdown sections

* add code to extract data card markdown title

* add additional functions for generating index and data models file

* extract first sentence of the description for cards

* code cleanup and documentation

* linting

* linting polygon models

* add openbb import statement in create_reference_markdown_examples function

* add POST method functions

* cleanup; reworked generate_reference_index_files function

* moved development section to 7th position in the sidebar

* fix POST function params default value

add standard flag to QueryParams and Data fields

cleanup

* add type expansion from package_builder.MethodDefinition

* sort data models cards alphabetically

make printing less verbose

* make MAX_CARDS global

display less content in cards in Commannds section

* cleanup

* Remove '_' from the cards under Commands section

* " to ' in econometrics/causality

* replace ' with " in ReferenceCard for reference dir index files

* remove extra . from the quantile function description

* shoutout to @deeleeramone for finding POST method description bug!

* set correct value for standard field

* handle BaseModel types in provider data fields

* unit tests for the platform markdown generator v2

* yeet 'Default' and 'Optional' columns in the 'Data' section

* last minute bug fix

* add info for multiple symbols

* make multiple items info same as platform static

* organize sections properly

* sort reference sub-directories alphabetically

* extra space in 'OBBject extra' description

* add type expansion for fields with multiple items

POST method cleanup

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-27 11:20:28 +00:00
Pratyush Shukla
49967fee47 [Feature] Pretty Pydantic ValidationError exceptions (#6130)
* fix validator in fmp IndexHistorical model

* make ValidationError pretty

* modify arg error

* linting fmp IndexHistorical

* black

* remove unused code
2024-02-27 08:44:31 +00:00
montezdesousa
8e07b56752 [Bug fix] - explicit multiple items docstring (#6127)
* explicit multiple items docstring

* rebuiild

* rebuild again

---------

Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
2024-02-26 21:13:21 +00:00
montezdesousa
ea26bf0c4c [Bug fix] - Fix regulator cik map standard model (#6129)
* Fix regulator cik map standard model

* fix description

* Update cik_map.py
2024-02-26 20:07:20 +00:00
Danglewood
71676ae9c3 [Enhancement] Add Previous Close to DATA_DESCRIPTIONS (#6120)
* add data description for previous close

* ..just the one

* update the model tripped by this change

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2024-02-26 17:21:36 +00:00
Danglewood
eea2fb55b2 [BugFix] Fix Company News (#6111)
* fix company news

* update tests

* multiple symbols for polygon

* don't include pageSize in Benzinga querystring, fixed as 100

* remove extra space

* black

* unused imports

* make benzinga test cassette smaller

* missing params

* clear empty strings

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-25 08:59:46 +00:00
Henrique Joaquim
d5cfb57dab remove charting extension env var (#6118) 2024-02-23 09:04:59 +00:00
Pratyush Shukla
274a027bf5 [Feature] - Add exception_handler decorator to static (#6112)
* add exception handler decorator

* add exception handler decorator code

* updated static

* rebuild to fix docstring indentation

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
2024-02-22 19:06:57 +00:00
montezdesousa
6095c4314f [Feature] - Equity router descriptions & examples (#6103)
* feat: equity/calendar

* feat: compare router

* fix descriptions

* darkpool + discovery

* fix paragraph issues

* fix descriptions

* fundamental part 1

* fundamental part2

* transcipts

* ownership

* fix

* price

* shorts

* Update darkpool_router.py

* minor fix

* shorts examples

* examples

* ruff

* black

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-22 14:04:26 +00:00
montezdesousa
0ecb742955 [Bug fix] - Fix package mypy (#6110)
* fix: package mypy

* types

* black
2024-02-22 11:11:44 +00:00
Danglewood
11df8e1b05 [BugFix] Fix ECB Yield Curve (#6108)
* fix ecb yield curve

* standard model update
2024-02-22 08:45:09 +00:00
Danglewood
754e14ca71 [BugFix] Fixes to_df() where the date series contains multiple TZ-offsets. (#6099)
* allow mixed utc offset in a tz-aware date column

* enforce ascending from all providers for price.historical

* fix tests

* add comments and apply treatment to basemodel_from_df before JSON output

* yfinance consistency

* add unit test

* add unit test

* better test

* ruff

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-21 12:37:09 +00:00
montezdesousa
5f9d958260 [Feature] - Create openbb assets folder (#6101)
* create openbb assets folder

* fix unittest

* rebuild

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-21 12:31:18 +00:00
Danglewood
fe3fa6af8e [Enhancement]: Add TMX data provider extension. (#5913)
* dev install

* add TMX provider extension

* normalize ytm and coupopn_rate values

* black

* codespell

* ruff

* black again

* pylint

* ftw

* undo what Pylint thinks is best

* more black

* renovate insider_trading standard model

* fix tests

* typo

* tests

* empty string

* pylint unused argument

* nans for some reason

* black

* static files

* static files with openbb-tmx installed this time

* yfinance TypeError..?

* NA -> N/A

* update for version bump

* list exchange-calendars as tmx dependency

* eod chains date -> eod_date

* new line

* not that file

* more black

* one more black

* fix weird merge thing

* ruff

* index constituents params

* insider trading

* fixing things

* black

* black AGAIN

* news integration params

* the other missing param

* ruff

* historical dividends field update

* add json_schema_extra

* gainers

* symbols -> symbol

* company news symbol

* unit test param

* review items

* wrangle a rogue field

* index router example

* company news thing - symbols -> symbol

* field name map

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2024-02-20 14:41:26 +00:00
Henrique Joaquim
7d84690316 [BugFix] Fix integration tests (#6100)
* fix int tests

* fix obbject int tests

* fix quant tests

* fix index tests

* use python 3.10 instead

* remove cache

* end_date < start_date
2024-02-20 14:03:43 +00:00
Danglewood
339f979186 [BugFix] Fix treasury_rates() (#6092)
* fix treasury_rates

* drop rows with no data

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-19 16:19:51 +00:00
Igor Radovanovic
0b5260fc10 [BugFix] - Fix POST docstring examples (#6095)
* Fix POST docstring examples.

* Move router examples to command decorator
2024-02-19 16:12:19 +00:00
Danglewood
9f1891931c [Enhancement] Add analyst_search to the Equity/Estimates Router (#6088)
* standardize price_target

* add analyst search

* black

* more black

* ruff

* linter, test parmas

* last missing param

* get rid of convert to upper

* ruff

* pylint
2024-02-18 17:24:28 +00:00
Danglewood
ccf46aad92 [Feature] Add end point: etf.equity_exposure() with FMP provider (#6079)
* add etf.equity_exposure from FMP

* empty data error

* recapture cassette

* pylint unused argument

* Fix router example typo

* fix test...?

* static file to fix test?

* fix test..?

* __json_schema_extra__

* black

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2024-02-15 19:55:26 +00:00
Henrique Joaquim
fa5dedf4a5 Release/4.1.4 (#6081)
* static assets

* patch version increase

* core update

* bumping versions

* bump finviz version

* bump versions

* bump versions on package.extension

---------

Co-authored-by: James Maslek <jmaslek11@gmail.com>
2024-02-15 11:37:00 -05:00
montezdesousa
7deb4e69f6 [Feature] - Comma separated string and list inputs (#6062)
* feat: balancesheet

* feat: income statement

* fix: cash flow statement

* feat: financial ratios

* feat: reported financials

* feat: revenue business line

* feat: revenue per geography

* fix: warnings

* Update balance_sheet.py

* fix: remove warning imports

* feat: balance sheet growth

* feat: calendar ipo

* feat: cashflow growth

* feat: __validators__

* fix: typing

* fix: validator msg

* feat: trailing dividend_yield

* feat: short volume

* feat: share statistics

* feat: price target + consensus

* fix: update validator

* feat: historical dividends

* feat: key executives

* fix: getattr directly

* fix: type hint validator

* fix: add default to getattr

* typo

* feat: otc

* feat: options chains

* fix: remove list validators

* feat: add validator dict to fetchers

* lint

* update standard models

* lint

* feat: rename validator

* fix: ownership

* feat: query params description

* fix: balance yfinance

* key execs, income statement

* remove change

* fix: revenue geographic

* fix: disable pylint

* fix: unusual + balance

* unit test validator

* minor fix

* explicit validators

* update test

* feat: multiple items allowed

* rebuild

* move check_single_value

* crypto historical

* order providers

* fix typing

* rename extra dict

* marking multiple items allowed

* Revert "marking multiple items allowed"

This reverts commit 7da04817e1.

* error msg

* fix: default provider runtime vs configuration

* minor fix

* docstring

* revert default changes

* get provider before executing cmd

* fix container bug

* clean filter

* add comment

* prevent bad defaults

* update docstring

* typing

* fix

* black

* fix docstring generation

* [Feature] - Mark multiple item fetchers (#6074)

* feat: price target

* bezinga company news

* equity quote

* marking multiple items allowed

* more multiple items

* black

* rebuild

* another batch

* rebuild

* another

* cpi

* move prop

* rebuild

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>

* rename var

* update msg

* rename func

* fix test

* mypy

* ruff

---------

Co-authored-by: hjoaquim <h.joaquim@campus.fct.unl.pt>
2024-02-15 12:19:18 +00:00
Henrique Joaquim
2f01e954d1 Feature/charting obbject (#5938)
* fix circular import issues on the obbject extension framework

* settings available on the obbject

* extension init

* charting assets and code

* introduce to_chart functionality

* removes the to_chart method from obbject in detriment of the one from the obbject extension

* Update openbb_platform/obbject_extensions/charting/charting/__init__.py

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>

* fix on the show method

* adding the example to the to_chart docstring

* copying the exsting README from charting extension - needs to be revamped

* moving to openbb_charting instead

* update the pyproject.toml file

* pydocstyle

* versions

* better docstrings

* making accessors public

* removing unnecessary credentials variable cc @montezdesousa

* removing access to extra/metadata and use designated private attrs instead

* Fixes linting for the logging service (#5992)

* lints

* typing.Type instead

* deprecating ChartingService to use the new extension instead - adding function discovery capabilities using it

* tests for the obbject charting extension

* removing charting service from command runner

* filter functions not implemented in the module

* remove charting service tests

* removing charting service on the tests for int tests

* charting integration tests

* removing charting service file

* removing old charting extension code

* revamp builder

* fix obbject tests

* fix command_runner tests

* removing openbb_figure_table

* better website docs

* reviewed readme

* unsetting api key for posthog (pywry) windows

* added debug_mode to the system settings

* removing api key

* update nightly script

* fix tests

* black

* black

* Revert "black"

This reverts commit 21d76ad689.

* Revert "black"

This reverts commit 0904653fd7.

* black for henrique

* returning a list instead

* better docstrings

* removing unnecessary indicators docstring

* typo

* black

* intentional access to protected member

* changes to publish script

* filtering deleted files

* black

* adding render argument

* fixing the df_to_basemodel function: it should include the index in the columns either if flagged or if the index is named

* adding the hability to add you own data to to_chart method

* tests

* black

* disable protected access

* accept kwargs to eg. save image

* adjustment cc Igor

* add if statement for protection

* remove unused return typing

* fix technical charting views

* better error message cc @IgorWounds

* better structure and fix test

* Revert "better structure and fix test"

This reverts commit 612ea6117c.

* Revert "better error message cc @IgorWounds"

This reverts commit 3d7ee53878.

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: James Maslek <jmaslek11@gmail.com>
2024-02-14 15:19:27 +00:00
montezdesousa
6648f51ab5 [Feature] - remove unused validators from standard models (#6067)
* update standard models

* lint
2024-02-12 13:53:15 +00:00
Danglewood
d31eec2354 [BugFix] Fix World News (#6064)
* fix fmp

* fix intrinio

* fix biztoc

* actually commit intrinio fix

* fix tiingo

* unused import

* fix tests

* black

* ruff

* benzinga empty strings

* codespell

* fix test?

* more empty strings

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-12 13:23:30 +00:00
montezdesousa
39888269b3 [Feature] - Replace symbols in company/news (#6061)
* feat: replace symbols in /news

* fix: integration tests

* fix: integration tests api

* fix: typo

* Update test_intrinio_fetchers.py
2024-02-12 10:46:13 +00:00
Danglewood
bc24709cba [HotFix] Index Router Docstrings & sp500_multiples() Cleanup (#6063)
* sp500 multiples cleanup

* remove dict from standard model

* static pacakge

* pylint
2024-02-09 20:13:59 +00:00
montezdesousa
3fae9c20b2 [Bugfix] - Fix economic calendar country (#6059)
* fix economic calendar country

* lint

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-09 15:04:35 +00:00
montezdesousa
6088c98ceb [Feature] - Standardise multiple symbols input (#6056)
* feat: remove list of str

* fix: update cpi

* package builder + cpi

* build

* fix: update unittests

* fix: check_item

* fix: unittests
2024-02-08 16:47:55 +00:00
Igor Radovanovic
3ca266d9b4 Remove the preference (#6055)
Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
2024-02-08 12:04:49 +00:00
teh_coderer
7c68832379 improve discriminator logic, fix package return type docs (#6052)
* improve discriminator logic, fix package return type docs

* Update registry_map.py

* build package

* Update registry_map.py

* defaults

* Update registry_map.py

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-08 09:58:14 +00:00
montezdesousa
aa1fab6f28 display warnings based on preference (#6051) 2024-02-07 19:18:21 +00:00
Henrique Joaquim
6eb097c31c [BugFix] - Improve Standardization - EquitySearch (#6033)
* format w new black

* Revert "format w new black"

This reverts commit 74b9619cc6.

* small adjustment on the test

* index historical

* adjust tests accordingly

* keep the test skipped

* match tests w python

* use cache as std field

* fix tests

* fix tests

* use_cache as std

* adjust tests

* keep the skip

* re-record test

* black
2024-02-06 13:54:51 +00:00
teh_coderer
d6742378c6 fix openapi schema fields to_snake (#6036) 2024-02-06 09:46:21 +00:00
Danglewood
16f2bec65f Feature/ex-dividend: Renames "date" columns as "ex_dividend_date" for Dividend Calendar and Historical Dividends (#6006)
* date -> ex_dividend_date

* nasdaq historical dividends

* black

* pylint

* intrinio alias_dict

* dividend_currency -> currency

* yfinance field name

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-05 19:53:00 +00:00
Henrique Joaquim
074cffaaad [BugFix] - Improve Standardization - CotSearch (#6031)
* format w new black

* Revert "format w new black"

This reverts commit 74b9619cc6.

* small adjustment on the test

* index historical

* adjust tests accordingly

* keep the test skipped

* match tests w python

* use cache as std field

* fix tests

* fix tests

* keep the skip

* fix test

* adding missing param

* fix tests accordingly
2024-02-05 15:41:23 +00:00
Igor Radovanovic
f86483e683 [Feature] - Refactor Response Model (#6024)
* Start refactor with @montezdesousa

* feat: add response model inside openapi_extra

* feat: find+replace return types

* fix: ruff

* Feature/api response by provider (#6029)

* init

* Update router.py

* Update registry_map.py

* check dicts

* lint

* exclude provider on data model for package build

* `results_type_repr` logic for `Annotated`, ignore provider field in `_extract_data`

---------

Co-authored-by: Diogo Sousa <montezdesousa@gmail.com>
Co-authored-by: teh_coderer <me@tehcoderer.com>
2024-02-05 13:17:29 +00:00
Henrique Joaquim
743c229f3a [BugFix] - Improve Standardization - IndexHistorical (#6030)
* format w new black

* Revert "format w new black"

This reverts commit 74b9619cc6.

* small adjustment on the test

* index historical

* adjust tests accordingly

* keep the test skipped

* match tests w python

* fix tests

* keep the skip

* fix test
2024-02-05 13:01:50 +00:00
Henrique Joaquim
52ac1758f3 Improve UX for obb.news (#5986)
* adding date,start_date and end_date to std params

* add date to special params which should've another type

* change types to dateType

* change helper to accomadate changes in types

* date filtering

* using the date filtering for all providers

* date params on the std model instead

* adding the right type

* filtering dates on world news

* integration tests

* fix descriptions

* static assets

* black

* Revert "black"

This reverts commit 7288b59f87.

* lint

* addressing @montezdesousa suggestion: removing qua 31 jan 2024 15:01:20 WET from standard models and using it only on benzing

* tests accordingly

* static assets

* black

---------

Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com>
Co-authored-by: teh_coderer <me@tehcoderer.com>
Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
2024-02-05 11:46:37 +00:00
Danglewood
b4649b375e feature/commodities-lbma-fixing: Adds Commodity Extension and LBMA Gold/Silver daily fixing levels (#5760)
* add commodity extension and add lbma fixing endpoint

* dev_install.py

* readme url

* renovate the standard model

* makes a query_params model for nasdaq data link

* literal not optional

* unused imports

* missing test params

* test cassette

* DataLink query param description

* test file import

* actually fix import

* from openbb_core.provider.....

* ruff

* another import statement

* black

* async router

* move query_params

* update version

* version numbers

* extension_map

* satisfy pylint?

* pylint

* Update pyproject.toml

* black

* poetry lock

* Update extension_map.json

* Update __extensions__.py

* Update module_map.json

* clean descriptions

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
2024-02-05 09:22:08 +00:00
Danglewood
3de1bddc2d feature/more-yfinance: Adds some more to openbb-yfinance (#5979)
* equity profile for yFinance

* pylint

* equity quote

* unused imports

* price target consensus

* add currency field

* add share_statistics

* don't append empty result to results

* key executives

* missing definition in key_executives

* pylint

* key metrics

* add currency to key metrics

* add etf_info

* rename trailing_annual_dividend -> dividend_rate_ttm

* add institutions count to share_statistics

* add historical dividends

* add logic for start-end dates to historical_dividends

* recapture the test..?

* funny test

* filter on tests?

* record test with clean cache..?

* year_price_change -> price_return_1y in key_metrics

* black

* make descriptions clear for beta and dividend_yield fields

* add description field to standard model

* updated static

* clear description of shares_implied_outstanding field

* updated static for equity

* clean descriptions

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
2024-02-04 18:39:29 +00:00
Pratyush Shukla
a5da32808c remove SectorNews from router and standard models (#6026) 2024-02-04 15:42:36 +00:00
Igor Radovanovic
6c2aa62a0f [BugFix] - Remove duplicate code (#6025)
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
2024-02-02 14:39:58 +00:00
Danglewood
c9f1aec2b3 [feature]: feature/overview-to-profile: Deprecate equity.fundamental.overview() and move to equity.profile() (#6011)
* fmp overview to equity profile

* deprecation warning

* urls

* wrangle fields

* black

* pylint unused argument

* insert additional securityID fields to standard model

* custom deprecation using OpenBBDeprecationWarning

* typo - need to have the deprecated=True flag

* static assets

* fix non related test

* minor adjustment - removing the need for the try/except block - using the get and pop removes the need for key existance checking. cc @deeleeramone

---------

Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com>
Co-authored-by: Henrique Joaquim <h.joaquim@campus.fct.unl.pt>
2024-02-02 11:45:09 +00:00