mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-31 22:41:19 +00:00
* small changes - moving provider inside the core * uptade readme * lint * remove old provider readme * leftovers * refactor website examples * ruff * fix nox * relock * fix fails_to_deliver headers * fix for tests that have renamed endpoints * fix discovery * removed test for renamed endpoint * fix broken syntax - test_search_financial_attributes * fix cash/income/balance * fix derivatives tests * fix etf tests * fix news tests * fix regulators * black * wrong test param * sort equity gainers/losers by percent * platform markdown generation import * Hotfix/fix int tests core merge (#5779) * removing tests on old endpoint * removing visualization on old endpoint * fixing equity tests * fixing examples * fix news tests * fix index test * example * add comments * example --------- Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> --------- Co-authored-by: montezdesousa <79287829+montezdesousa@users.noreply.github.com> Co-authored-by: Diogo Sousa <montezdesousa@gmail.com> Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
5.0 KiB
Vendored
5.0 KiB
Vendored
title, description
| title | description |
|---|---|
| Get a current, complete, market snapshot | OpenBB Platform Data Model |
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem';
Implementation details
Class names
| Model name | Parameters class | Data class |
|---|---|---|
MarketSnapshots |
MarketSnapshotsQueryParams |
MarketSnapshotsData |
Import Statement
from openbb_core.provider.standard_models.market_snapshots import (
MarketSnapshotsData,
MarketSnapshotsQueryParams,
)
Parameters
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| provider | Literal['fmp', 'polygon'] | The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. | fmp | True |
| Name | Type | Description | Default | Optional |
|---|---|---|---|---|
| provider | Literal['fmp', 'polygon'] | The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. | fmp | True |
| market | Literal['AMEX', 'AMS', 'ASE', 'ASX', 'ATH', 'BME', 'BRU', 'BUD', 'BUE', 'CAI', 'CNQ', 'CPH', 'DFM', 'DOH', 'DUS', 'ETF', 'EURONEXT', 'HEL', 'HKSE', 'ICE', 'IOB', 'IST', 'JKT', 'JNB', 'JPX', 'KLS', 'KOE', 'KSC', 'KUW', 'LSE', 'MEX', 'MIL', 'NASDAQ', 'NEO', 'NSE', 'NYSE', 'NZE', 'OSL', 'OTC', 'PNK', 'PRA', 'RIS', 'SAO', 'SAU', 'SES', 'SET', 'SGO', 'SHH', 'SHZ', 'SIX', 'STO', 'TAI', 'TLV', 'TSX', 'TWO', 'VIE', 'WSE', 'XETRA'] | The market to fetch data for. | NASDAQ | True |
Data
| Name | Type | Description |
|---|---|---|
| symbol | str | Symbol representing the entity requested in the data. |
| open | float | The open price. |
| high | float | The high price. |
| low | float | The low price. |
| close | float | The close price. |
| prev_close | float | The previous closing price of the stock. |
| change | float | The change in price. |
| change_percent | float | The change, as a percent. |
| volume | int | The trading volume. |
| Name | Type | Description |
|---|---|---|
| symbol | str | Symbol representing the entity requested in the data. |
| open | float | The open price. |
| high | float | The high price. |
| low | float | The low price. |
| close | float | The close price. |
| prev_close | float | The previous closing price of the stock. |
| change | float | The change in price. |
| change_percent | float | The change, as a percent. |
| volume | int | The trading volume. |
| price | float | The last price of the stock. |
| avg_volume | int | Average volume of the stock. |
| ma50 | float | The 50-day moving average. |
| ma200 | float | The 200-day moving average. |
| year_high | float | The 52-week high. |
| year_low | float | The 52-week low. |
| market_cap | float | Market cap of the stock. |
| shares_outstanding | float | Number of shares outstanding. |
| eps | float | Earnings per share. |
| pe | float | Price to earnings ratio. |
| exchange | str | The exchange of the stock. |
| timestamp | Union[int, float] | The timestamp of the data. |
| earnings_announcement | str | The earnings announcement of the stock. |
| name | str | The name associated with the stock symbol. |
| Name | Type | Description |
|---|---|---|
| symbol | str | Symbol representing the entity requested in the data. |
| open | float | The open price. |
| high | float | The high price. |
| low | float | The low price. |
| close | float | The close price. |
| prev_close | float | The previous closing price of the stock. |
| change | float | The change in price. |
| change_percent | float | The change, as a percent. |
| volume | int | The trading volume. |
| vwap | float | The volume weighted average price of the stock on the current trading day. |
| prev_open | float | The previous trading session opening price. |
| prev_high | float | The previous trading session high price. |
| prev_low | float | The previous trading session low price. |
| prev_volume | float | The previous trading session volume. |
| prev_vwap | float | The previous trading session VWAP. |
| last_updated | datetime | The last time the data was updated. |
| bid | float | The current bid price. |
| bid_size | int | The current bid size. |
| ask_size | int | The current ask size. |
| ask | float | The current ask price. |
| quote_timestamp | datetime | The timestamp of the last quote. |
| last_trade_price | float | The last trade price. |
| last_trade_size | int | The last trade size. |
| last_trade_conditions | List[int] | The last trade condition codes. |
| last_trade_exchange | int | The last trade exchange ID code. |
| last_trade_timestamp | datetime | The last trade timestamp. |