Skip to content

getOptionChain() working discretely "Error in open.connection(con, "rb") : HTTP error 500." #299

@jrburl

Description

@jrburl

Description

thanks for your work
Unable to pull option chains for a few high profile companies. With the same code, am able to pull for other companies. Does work for 'F', doesn't work for 'MSFT', 'AAPL'.

Expected behavior

Expecting a response.

Minimal, reproducible example

library(ggplot2)
library(reshape2)
library(lubridate)
library(xlsx)
library(quantmod)
library(readxl)
library(purrr)
library(dplyr)
library(plotly)
library(BatchGetSymbols)
library(derivmkts)

test_ticker <- 'AAPL'
test_total = data.frame()
spot_check <- 
  tryCatch(
  test <- as.matrix(quantmod::getOptionChain(test_ticker,Exp = NULL)),
      error=function(e) e)
  mylist = do.call(rbind,do.call(rbind,test)) %>%
    tibble::rownames_to_column(., "Name")
  
  test_total <- rbind(test_total,mylist)

  View(test_total)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions