Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancement] Improve Intrinio Unusual Options #6177

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

deeleeramone
Copy link
Contributor

  1. Why?:

    • The current target endpoint had only a parameter for "symbol", it was returning no results today directly from the Intrinio API.
  2. What? (1-3 sentences or a bullet point list):

    • Targets a different Intrinio endpoint "intraday", which is parameterized but very difficult to get a complete data set for a single date.

    • To overcome some of the challenges of the data retrieval:

      • start_date/end_date are valid only when a symbol is supplied, else start_date is the effective "target date".
        • enforced via model_validator.
      • pagination occurs at 1000 records, but a typical day has between 50-80K.
        • default "limit" is set at 100K.
        • absolute max limit is 1.25M, based on outlier dates.
  3. Impact (1-2 sentences or a bullet point list):

    • Improved UX and data mining capability.
    • Using max ceiling for "limit" will take > 1 min.
    • Using without supplying "symbol" will result in a large number of API calls.
  4. Testing Done:

    • obb.derivatives.options.unusual(start_date="2023-11-17")
    • obb.derivatives.options.unusual(start_date="2023-11-20")
    • obb.derivatives.options.unusual(start_date="2023-11-20", limit=1200000)
    • obb.derivatives.options.unusual(start_date="2023-11-20", symbol="AAPL")

@deeleeramone deeleeramone added enhancement Enhancement platform OpenBB Platform v4 PRs for v4 labels Mar 10, 2024
@deeleeramone deeleeramone requested a review from IgorWounds March 10, 2024 04:37
@deeleeramone
Copy link
Contributor Author

deeleeramone commented Mar 10, 2024

Unclear why the test is failing, it's definitely a valid ISO string.

Got it, Python < 3.11 thing: datetime doesn't support parsing ISO 8601 timestamps with a timezone component.

from datetime import datetime

v = "2023-11-20T15:45:05.837Z"
datetime.fromisoformat(v)
datetime.datetime(2023, 11, 20, 15, 45, 5, 837000, tzinfo=datetime.timezone.utc)

@IgorWounds IgorWounds added this pull request to the merge queue Mar 11, 2024
Merged via the queue into develop with commit 3ea6bcf Mar 11, 2024
15 checks passed
@piiq piiq deleted the feature/improve-intrinio-unusual-options branch March 13, 2024 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement platform OpenBB Platform v4 PRs for v4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants