Create Quote Alert
postQuoteAlerts/quote-alertsBase URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Creates a quote alert for a symbol. Provide a `field` (`Last`, `Bid`, `Ask`, or `IV`), an `operator` (`>` or `<`), the `symbol`, and a `threshold` the watched field is compared against. Keys are dasherized and the request body must be JSON.
Code samples
curl -X POST 'https://api.cert.tastyworks.com/quote-alerts' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0' \
-H 'Content-Type: application/json' \
-d '{
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}'import requests
import json
url = "https://api.cert.tastyworks.com/quote-alerts"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
}
payload = json.loads("""
{
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}
""")
resp = requests.post(url, headers=headers, json=payload)
print(resp.status_code, resp.json())const resp = await fetch("https://api.cert.tastyworks.com/quote-alerts", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"User-Agent": "tastytrade-docs-example/1.0",
"Content-Type": "application/json",
},
body: JSON.stringify({
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}),
})
const data = await resp.json()
console.log(resp.status, data)package main
import (
"net/http"
"io"
"fmt"
"strings"
)
func main() {
body := strings.NewReader(`{
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}`)
req, _ := http.NewRequest("POST", "https://api.cert.tastyworks.com/quote-alerts", body)
req.Header.Set("Authorization", "Bearer YOUR_ACCESS_TOKEN")
req.Header.Set("User-Agent", "tastytrade-docs-example/1.0")
req.Header.Set("Content-Type", "application/json")
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/quote-alerts"))
.header("Authorization", "Bearer YOUR_ACCESS_TOKEN")
.header("User-Agent", "tastytrade-docs-example/1.0")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}
"""))
.build();
HttpResponse<String> resp = client.send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(resp.statusCode() + " " + resp.body());Parameters
No parameters.
Request bodyrequiredapplication/json
Example
{
"dx-symbol": "AAPL",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25"
}Schema
dx-symbolstringThe DXLink streamer symbol for the instrument.
example:
"AAPL"expires-atstringOptional expiration time for the alert.
example:
"2026-12-31T23:59:59.000Z"fieldrequiredstringThe quote field to watch. One of `Last`, `Bid`, `Ask`, or `IV` (implied volatility).
enum: Last, Bid, Ask, IV
example:
"Last"instrument-typestringThe type of instrument the alert is for, such as `Equity` or `Equity Option`.
example:
"Equity"operatorrequiredstringThe comparison operator applied between the watched `field` and the `threshold`. Either `>` (greater than) or `<` (less than).
enum: >, <
example:
">"symbolrequiredstringThe tastytrade symbol for the instrument to watch, for example an equity symbol like `AAPL`.
example:
"AAPL"thresholdrequiredstringThe threshold value the watched `field` is compared against, sent as a string-decimal.
example:
"150.25"threshold-numericstringOptional numeric form of the threshold value.
example:
"150.25"
Responses
Example response
{
"data": {
"alert-external-id": "12345",
"completed-at": "2026-06-05T18:12:43.000Z",
"created-at": "2026-06-01T14:30:00.000Z",
"dismissed-at": "2026-06-06T08:00:00.000Z",
"dx-symbol": "AAPL",
"expired-at": "2026-12-31T23:59:59.000Z",
"expires-at": "2026-12-31T23:59:59.000Z",
"field": "Last",
"instrument-type": "Equity",
"operator": ">",
"provider": "string",
"symbol": "AAPL",
"threshold": "150.25",
"threshold-numeric": "150.25",
"triggered-at": "2026-06-05T18:12:43.000Z",
"user-external-id": "abc123"
},
"context": "/quote-alerts"
}Schema
datarequiredobject (QuoteAlertDeserializer)A quote alert belonging to a user. Describes the watched instrument and condition along with timestamps recording the alert's lifecycle (created, triggered, completed, expired, or dismissed).
alert-external-idstringUnique external identifier for the alert. Use this value as the `alert_external_id` path parameter when cancelling the alert.
example:
"12345"completed-atstring <date-time>ISO-8601 timestamp when the alert finished its lifecycle (for example after it triggered).
example:
"2026-06-05T18:12:43.000Z"created-atstring <date-time>ISO-8601 timestamp when the alert was created.
example:
"2026-06-01T14:30:00.000Z"dismissed-atstring <date-time>ISO-8601 timestamp when the alert was dismissed by the user, if applicable.
example:
"2026-06-06T08:00:00.000Z"dx-symbolstringThe DXLink streamer symbol for the watched instrument.
example:
"AAPL"expired-atstring <date-time>ISO-8601 timestamp when the alert expired without triggering, if applicable.
example:
"2026-12-31T23:59:59.000Z"expires-atstringThe configured expiration time for the alert.
example:
"2026-12-31T23:59:59.000Z"fieldstringThe quote field the alert watches, such as `Last`, `Bid`, `Ask`, or `IV`.
example:
"Last"instrument-typestringThe type of instrument the alert is for, such as `Equity`.
example:
"Equity"operatorstringThe comparison operator between the watched field and the threshold, either `>` or `<`.
example:
">"providerstringThe market-data provider that supplies the quotes for this alert.
symbolstringThe tastytrade symbol for the watched instrument.
example:
"AAPL"thresholdstringThe threshold value the watched field is compared against, as a string-decimal.
example:
"150.25"threshold-numericstring <decimal>Numeric form of the threshold value. Decimal value serialized as a JSON string (e.g. "150.25").
example:
"150.25"triggered-atstring <date-time>ISO-8601 timestamp when the alert condition was first met and the alert fired.
example:
"2026-06-05T18:12:43.000Z"user-external-idstringExternal identifier of the user that owns the alert.
contextrequiredstringexample:
"/quote-alerts"
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": "preflight_check_failure",
"message": "One or more preflight checks failed",
"errors": [
{
"code": "preflight_check_failure",
"message": "A specific validation failed for this order."
}
]
}
}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:
write· not 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.