Skip to content

[Bug]: options greeks types case mismatch #290

@mschunke

Description

@mschunke

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

The return values from .getOptionChain type notation present the Greeks with an uppercase initial letter (i.e. Delta, Gamma, Theta, Vega, and Rho. However, the actual API response is in lowercase, i.e. delta, gamma, theta, vega, and rho.

Intelisense/Typescript:
Image

API response:

{
  Symbol: 'AAPL',
  Type: 'P',
  ExpirationDate: '2025-10-10',
  StrikePrice: 280,
  LastPrice: 256.08,
  LatestQuote: { BidPrice: 23.36, AskPrice: 24.55 },
  Greeks: {
    delta: -0.9211,
    gamma: 0.0095,
    theta: -0.0376,
    vega: 0.0813,
    rho: -0.121
  }
}

Expected Behavior

Have the same letter case on both the API and Typescript definitions.

SDK Version I encountered this issue in

"@alpacahq/alpaca-trade-api": "^3.1.3"

Steps To Reproduce

N/A

Filled out the Steps to Reproduce section?

  • I have entered valid steps to reproduce my issue or have attached a minimally reproducible case in code that shows my issue happening; and understand that without this my issue will be flagged as invalid and closed after 30 days.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions