polygon-io / issues

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

Repeated Options Snapshot calls return different open_interest values #218

Open jbabyhacker opened 1 year ago

jbabyhacker commented 1 year ago

URL https://api.polygon.io/v3/snapshot/options/SPY/O:SPY220708C00401000

Result When querying the option contract snapshot, the open_interest is inconsistent. Below I have printed out responses to the above URL (querying every 15 seconds) where the first column is the timestamp in New York time and the second column is the open_interest. There is a roughly 25 minute period where open_interest is both yesterday's open_interest (5694), and the day before yesterday's open_interest (3671).

Expected Result Clear guarantees that indicate the start time and end time of fuzzy open_interest period. What is the time range for this? When open_interest is updated, it doesn't change back. After what time is open interest guaranteed to be updated and will not change back?

Screenshots

2022-07-08 06:33:11.115088011 -04:00: 3671 2022-07-08 06:33:26.165956087 -04:00: 5694 2022-07-08 06:33:41.347908301 -04:00: 3671 2022-07-08 06:33:56.413555893 -04:00: 5694 2022-07-08 06:34:11.464440303 -04:00: 5694 2022-07-08 06:34:26.516304769 -04:00: 5694 2022-07-08 06:34:41.569257510 -04:00: 3671 2022-07-08 06:34:56.618077151 -04:00: 3671 2022-07-08 06:35:11.670014520 -04:00: 3671 2022-07-08 06:35:26.753629501 -04:00: 3671 2022-07-08 06:35:41.875489015 -04:00: 3671 2022-07-08 06:35:56.961002005 -04:00: 3671 2022-07-08 06:36:12.153343648 -04:00: 3671 2022-07-08 06:36:27.458233086 -04:00: 3671 2022-07-08 06:36:42.600925523 -04:00: 3671 2022-07-08 06:36:57.706696284 -04:00: 3671 2022-07-08 06:37:12.858603828 -04:00: 3671 2022-07-08 06:37:27.907467726 -04:00: 3671 2022-07-08 06:37:42.960183795 -04:00: 3671 2022-07-08 06:37:58.014111339 -04:00: 3671 2022-07-08 06:38:13.210053597 -04:00: 3671 2022-07-08 06:38:28.268679183 -04:00: 3671 2022-07-08 06:38:43.317504385 -04:00: 3671 2022-07-08 06:38:58.564546919 -04:00: 3671 2022-07-08 06:39:13.861448167 -04:00: 3671 2022-07-08 06:39:28.915279875 -04:00: 3671 2022-07-08 06:39:43.966175059 -04:00: 5694 2022-07-08 06:39:59.196869416 -04:00: 5694 2022-07-08 06:40:14.296720669 -04:00: 3671 2022-07-08 06:40:29.460812118 -04:00: 5694 2022-07-08 06:40:44.557542908 -04:00: 5694 2022-07-08 06:40:59.618373243 -04:00: 3671 2022-07-08 06:41:14.666088913 -04:00: 5694 2022-07-08 06:41:29.757018927 -04:00: 5694 2022-07-08 06:41:44.807574528 -04:00: 3671 2022-07-08 06:41:59.867662538 -04:00: 5694 2022-07-08 06:42:15.003361691 -04:00: 3671 2022-07-08 06:42:30.496678861 -04:00: 3671 2022-07-08 06:42:45.550243588 -04:00: 3671 2022-07-08 06:43:00.743992908 -04:00: 3671 2022-07-08 06:43:15.795685630 -04:00: 3671 2022-07-08 06:43:30.844526488 -04:00: 5694 2022-07-08 06:43:45.897607478 -04:00: 5694 2022-07-08 06:44:01.383512974 -04:00: 3671 2022-07-08 06:44:16.432157022 -04:00: 5694 2022-07-08 06:44:31.526949299 -04:00: 5694 2022-07-08 06:44:46.578738212 -04:00: 3671 2022-07-08 06:45:01.627647441 -04:00: 3671 2022-07-08 06:45:16.687760786 -04:00: 3671 2022-07-08 06:45:31.933499191 -04:00: 5694 2022-07-08 06:45:47.048342143 -04:00: 3671 2022-07-08 06:46:02.141993061 -04:00: 5694 2022-07-08 06:46:17.202886900 -04:00: 5694 2022-07-08 06:46:32.250832972 -04:00: 5694 2022-07-08 06:46:47.306443853 -04:00: 5694 2022-07-08 06:47:02.354442755 -04:00: 3671 2022-07-08 06:47:17.409415012 -04:00: 3671 2022-07-08 06:47:32.456164070 -04:00: 5694 2022-07-08 06:47:47.508061213 -04:00: 5694 2022-07-08 06:48:02.847741895 -04:00: 5694 2022-07-08 06:48:17.951705189 -04:00: 5694 2022-07-08 06:48:33.000313836 -04:00: 5694 2022-07-08 06:48:48.056330741 -04:00: 5694 2022-07-08 06:49:03.109074659 -04:00: 3671 2022-07-08 06:49:18.165955970 -04:00: 5694 2022-07-08 06:49:33.222842780 -04:00: 5694 2022-07-08 06:49:48.284859729 -04:00: 5694 2022-07-08 06:50:03.560452797 -04:00: 5694 2022-07-08 06:50:18.609238373 -04:00: 5694 2022-07-08 06:50:33.766073616 -04:00: 3671 2022-07-08 06:50:48.834950307 -04:00: 5694 2022-07-08 06:51:03.885807210 -04:00: 5694 2022-07-08 06:51:18.942044010 -04:00: 5694 2022-07-08 06:51:33.992446225 -04:00: 5694 2022-07-08 06:51:49.094148024 -04:00: 5694 2022-07-08 06:52:04.160014171 -04:00: 5694 2022-07-08 06:52:19.297863616 -04:00: 5694 2022-07-08 06:52:34.400769950 -04:00: 5694 2022-07-08 06:52:49.452519548 -04:00: 5694 2022-07-08 06:53:04.555334643 -04:00: 5694 2022-07-08 06:53:19.606077115 -04:00: 5694 2022-07-08 06:53:34.659874725 -04:00: 5694 2022-07-08 06:53:49.741715966 -04:00: 5694 2022-07-08 06:54:04.792965444 -04:00: 5694 2022-07-08 06:54:19.851375650 -04:00: 5694 2022-07-08 06:54:34.903270028 -04:00: 5694 2022-07-08 06:54:49.966367266 -04:00: 5694 2022-07-08 06:55:05.019231786 -04:00: 5694 2022-07-08 06:55:20.198927919 -04:00: 5694 2022-07-08 06:55:35.357988332 -04:00: 5694 2022-07-08 06:55:50.483557943 -04:00: 5694 2022-07-08 06:56:05.551237105 -04:00: 5694 2022-07-08 06:56:20.607235710 -04:00: 5694 2022-07-08 06:56:35.683003057 -04:00: 3671 2022-07-08 06:56:50.783834471 -04:00: 5694

Stormy110 commented 1 year ago

Hi there, apologies for the delayed response! We update open interest data from OPRA every day at 6 AM EST. Are you still having this issue?

kenaschmidt commented 1 year ago

Follow up:

1) Are values received by the client after 6 AM EST guaranteed to be the new OI values, or is there any sort of lag time for updates from OPRA to flow through?

EDIT: Additionally - it appears that Friday EOD values are not updated until Monday morning (rather than Sat morning)... is this accurate (and can it be changed as a feature request?)

2) Not directly related to OI, but is there any documentation on how when other values are calculated in the returned objects? Greeks, IV ... are they based specifically on the last traded price of that contract? I ask because for some thinly traded chains I see contracts with no OI and no Last Updated, but some still have greeks provided (some don't). Just looking for a methodology.

jrbell19 commented 1 year ago

Hi @kenaschmidt

  1. The values provided by OPRA should be the official values based on the previous day's liquidity. I will make a feature request regarding this, but I believe this would only be solved by a new OI source.

  2. We have a blog article that explains our methodology of calculating greeks. Is this what you're looking for? https://polygon.io/blog/greeks-and-implied-volatility/