remove stockgrid provider (#7486)

This commit is contained in:
Danglewood
2026-05-29 00:49:22 -07:00
committed by GitHub
parent d3d33a219b
commit 0121d0cfd7
13 changed files with 0 additions and 2222 deletions

View File

@@ -241,14 +241,6 @@
"credentials": [],
"website": "https://seekingalpha.com"
},
{
"packageName": "openbb-stockgrid",
"optional": true,
"reprName": "Stockgrid",
"description": "Stockgrid gives you a detailed view of what smart money is doing.\nGet in depth data about large option blocks being traded, including\nthe sentiment score, size, volume and order type. Stop guessing and\nbuild a strategy around the number 1 factor moving the market: money.",
"credentials": [],
"website": "https://www.stockgrid.io"
},
{
"packageName": "openbb-tiingo",
"optional": false,

View File

@@ -65,7 +65,6 @@ openbb-finviz = { path = "./providers/finviz", optional = true, develop = true }
openbb-multpl = { path = "./providers/multpl", optional = true, develop = true }
openbb-nasdaq = { path = "./providers/nasdaq", optional = true, develop = true }
openbb-seeking-alpha = { path = "./providers/seeking_alpha", optional = true, develop = true }
openbb-stockgrid = { path = "./providers/stockgrid" , optional = true, develop = true }
openbb_tmx = { path = "./providers/tmx", optional = true, develop = true }
openbb_tradier = { path = "./providers/tradier", optional = true, develop = true }
openbb-wsj = { path = "./providers/wsj", optional = true, develop = true }

View File

@@ -1716,21 +1716,6 @@ def test_equity_shorts_fails_to_deliver(params, obb):
assert len(result.results) > 0
@pytest.mark.parametrize(
"params",
[{"symbol": "AAPL", "provider": "stockgrid"}],
)
@pytest.mark.integration
def test_equity_shorts_short_volume(params, obb):
"""Test the equity shorts short volume endpoint."""
params = {p: v for p, v in params.items() if v}
result = obb.equity.shorts.short_volume(**params)
assert result
assert isinstance(result, OBBject)
assert len(result.results) > 0
@pytest.mark.parametrize(
"params",
[{"symbol": "AAPL", "provider": "finra"}],

View File

@@ -32,7 +32,6 @@ async def fails_to_deliver(
@router.command(
model="ShortVolume",
examples=[APIEx(parameters={"symbol": "AAPL", "provider": "stockgrid"})],
)
async def short_volume(
cc: CommandContext,

View File

@@ -1,13 +0,0 @@
# OpenBB Stockgrid Provider
This extension integrates the [Stockgrid](https://Stockgrid.io/) data provider into the OpenBB Platform.
## Installation
To install the extension:
```bash
pip install openbb-stockgrid
```
Documentation available [here](https://docs.openbb.co/platform/developer_guide/contributing).

View File

@@ -1 +0,0 @@
"""Stockgrid provider."""

View File

@@ -1,17 +0,0 @@
"""stockgrid provider module."""
from openbb_core.provider.abstract.provider import Provider
from openbb_stockgrid.models.short_volume import StockgridShortVolumeFetcher
stockgrid_provider = Provider(
name="stockgrid",
website="https://www.stockgrid.io",
description="""Stockgrid gives you a detailed view of what smart money is doing.
Get in depth data about large option blocks being traded, including
the sentiment score, size, volume and order type. Stop guessing and
build a strategy around the number 1 factor moving the market: money.""",
fetcher_dict={
"ShortVolume": StockgridShortVolumeFetcher,
},
repr_name="Stockgrid",
)

View File

@@ -1,73 +0,0 @@
"""Stockgrid Short Volume Model."""
from datetime import datetime
from typing import Any
from openbb_core.provider.abstract.fetcher import Fetcher
from openbb_core.provider.standard_models.short_volume import (
ShortVolumeData,
ShortVolumeQueryParams,
)
from pydantic import Field, field_validator
class StockgridShortVolumeQueryParams(ShortVolumeQueryParams):
"""Stockgrid Short Volume Query.
Source: https://www.stockgrid.io/
"""
class StockgridShortVolumeData(ShortVolumeData):
"""Stockgrid Short Volume Data."""
__alias_dict__ = {"short_volume_percent": "short_volume%", "symbol": "ticker"}
close: float | None = Field(
default=None, description="Closing price of the stock on the date."
)
short_volume_percent: float | None = Field(
default=None,
description="Percentage of the total volume that was short volume.",
)
@field_validator("date", mode="before", check_fields=False)
def date_validate(cls, v): # pylint: disable=E0213
"""Return the datetime object from the date string."""
return datetime.strptime(v, "%Y-%m-%d").date()
class StockgridShortVolumeFetcher(
Fetcher[StockgridShortVolumeQueryParams, list[StockgridShortVolumeData]]
):
"""Transform the query, extract and transform the data from the Stockgrid endpoints."""
@staticmethod
def transform_query(params: dict[str, Any]) -> StockgridShortVolumeQueryParams:
"""Transform query params."""
return StockgridShortVolumeQueryParams(**params)
# pylint: disable=unused-argument
@staticmethod
def extract_data(
query: StockgridShortVolumeQueryParams,
credentials: dict[str, str] | None,
**kwargs: Any,
) -> list[dict]:
"""Get data from Stockgrid."""
# pylint: disable=import-outside-toplevel
from openbb_core.provider.utils.helpers import make_request
url = f"https://www.stockgrid.io/get_dark_pool_individual_data?ticker={query.symbol}"
data = make_request(url).json()
return data["individual_short_volume_table"]["data"]
@staticmethod
def transform_data(
query: ShortVolumeQueryParams,
data: list[dict],
**kwargs: Any,
) -> list[StockgridShortVolumeData]:
"""Transform data."""
return [StockgridShortVolumeData.model_validate(d) for d in data]

File diff suppressed because it is too large Load Diff

View File

@@ -1,19 +0,0 @@
[tool.poetry]
name = "openbb-stockgrid"
version = "1.6.0"
description = "stockgrid extension for OpenBB"
authors = ["OpenBB Team <hello@openbb.co>"]
license = "AGPL-3.0-only"
readme = "README.md"
packages = [{ include = "openbb_stockgrid" }]
[tool.poetry.dependencies]
python = ">=3.10,<4"
openbb-core = "^1.6.3"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.plugins."openbb_provider_extension"]
stockgrid = "openbb_stockgrid:stockgrid_provider"

View File

@@ -1,30 +0,0 @@
"""Test stockgrid fetchers."""
import pytest
from openbb_core.app.service.user_service import UserService
from openbb_stockgrid.models.short_volume import StockgridShortVolumeFetcher
test_credentials = UserService().default_user_settings.credentials.model_dump(
mode="json"
)
@pytest.fixture(scope="module")
def vcr_config():
"""VCR configuration."""
return {
"filter_headers": [("User-Agent", None)],
"filter_query_parameters": [
("token", "MOCK_TOKEN"),
],
}
@pytest.mark.record_http
def test_stockgrid_short_volume_fetcher(credentials=test_credentials):
"""Test short volume fetcher."""
params = {"symbol": "AAPL"}
fetcher = StockgridShortVolumeFetcher()
result = fetcher.test(params, credentials)
assert result is None

View File

@@ -55,7 +55,6 @@ openbb-finviz = { version = "^1.5.0", optional = true }
openbb-multpl = { version = "^1.3.0", optional = true }
openbb-nasdaq = { version = "^1.6.1", optional = true }
openbb-seeking-alpha = { version = "^1.6.0", optional = true }
openbb-stockgrid = { version = "^1.6.0", optional = true }
openbb-tmx = { version = "^1.5.1", optional = true }
openbb-tradier = { version = "^1.5.0", optional = true }
openbb-wsj = { version = "^1.6.0", optional = true }
@@ -82,7 +81,6 @@ nasdaq = ["openbb-nasdaq"]
multpl = ["openbb-multpl"]
quantitative = ["openbb-quantitative"]
seeking_alpha = ["openbb-seeking-alpha"]
stockgrid = ["openbb-stockgrid"]
technical = ["openbb-technical"]
tmx = ["openbb-tmx"]
tradier = ["openbb-tradier"]