getInstrumentsSearch
getInstrumentsSearchget
/instruments/searchBase URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Search instruments by symbol, description, or tags
Code samples
curl -X GET 'https://api.cert.tastyworks.com/instruments/search?category=%7Bcategory%7D&exchange=%7Bexchange%7D&from-date=2024-01-15&instrument-sub-type=%7Binstrument-sub-type%7D&limit=1&query=%7Bquery%7D&type=%7Btype%7D' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/instruments/search?category=%7Bcategory%7D&exchange=%7Bexchange%7D&from-date=2024-01-15&instrument-sub-type=%7Binstrument-sub-type%7D&limit=1&query=%7Bquery%7D&type=%7Btype%7D"
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/instruments/search?category=%7Bcategory%7D&exchange=%7Bexchange%7D&from-date=2024-01-15&instrument-sub-type=%7Binstrument-sub-type%7D&limit=1&query=%7Bquery%7D&type=%7Btype%7D", {
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/instruments/search?category=%7Bcategory%7D&exchange=%7Bexchange%7D&from-date=2024-01-15&instrument-sub-type=%7Binstrument-sub-type%7D&limit=1&query=%7Bquery%7D&type=%7Btype%7D", 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/instruments/search?category=%7Bcategory%7D&exchange=%7Bexchange%7D&from-date=2024-01-15&instrument-sub-type=%7Binstrument-sub-type%7D&limit=1&query=%7Bquery%7D&type=%7Btype%7D"))
.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 |
|---|---|---|---|
| category | query | string | Comma-separated categories to filter (case-insensitive) |
| exchange | query | string | Comma-separated exchanges to filter (case-insensitive) |
| from-date | query | string | Lower bound on stops_trading_at; surfaces expired events that stopped trading on/after this date e.g. "2024-01-15" |
| instrument-sub-type | query | string | Comma-separated instrument sub-types to filter (equities only): ETF, Index |
| limit | query | integer | Maximum number of results e.g. 1 |
| query | query | string | Search query |
| type | query | string | Comma-separated instrument types to filter |
Responses
200Search instruments by symbol, description, or tagsapplication/json
Example response
{
"data": {
"items": [
{
"category": "string",
"description": "string",
"event-product-external-id": "abc123",
"exchange": "string",
"expiration-value": "100.00",
"external-id": "abc123",
"instrument-type": "Equity",
"stops-trading-at": "2024-01-15T14:30:00.000Z",
"strike-types": "string",
"sub-category": "string",
"symbol": "AAPL",
"underlying-product": "string",
"underlying-product-type": "string",
"underlying-streamer-symbol": "AAPL"
}
]
},
"context": "/instruments/search",
"pagination": {
"per-page": 0,
"page-offset": 0,
"item-offset": 0,
"total-items": 0,
"total-pages": 0,
"current-item-count": 0
}
}Schema
datarequiredobjectitemsrequiredarray<object>{14 fields}
contextrequiredstringexample:
"/instruments/search"paginationobjectPaging metadata, present on paginated list responses.
per-pageintegerpage-offsetintegeritem-offsetintegertotal-itemsintegertotal-pagesintegercurrent-item-countinteger
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.