tastytradeDeveloper Docs
Legacy ↗

API Reference / Accounts and Customers

Get API Quote Token

getApiQuoteTokens
get/api-quote-tokens

Base 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'

Parameters

No parameters.

Responses

200The DXLink streamer URL, entitlement level, and a quote token for the current customer. Quote streamer tokens are valid for 24 hours.application/json

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-urlstring

      WebSocket 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"

    • levelstring

      Market-data entitlement level granted to the token.

      example: "api"

    • tokenstring

      Identification 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-urlstring

      WebSocket streamer URL.

  • contextrequiredstring

    example: "/api-quote-tokens"

401Missing or expired access token, or a missing/malformed User-Agent header. Send a valid Authorization: Bearer token (refresh every 15 minutes) and a User-Agent like my-app/1.0.application/json

Example response

{
  "error": {
    "code": "unauthorized",
    "message": "No valid access token was provided; access tokens expire after 15 minutes."
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

429Request rate exceeded. Back off exponentially and reduce request rate.application/json

Example response

{
  "error": {
    "code": "string",
    "message": "string",
    "errors": [
      {
        "code": "string",
        "message": "string",
        "domain": "string"
      }
    ]
  }
}

Schema

  • errorrequiredobject
    • coderequiredstring

      Machine-readable error code (see the Error reference).

    • messagerequiredstring

      Human-readable explanation.

    • errorsarray<object>{3 fields}

      Present for multi-error / validation failures; one entry per problem.

Related

Agents: this page is also Markdown (with the embedded OpenAPI definition) — append .md or send Accept: text/markdown. Index at /llms.txt.