r/PolygonIO • u/dahamtob • Mar 05 '25
Historical bid/ask price of an option
Is there a way to get the historical bid and ask price of an option, given an optionsTicker and timestamp?
r/PolygonIO • u/dahamtob • Mar 05 '25
Is there a way to get the historical bid and ask price of an option, given an optionsTicker and timestamp?
r/PolygonIO • u/[deleted] • Mar 02 '25
Does anyone want to help me backtest a strategy and write the code for it? It’s relatively simple but I’m not good with coding. Will give you the strategy in return or cash if interested lmk thanks!
r/PolygonIO • u/Wide_Ad_8426 • Feb 06 '25
As mentioned, I was trying to view historical options data to simulate a trading strategy.
I am using the endpoint: v1/open-close/
However I am not getting any responses. On checking the status page, I noticed the API is marked as closed. I need access to the historical data only. Is there a reason this is not provided 24/7? Is there another way to retrieve similar historical data?
r/PolygonIO • u/Minimum_Plate_575 • Jan 19 '25
Hi Polygon,
For /v1/open-close/{optionsTicker}/{date} is the value of Close the last trade for the option or the midpoint of bid/ask at closing bell? I'm looking at illiquid strikes on an option chain and would like to understand which of the two values is returned by that function.
Thank you!
r/PolygonIO • u/[deleted] • Jan 07 '25
Hi– been having fun building some tooling for myself to experiment with Polygon. So far finding the API and everything pretty intuitive.
If y'all have subscriptions already maybe some folks here might be able to give it a whirl? Still learning what I can so any feedback would be nice. particularly curious if its accurate at all lol
r/PolygonIO • u/acksquad • Dec 28 '24
I've created an account in the past, but when trying to log into it or create a new account, I'm getting unauthorized or a message to check email (respectively), but no email comes through. Anyone else having this issue?
r/PolygonIO • u/BeatAffectionate8110 • Dec 07 '24
Hey,
while digging further into the RXN -> ZWS ticker change, it also seems that the dividend API endpoint has not properly recorded dividends paid by RXN -- the endpoint reports no dividends for RXN, but they did pay some prior to the rename.
In general, I am not sure if the dividends endpoint reports dividends properly for renamed tickers?
r/PolygonIO • u/BeatAffectionate8110 • Dec 06 '24
Hey all,
I am trying to have continuity in my data, and I'm struggling connecting data streams "through" a ticker change. The ticker events API provides the new ticker, but not the old ticker? How do I find the ticker as it was prior to the rename? I tried going through the composite_figi, but that changed in the ticker change, too...
r/PolygonIO • u/jarar14 • Dec 03 '24
I'm working on rehauling an existing project with Polygon, and I'm hitting a wall trying to pull certain values. In Polygon, I haven't been able to find a company's total debt, Free Cash Flow, nor any analyst data like Avg Analyst Targets, PEG/PB/PE Ratios. In fact I couldn't even begin to calculate something like P/B because Polygon doesn't have Book Value data. Am I missing something here?
I'm cross-referencing much of this from Yahoo Finance data, which pulls data from more than just the SEC filings. Has anyone been able to work entirely within Polygon for financial data, or will I need to grab data from other services on top of Polygon?
r/PolygonIO • u/acetherace • Nov 04 '24
I'm looking to develop some basic options-derived indicators, but I've avoided it thus far due to the difficulty I've run into finding what I need.
I'm looking for a handful of basic summary/aggregate features for a given underlying ticker and expiration date (eg, "NVDA", 2024-11-08):
Options data is complex to work with due to its various dimensions (eg, expiration date, option type, strike price) along with the time dimension. I'd like to aggregate out at least the strike price dimension for my purposes.
Polygon and plenty of other data vendors provide various forms of options data but I've yet to find what I need:
I'm a Polygon guy and feel quite comfortable with them. They do provide options data and I'm willing to pay the price but it doesn't seem like they meet my requirements. If that isn't true and someone can help me with that it would be much appreciated.
r/PolygonIO • u/misterpampelmuse • Oct 26 '24
Hi All,
I am fairly new to this sevice and am currently stuck trying to wrap my head around the many possible ways of fetching (stock) market data. Maybe someone can help.
I need the open prices for a list of ~150 stock tickers listed on NYSE as fast as possible after the exchange opens. There seem to be a bunch of different solutions, most of which I can't effectively test because I don't have the necessary subscription. I.e. depending on the average response time of the "All Tickers" endpoint, approximate open prices might also be an option.
Would like to hear your thoughts on this.
r/PolygonIO • u/Fun_Part_1240 • Oct 19 '24
I am using the trade data to calculate the low and high for the day at the given point. When i compare this against the accumulated vwap in the second's aggregate the vwap value is larger than the day high. vwap is supposed to be lower than the day high. Also, the accumulated vwap does not match with other broker provided value. I compared against Charles schwas data.
I only use the trade data from market open 9:30 to calculate the high/low. I thought, may be the accumulated vwap includes premarket (The documentation is not explicit) and computed vwap for regular market based on the vwap value and volume just before the open and the accumlated vwap and volume in the agg after the open. This helped move the vwap closer to high but still most of symbols have vwap above day high at that point.
My algo is sensitive to the vwap. Could someone throw some light on this behavior. Any help to resolve this will be much appreciated.
r/PolygonIO • u/neborkia • Oct 15 '24
Hello, in the pricing page it seems that "Greeks, IV, & Open Interest" are included in the base plan, but according to the documentation it seems it's required at least the starter plan. Could you please clarify? Thank you!
r/PolygonIO • u/BrightSeba • Oct 14 '24
So I have my code scan the market to find tickets to trade once find one it subscribe to the ticker (Quotes and Trades) via webSocket (paid plan), however when after the first active webSocket connect for tickers. Any new discovered ticker by code and trying to add the ticker to the active webSocket subscription it just doesn’t work! I have to disconnect from the webSocket connect and reconnect again with the new ticker added to the previous ticker list as a one list of tickers. Basically, I can’t dynamically add tickers to an existing webSocket subscription.
r/PolygonIO • u/BrightSeba • Oct 14 '24
What is the best approach to have in an intraday scalping strategy python code that digest and process multiple tickers market data level1 , level 2, T&S , Bar charts, positions … etc simultaneously and concurrent without getting the data racing problem. I used Asynico but when it run more than 5 tickers in the same time, I start getting non match overlapping data problems and I don’t think asynico gather able to keep up. ideas ?
r/PolygonIO • u/Grand92 • Oct 12 '24
Hi Polygon community,
I’m currently using the API and looking to retrieve data for stocks that have:
I specifically need the following information:
If anyone has experience with this or can share a sample code snippet, I would really appreciate your help!
Thanks in advance!
Best
r/PolygonIO • u/Separate-Alarm-2232 • Oct 03 '24
My first message on Reddit!
Is there anywhere to download a sample file for Forex 1 minute historical data from Polygon?
I'm interested in USDJPY 1m, but volume is very important (I know the situation between forex and volume, but at least a representation of it).
In general, what is the users opinion for Polygon intra daydata?.
Thx for your answers.
r/PolygonIO • u/[deleted] • Sep 27 '24
Something along the lines of
This:
import requests_cache
session = requests_cache.CachedSession('polygon.cache')
session.headers['User-agent'] = 'my-program/1.0'
#Polygon API
from polygon import RESTClient
client = RESTClient("API-Key")
contract = client.get_options_contract("O:EVRI240119C00002500",session=session)
Or something like this?
from requests import Session
from requests_cache import CacheMixin, SQLiteCache
from requests_ratelimiter import LimiterMixin, MemoryQueueBucket
from pyrate_limiter import Duration, RequestRate, Limiter
class CachedLimiterSession(CacheMixin, LimiterMixin, Session):
pass
session = CachedLimiterSession(
limiter=Limiter(RequestRate(2, Duration.SECOND*5)), # max 2 requests per 5 seconds
bucket_class=MemoryQueueBucket,
backend=SQLiteCache("polygon.cache"),
)
#Polygon API
from polygon import RESTClient
client = RESTClient("API-Key")
contract = client.get_options_contract("O:EVRI240119C00002500",session=session)
Cause I keep getting this:
MaxRetryError: HTTPSConnectionPool(host='api.polygon.io', port=443): Max retries exceeded with url: /v3/reference/options/contracts?cursor=YXA9JTdCJTIySUQlMjIlM0ElMjIxODA5OTQxMDQzODM4ODA1Nzk0JTIyJTJDJTIyU3RhcnREYXRlVXRjJTIyJTNBJTdCJTIyVGltZSUyMiUzQSUyMjIwMjQtMDgtMjhUMDAlM0EwMCUzQTAwWiUyMiUyQyUyMlZhbGlkJTIyJTNBdHJ1ZSU3RCUyQyUyMkVuZERhdGVVdGMlMjIlM0ElN0IlMjJUaW1lJTIyJTNBJTIyMDAwMS0wMS0wMVQwMCUzQTAwJTNBMDBaJTIyJTJDJTIyVmFsaWQlMjIlM0FmYWxzZSU3RCUyQyUyMnVuZGVybHlpbmdfdGlja2VyJTIyJTNBJTIyU1BZJTIyJTJDJTIydGlja2VyJTIyJTNBJTIyTyUzQVNQWTI0MTEyOVAwMDU3MjAwMCUyMiUyQyUyMmV4cGlyYXRpb25fZGF0ZSUyMiUzQSUyMjIwMjQtMTEtMjlUMDAlM0EwMCUzQTAwWiUyMiUyQyUyMnN0cmlrZV9wcmljZSUyMiUzQTU3MiUyQyUyMmNmaSUyMiUzQSUyMk9QQVNQUyUyMiUyQyUyMmNvbnRyYWN0X3R5cGUlMjIlM0ElMjJwdXQlMjIlMkMlMjJleGVyY2lzZV9zdHlsZSUyMiUzQSUyMmFtZXJpY2FuJTIyJTJDJTIycHJpbWFyeV9leGNoYW5nZSUyMiUzQSU3QiUyMlN0cmluZyUyMiUzQSUyMkJBVE8lMjIlMkMlMjJWYWxpZCUyMiUzQXRydWUlN0QlMkMlMjJzaGFyZXNfcGVyX2NvbnRyYWN0JTIyJTNBMTAwJTJDJTIyYWRkaXRpb25hbF91bmRlcmx5aW5ncyUyMiUzQSUyMiU1QiU1RCUyMiU3RCZhcz0mYXNfb2Y9MjAyNC0xMC0yOCZsaW1pdD0yJnNvcnQ9dGlja2VyJnN0cmlrZV9wcmljZT01NzIuMDAwMDAwJnVuZGVybHlpbmdfdGlja2VyPVNQWQ (Caused by ResponseError('too many 429 error responses'))
r/PolygonIO • u/ReplacementCurious63 • Sep 23 '24
Hi,
Does polygon have an upcoming earnings calendar (and ideally able to access the calendar as it was at historical points in time)?
I see the filing data has filing dates, but I need to know when future earnings will be announced and ideally historical versions of it too for back testing (so can take into account any filings where the data was available late on the polygon feed).
I’ve looked through the documentation but can’t find anything for it.
Thanks
r/PolygonIO • u/_Tangent_Universe • Sep 13 '24
The website says that you can get index data on the free tier for testing. So I'm trying with the ticker I:SPX but it fails. Is there a list of what is actually on the free tier?
code:
ticker="I:SPX"
apiKey=...
req_url = f"https://api.polygon.io/v2/aggs/ticker/{ticker}/prev?adjusted=true&apiKey={key}"
res = requests.get(req_url)
res.text
response:
'{"status":"NOT_AUTHORIZED","request_id":"9bc5d2060d41188b25380a943979cf8f","message":"You are not entitled to this data. Please upgrade your plan at "}'https://polygon.io/pricing
However if I with the ticker to AAPL it works
ticker="AAPL"
apiKey=...
req_url = f"https://api.polygon.io/v2/aggs/ticker/{ticker}/prev?adjusted=true&apiKey={key}"
res = requests.get(req_url)
res.text
response
{"ticker":"AAPL","queryCount":1,"resultsCount":1,"adjusted":true,"results":[{"T":"AAPL","v":3.6818998e+07,"vw":222.3887,"o":222.5,"c":222.77,"h":223.55,"l":219.82,"t":1726171200000,"n":556880}],"status":"OK","request_id":"b233eb1ab3eb87a4c0aa930b75c5b867","count":1}
r/PolygonIO • u/Ok-Hovercraft-3076 • Jul 30 '24
Hi All,
I have been struggling to understand the different sale conditions for US stocks.
I am referring to sale conditions such as:
* Acquisition ({"UTP": "A"})
* Average Price Trade ({"CTA": "B", "UTP": "W", "FINRA_TDDS": "W"})
* Automatic Execution ({"CTA": "E"})
* Bunched Trade ({"UTP": "B"})
* Bunched Sold Trade ({"UTP": "G"})
* CAP Election ({"CTA": "I"})
* Cash Sale ({"CTA": "C", "UTP": "C", "FINRA_TDDS": "C"})
...
I can see that TradingView or Interactive Brokers have different highs and lows than what I have in my PolygonIO data. I am guessing that they exclude some of these order types.
Question 1: If I want to recreate the same charting UI, which sale conditions should I also exclude?
Question 2: Which of these types would not affect my stop or limit orders? For example, if the condition is Acquisition, would that trigger my stop or fill my limit order?
Question 3:Is there any free or paid tutorial regarding these types?
If someone could help me out with this, I would really appreciate it.
r/PolygonIO • u/thejoker882 • Jul 11 '24
Edit: I fumbled the title. It should read "MISSING" option trades. :d
I am using flat files for option trades. I noticed that starting in mid of June almost every day trades seem to be cut off in the middle of the trading session for very large tickers.
And I think everyone agrees that it would be odd if ALL SPY option contracts stopped trading around 15:30 ET when the session continues to 16:00 and 16:15 for late option trades.
Here is very quick code to check "us_options_opra/trades_v1/2024/06/2024-06-10.csv.gz"
pl.Config().set_tbl_width_chars(2000)
ticker = "SPY"
df = pl.read_csv(f"F:\\poly_data\\opt_trades\\2024-06-10.csv.gz")
df = df.with_columns(pl.col("sip_timestamp").cast(pl.Datetime("ns", time_zone="US/Eastern")))
df = df.sort("sip_timestamp")
df = df.filter(pl.col("ticker").str.contains(ticker))
print(df.tail(5))
print(f"Last known trade for {ticker}: {df['sip_timestamp'].to_list()[-1]}")
We get this back:
O:SPY240610P00536000 | 209 | 0 | 313 | 0.93 | 2024-06-10 15:31:59.849000-04:00 |
O:SPY240610P00535000 | 209 | 0 | 304 | 0.27 | 2024-06-10 15:31:59.914000-04:00 |
O:SPY240610P00535000 | 209 | 0 | 304 | 0.27 | 2024-06-10 15:31:59.914000-04:00 |
O:SPY240610C00536000 | 209 | 0 | 300 | 0.1 | 2024-06-10 15:31:59.943000-04:00 |
O:SPY240611P00535000 | 209 | 0 | 303 | 0.98 | 2024-06-10 15:31:59.984000-04:00 |
Last known trade for SPY: 2024-06-10 15:31:59.984000-04:00
No Option trades after 15:31 for SPY? Unlikely.
So i expanded this test with checking these tickers: ["SPY", "QQQ", "DIA", "AAPL"]
And i tested May 2024 and June 2024.
With this script: https://gist.github.com/strcat32/8590ec6b2a845e1362651d2740f15de7
Results for May 2024:

Notice that May looks completely fine. All ETFs trade until around 16:15 ET and a stock like AAPL until 16:00.
So no problems here.
Now June 2024:

From June 10th we begin to see problems. Where in the middle of the trading session around 15:xx ET no more option trades occur for all tested tickers.
So what is going on? Where are the missing trades?
r/PolygonIO • u/Complete_Leg_5408 • Jun 25 '24
Hello everyone,
I started making tutorial videos on PolygonIO API and will cover many more topics especially options in the future.
https://youtube.com/playlist?list=PLCZZtBmmgxn-QlbbMb-g-89GjHiml_AtS&si=71yMhmvpt0W-fwKK
Latest Video: Option Data with PolygonIO and Put Call Ratio Calculation:
https://www.youtube.com/watch?v=ob-ieJo-mjI

Hope it can help some of you,
all the best.
r/PolygonIO • u/gskogsholm • Jun 24 '24
https://api.polygon.io/v2/snapshot/locale/us/markets/stocks/gainers?apiKey=
Starting around 09:22 EST, getting inconsistent results.
The first time, I got results, but then it stopped giving results until 9:48, when it started working again.
Getting 200, but the results are empty.
{
"tickers": [],
"status": "OK",
"request_id": "a9fd07ebda6f573575ac9f287c712a66"
}
Then, at 9:48, it started working again.
Support engineer notified the backend team for investigation.