polygon-io / issues

Quickly track and report problems with polygon.io
29 stars 0 forks source link

Options references to some underlyings are broken #211

Closed Domini closed 1 year ago

Domini commented 2 years ago

URL https://api.polygon.io/v3/snapshot/options/LGF.A/O:LGFA221216P00005000 https://api.polygon.io/v3/snapshot/options/LGFA/O:LGFA221216P00005000 https://api.polygon.io/v3/snapshot/options/LGF/A/O:LGFA221216P00005000

Result "underlying_asset": {}

Expected Result "underlying_asset": { "change_to_break_even": 23.123999999999995, "last_updated": 1636573459862384600, "price": 147.951, "ticker": "XXXX", "timeframe": "REAL-TIME" }

Additional context There is a clear referencing problem with options contracts for underlyings with "/" in the symbol. https://api.polygon.io/v3/reference/options/contracts/O:LGFA221216P00005000 thinks underlying is LGF/A. https://api.polygon.io/v3/reference/tickers?ticker=LGF/A says such a ticker does not exist. https://api.polygon.io/v3/reference/tickers?ticker=LGF.A exists though.

If I had to guess, it seems the backend can only find underlying for O:LGFA221216P00005000 under the name of LGF/A because this is the name the underlying has in your system as a stock. But input filtering for /v3/snapshot/options will not allow such a name to pass through.

See BF/A BF/B BRK/B CRD/A CWEN/A HEI/A LGF/A LGF/B MOG/A PBR/A

Apart from this, there are referencing issues with several other underlyings with similar symptoms and outcomes but I think due to different reasons.

See BKX BLL CROC DDG DJX ECOL FOE HBP HGX JOBS JTKWY KLDO MNKKQ MRUT MXEA MXEF NANOS NCMGF NDX NQX NYFANG OASQW ODTC OEX ORPHY OSX RLG RLV RUI RUT RVIC SBM SIXB SIXI SIXM SIXRE SIXU SIXV SOX SPESG SPIKE SPX TRIRF UTY VIX VOLT XAU XDA XDB XDC XDE XDN XDS XDZ XEO XND XSP ZNTE

kenaschmidt commented 1 year ago

Bumping this as I am seeing it as still an issue. Underlying tickers with a period (as returned by Tickers reference endpoint) come back with a '/' when returned through options underlying objects. Causes reference issues and requires bespoke handling of specific tickers using different endpoints.

jrbell19 commented 1 year ago

Hi @Domini @kenaschmidt, this is something that we are working on now. We should be able to close this out this week.

Apologies for the inconvenience.

jrbell19 commented 1 year ago

This has been fixed. Please let us know if you see anything out of the ordinary.