Skip to content

strike_limit typed as float causes API request to fail #24

@MarketDataDev03

Description

@MarketDataDev03

Title: strike_limit typed as float causes API request to fail

Problem

The strike_limit parameter on options.chain is typed as float, but the API expects an integer (it
represents a count of strikes, not a price). Including it in a request currently fails.

Reproduction

client.options.chain(symbol="AAPL", strike_limit=10)
# Pydantic coerces 10 → 10.0; API returns an error

Root cause

src/marketdata/input_types/options.py:67:

strike_limit: float | None = Field(
    description="The strike limit to filter by", alias="strikeLimit", default=None
)

Suggested fix

Change the type annotation to int | None. Also update docs/options.md:201, which incorrectly documents it
as float.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions