Options chain API
Calls and puts for one expiry: strikes, prices, bid/ask, volume, open interest and implied volatility.
GET /v1/finance/options2 credits per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/finance/options?keyword=SPY",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 2 credits{ "expirationDates": [ 1795737600, 1795996800, "… 27 more" ], "strikes": [ 500, 505, "… 217 more" ], "quote": { "symbol": "SPY", "quoteType": "ETF", "shortName": "State Street SPDR S&P 500 ETF T", "longName": "State Street SPDR S&P 500 ETF Trust", "currency": "USD", "exchange": "PCX", "regularMarketPrice": 716.7, "regularMarketChange": -2.08002, "regularMarketChangePercent": -0.289382, "regularMarketVolume": 72380475, "regularMarketTime": 1795640400, "trailingPE": 22.801332, "fiftyTwoWeekHigh": 781.62, "fiftyTwoWeekLow": 629.28, "language": "en-US", "region": "US", "typeDisp": "ETF", "quoteSourceName": "Nasdaq Real Time Price", "triggerable": true, "customPriceAlertConfidence": "HIGH", "hasPrePostMarketData": true, "firstTradeDateMilliseconds": 728317800000, "priceHint": 2, "postMarketChangePercent": 0.5204382, "…": "57 more fields" }, "options": [ { "expirationDate": 1795737600, "calls": [ { "contractSymbol": "SPY261127C00500000", "strike": 500, "currency": "USD", "lastPrice": 216.78, "change": -34.350006, "percentChange": -13.678177, "volume": 24, "openInterest": 2, "bid": 215.55, "ask": 218.33, "contractSize": "REGULAR", "expiration": 1795737600, "lastTradeDate": 1795637984, "impliedVolatility": 2.8593778515625, "inTheMoney": true }, { "contractSymbol": "SPY261127C00505000", "strike": 505, "currency": "USD", "lastPrice": 211.19, "change": -4.419998, "percentChange": -2.0499969, "volume": 32, "openInterest": 1, "bid": 210.55, "ask": 213.33, "contractSize": "REGULAR", "expiration": 1795737600, "lastTradeDate": 1795638007, "impliedVolatility": 2.7890655273437504, "inTheMoney": true }, "… 210 more" ], "puts": [ { "contractSymbol": "SPY261127P00500000", "strike": 500, "currency": "USD", "lastPrice": 0.01, "change": 0, "percentChange": 0, "volume": 646, "openInterest": 3329, "bid": 0, "ask": 0.01, "contractSize": "REGULAR", "expiration": 1795737600, "lastTradeDate": 1795631598, "impliedVolatility": 2.000005, "inTheMoney": false }, { "contractSymbol": "SPY261127P00505000", "strike": 505, "currency": "USD", "lastPrice": 0.01, "change": -0.01, "percentChange": -50, "volume": 109, "openInterest": 544, "bid": 0, "ask": 0.01, "contractSize": "REGULAR", "expiration": 1795737600, "lastTradeDate": 1795622598, "impliedVolatility": 1.9375003125, "inTheMoney": false }, "… 188 more" ], "hasMiniOptions": false } ], "hasMiniOptions": false, "symbol": "SPY"}Parameters
| Name | Type | Description |
|---|---|---|
keywordquery · required | string | A ticker (AAPL, ^GSPC, EURUSD=X, BTC-USD) or a company name. Example: AAPL. |
expiryquery | string | YYYY-MM-DD or Unix seconds. |
Response fields
200 with a FinanceOptions, in Finance’s own JSON.
| Field | Type | Description |
|---|---|---|
symbol | string | |
expirationDates | integer[] | |
strikes | number[] | |
quote | FinanceQuote | |
options | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | The chain for one expiry, and every expiry date. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No ticker or data matches. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | Finance is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Default expiry?
The nearest one.
Finance is a trademark of Yahoo Inc. We are not affiliated with or endorsed by Yahoo Inc.