I am a hobbyist. I like to tinker with finacial instruments. And options are facinating instrument vehicles. Options provides leverage for your investments.

Exploratory space for options is vast. Taking variables of call, put, strike prices and expiry dates, there are more than 1k+ option contracts for each underlying asset. This results in explosion of exploratory space if you consider all the option contracts available in market. At any given point of time, there are more than 100k+ live option contracts.

What better way to explore and scan this space than using custom code? There are multiple ways to get insights or devise your algorithmic startegy or backtest your strategy for option contracts. You can use snasphots for backtesting or getting insights. However, in this post, we will focus on real time or near real time option data. We start with analysis of data provider for real time options for hobbyists. This blog isnt focused on data provider APIs for instituions or enterprises, but focuses more on hobbyists and hackers who are on limited budget.

Before we start to analyze different data providers, let me setup provide context on requirements through which lens I will analyze these data providers. These requirements are based on one of the option strategy I experimented with.

Requirements lens

Freshness: Realtime or Near-realtime options data. I consider 15 mins delay as near-real time data.

Blanket API for Option chain I should be able to get all option contracts of underlying ticker with a single API call. The API shouldnt restrict me to only get option contracts of a ticker for single expiry.

[Nice to have] Websocket feed for Option contracts For streaming information, getting live feed is preferred. Its fragile architecture to call option chain API every 5 mins and do processing. In longer run, I would like to use streaming feed for option chain.

Price This will be deal breaker. I am hobbyist. I will be more conservative and say maximum I am willing to pay for Options API is $50 per month. Tbh, once you put your strategy in production, $50 is dirt cheap.

Backtesting How would you gain confidence in startegy, if you cannot backtest? There must be support of historical option chain API to help backtest

Option Entities as part of API call 1. Option ticker
2. Expiry 3. Call or Put
4. OHLC 5. Last transaction price 6. Strike price 7. Greeks 8. IV 9. Underlying instrument price 10. Open Interest and Volume

Ease of implementation I would classify this as Low/Medium/High

Getting all these requirements for $50 is hard find. We will explore some data providers, and try to maintain balance between API features and requirements.

Data providers comparision:

  1. Thetadata
Requirement Data Provider
Freshness Realtime
Blanket API for Option chain Separate API call for Options chain and Greeks
Websocket feed for Option contracts Yes
Price $80 for standard subscription
Historical data Yes
Option Entities as part of API call Everything except second order Greeks
Ease of implementation Hard

Notes

  • Thetadata is more suited for algo traders focusing on volatility and requiring millisecond updates.
  • Thetadata requires to setup Theta Termina which is constantly running. I havent looked into how it works with details but that could add more complexity
  1. MarketData
Requirement Data Provider
Freshness Realtime
Blanket API for Option chain Single call
Websocket feed for Option contracts No
Price $30/month for annual subscription
$100/month for monthly subscriotion
Historical Yes
Option Entities as part of API call Everything
Ease of implementation Easy

Some of the Marketdata features:

Feature Notes
Paid vs Trial plans Marketdata provides ability to have try out plans without paying for 30 days.
Some features differ between Paid and Trial plans
Standard vs Premium APIs Premium APIs and featrues can only be used in paid plans.
Standard APIs can be used in Trail plans
Premium APIs Earnings api
Live vs Cached feed feature
Cached feed feature Cached feed allows to get data from cache. Not guaranteed that its going to be realtime.
Delay could be between seconds to days.
Advantage is it will only charge 1 credit for responses that return multiple quotes, like option chains. That would be huge cost savings
SDKs Developed Go SDK. Python SDK in development
Option chain filters Multiple filters

Notes

  • Their credit based pricing model isnt much favorable for option chains. Everytime one ticker(option contract) is included in the response, its considered one credit. Lets say, we get an option chain with 40 option contracts data. This will be considered as usage of 40 credits. Credits can be exhausted really quick in this manner.
    • There is an option to retrieve cached feed vs live feed. If you use cached feed, you are only charged 1 credit per response irrespective of number of quotes returned. Using cached feed is a premium feature.

Playing around with Option Chain API

  • Option Chain API only support a single expiration date per call. It cannot support multiple expiration date. ie. The filters need to resolve to single expiration date
  • I am running the code on 07/04/2024. If no paramater is specified, it returns option chain on 07/19. Not sure, why?
  • If I set “weekly” to “true”, it returns option chain of immediate week. This makes sense. If I set “weekly” to “false”, it returns option chain on 07/19. Why is it not returning 07/12 option chain?
  • Setting “monthly” to “true”, doesnt return monthly option chain. It still returns 07/19 option chain for some reason.
  • For my usecase, I should call the expiration endpoint first. Take top x dates and call option chain endpoint simultaneously.

Updated: