tastytradeDeveloper Docs
Legacy ↗

API Reference / Risk Parameters

Get SPAN File Rows

getSpanRows
get/span/rows

Base URL: https://api.cert.tastyworks.com (Sandbox) · https://api.tastyworks.com (Production)

Returns paginated raw rows from the SPAN risk file published by a futures exchange (CME or CFE) for a specific date. SPAN is the risk-array methodology used to compute margin on futures and future options; use these rows to load or audit the source data behind futures margin calculations.

Code samples

curl -X GET 'https://api.cert.tastyworks.com/span/rows?date=2024-01-15&exchange=CME&page-offset=10&per-page=10' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'User-Agent: tastytrade-docs-example/1.0'

Parameters

NameInTypeDescription
date*querystringThe date of the SPAN file
e.g. "2024-01-15"
exchange*querystringExchange source of the SPAN file
enum: CME, CFE
e.g. "CME"
page-offsetqueryinteger
e.g. 10
per-pagequeryinteger
e.g. 10

Responses

200A paginated array of SPAN file rows for the requested date and exchange.application/json

Example response

{
  "data": {
    "items": [
      {
        "file-date": "2026-06-08",
        "row-index": 0,
        "exchange": "CME",
        "row-data": "0CME 20260608"
      }
    ]
  },
  "context": "/span/rows",
  "pagination": {
    "per-page": 0,
    "page-offset": 0,
    "item-offset": 0,
    "total-items": 0,
    "total-pages": 0,
    "current-item-count": 0
  }
}

Schema

  • datarequiredobject
    • itemsrequiredarray<object>{4 fields}
  • contextrequiredstring

    example: "/span/rows"

  • paginationobject

    Paging metadata, present on paginated list responses.

    • per-pageinteger
    • page-offsetinteger
    • item-offsetinteger
    • total-itemsinteger
    • total-pagesinteger
    • current-item-countinteger
401Missing or expired access token. Tokens last 15 minutes and must be sent on every request. Note: a missing or malformed `User-Agent` header also produces a 401, but it is returned as an HTML error page from the proxy layer rather than this JSON error body.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.

422Invalid query parameters, for example a malformed `date`, an `exchange` outside the allowed set, or a `per-page` value beyond the permitted range.application/json

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

  • 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.

429Rate limit exceeded. Back off exponentially and reduce the 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.