List Compact Option Chains
getOptionChainsSymbolCompact/option-chains/{symbol}/compactBase URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Returns the equity option chain for an underlying symbol (e.g. `AAPL`) in a compact form that concatenates every strike symbol across all expirations into a single array, minimizing content size.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/option-chains/AAPL/compact' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/option-chains/AAPL/compact"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
}
resp = requests.get(url, headers=headers)
print(resp.status_code, resp.json())const resp = await fetch("https://api.cert.tastyworks.com/option-chains/AAPL/compact", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
},
})
const data = await resp.json()
console.log(resp.status, data)package main
import (
"net/http"
"io"
"fmt"
)
func main() {
req, _ := http.NewRequest("GET", "https://api.cert.tastyworks.com/option-chains/AAPL/compact", nil)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("User-Agent", "tastytrade-docs-example/1.0")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.Status, string(out))
}import java.net.URI;
import java.net.http.*;
HttpClient client = HttpClient.newHttpClient();
HttpRequest req = HttpRequest.newBuilder()
.uri(URI.create("https://api.cert.tastyworks.com/option-chains/AAPL/compact"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("User-Agent", "tastytrade-docs-example/1.0")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.statusCode() + " " + resp.body());Parameters
| Name | In | Type | Description |
|---|---|---|---|
| symbol* | path | string | e.g. "AAPL" |
Responses
Example response
{
"data": {
"items": [
{
"underlying-symbol": "SPY",
"root-symbol": "SPY",
"option-chain-type": "Standard",
"settlement-type": "PM",
"shares-per-contract": 100,
"expiration-type": "Weekly",
"deliverables": [
{
"id": 114830,
"root-symbol": "SPY",
"deliverable-type": "Shares",
"description": "100 shares of SPY",
"amount": "100.0",
"symbol": "SPY",
"instrument-type": "Equity",
"percent": "100"
}
],
"symbols": [
"SPY 230731C00370000",
"SPY 230731P00370000",
"SPY 230731C00380000",
"SPY 230731P00380000"
],
"streamer-symbols": [
".SPY230706C370",
".SPY230706P370"
]
}
]
},
"context": "/option-chains/{symbol}/compact"
}Schema
datarequiredobject (CompactOptionChainList)Container for the compact equity option chain. The chain objects are returned in an `items` array.
itemsrequiredarray<object>{9 fields}Compact option chain objects for the underlying symbol.
contextrequiredstringexample:
"/option-chains/{symbol}/compact"
Example response
{
"error": {
"code": "unauthorized",
"message": "No valid access token was provided; access tokens expire after 15 minutes."
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Example response
{
"error": {
"code": "string",
"message": "string",
"errors": [
{
"code": "string",
"message": "string",
"domain": "string"
}
]
}
}Schema
errorrequiredobjectcoderequiredstringMachine-readable error code (see the Error reference).
messagerequiredstringHuman-readable explanation.
errorsarray<object>{3 fields}Present for multi-error / validation failures; one entry per problem.
Related
- Rate-limit class:
read· idempotent — Rate limits & backoff - Error reference — codes, causes, and fixes
Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.