Alpa.Models.OptionContract (AlpaEx v1.0.3)

View Source

Option contract model for options trading.

Summary

Functions

Parse option contract data from API response.

Types

option_style()

@type option_style() :: :american | :european

option_type()

@type option_type() :: :call | :put

t()

@type t() :: %Alpa.Models.OptionContract{
  close_price: Decimal.t() | nil,
  close_price_date: Date.t() | nil,
  expiration_date: Date.t() | nil,
  id: String.t() | nil,
  name: String.t() | nil,
  open_interest: integer() | nil,
  open_interest_date: Date.t() | nil,
  root_symbol: String.t() | nil,
  status: String.t() | nil,
  strike_price: Decimal.t() | nil,
  style: option_style() | nil,
  symbol: String.t() | nil,
  tradable: boolean() | nil,
  type: option_type() | nil,
  underlying_asset_id: String.t() | nil,
  underlying_symbol: String.t() | nil
}

Functions

from_map(data)

@spec from_map(map()) :: t()

Parse option contract data from API response.