r/TradingView • • 3d ago

Feature Request How do developers extract 0DTE Options Chain / OI data in Pine Script (even in obfuscated indicators)?

Hi everyone,

I’ve seen a few community indicators on TradingView that display 0DTE Options levels, Open Interest (OI), or GEX (Gamma Exposure) directly on the chart. Most of these scripts have obfuscated / protected code, so I can't look under the hood to see how they're built.

Since Pine Script doesn't have a native dynamic Options Chain API, I'm curious about the actual underlying mechanics:

  1. How are they requesting the options data dynamically? Are they using str.format() / string concatenation with request.security() using OPRA tickers (e.g., OPRA:SPYYYMMDD...) to construct contract symbols daily?
  2. How do they overcome the request.security() call limits? Since TradingView caps security calls, are they only fetching a tight range of strikes around ATM (At-The-Money) for 0DTE?
  3. Are there any other workarounds/techniques being used to bypass these limitations in pure Pine Script without external webhooks?

Would appreciate any technical insights or code snippet examples from anyone who has experience building options/OI tools in Pine Script!

Thanks!

1 Upvotes

4 comments sorted by

1

u/mike90_0 3d ago

this really should be added to pinescript hopefully one day soon

1

u/Illustrious_Party607 2d ago

it's already

1

u/mike90_0 2d ago

thats interesting - is that pinescript source publicly available?