API Reference / Accounts and Customers
Get API Quote Token
getApiQuoteTokens/api-quote-tokensBase URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)
Returns the streamer endpoint, entitlement level, and identification token the current customer needs to subscribe to real-time market data over the DXLink streamer. The token identifies the customer to tastytrade's quote provider, DXLink, and is valid for 24 hours. Call this before opening a quote streamer connection.
Code samples
curl -X GET 'https://api.cert.tastyworks.com/api-quote-tokens' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
-H 'User-Agent: tastytrade-docs-example/1.0'import requests
url = "https://api.cert.tastyworks.com/api-quote-tokens"
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/api-quote-tokens", {
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/api-quote-tokens", 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/api-quote-tokens"))
.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
No parameters.
Responses
Example response
{
"data": {
"dxlink-url": "wss://tasty-openapi-ws.dxfeed.com/realtime",
"expires-at": "2026-06-09T14:54:59.000Z",
"issued-at": "2026-06-09T14:30:00.000Z",
"level": "api",
"token": "eyJhbGciOiJIUzI1NiJ9.example.quote.streamer.token",
"websocket-url": "string"
},
"context": "/api-quote-tokens"
}Schema
datarequiredobject (QuoteStreamerTokenAuthResult)Credentials and connection details the current customer uses to subscribe to real-time market data over the DXLink quote streamer. Returned by GET /api-quote-tokens.
dxlink-urlstringWebSocket URL of the DXLink streamer to connect to for market data.
example:
"wss://tasty-openapi-ws.dxfeed.com/realtime"expires-atstring <date-time>ISO-8601 timestamp at which the quote token expires. Refresh the token before this time.
example:
"2026-06-09T14:54:59.000Z"issued-atstring <date-time>ISO-8601 timestamp at which the quote token was issued.
example:
"2026-06-09T14:30:00.000Z"levelstringMarket-data entitlement level granted to the token.
example:
"api"tokenstringIdentification token presented when authenticating to the streamer. The token is unique to the customer and identifies the customer to tastytrade's quote provider, DXLink. Valid for 24 hours.
example:
"eyJhbGciOiJIUzI1NiJ9.example.quote.streamer.token"websocket-urlstringWebSocket streamer URL.
contextrequiredstringexample:
"/api-quote-tokens"
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.
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.