tastytradeDeveloper Docs
Legacy ↗

API Reference / Market Sessions

Get Current Futures Session By Exchange

getMarketTimeFuturesSessionsCurrentInstrumentCollection
get/market-time/futures/sessions/current/{instrument_collection}

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

Returns the current trading session for a single futures exchange identified by the `instrument_collection` path parameter (`CFE` or `CME`), including its previous and next sessions and current session state.

Code samples

curl -X GET 'https://api.cert.tastyworks.com/market-time/futures/sessions/current/CFE' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'User-Agent: tastytrade-docs-example/1.0'

Parameters

NameInTypeDescription
instrument_collection*pathstringFutures exchange, one of: CFE, CME
enum: CFE, CME
e.g. "CFE"

Responses

200The current futures session for the requested exchange.application/json

Example response

{
  "data": {
    "close-at": "2024-01-15T14:30:00.000Z",
    "close-at-ext": "2024-01-15T14:30:00.000Z",
    "instrument-collection": "Equity",
    "open-at": "2024-01-15T14:30:00.000Z",
    "start-at": "2024-01-15T14:30:00.000Z",
    "next-session": {
      "close-at": "2024-01-15T14:30:00.000Z",
      "close-at-ext": "2024-01-15T14:30:00.000Z",
      "instrument-collection": "string",
      "open-at": "2024-01-15T14:30:00.000Z",
      "session-date": "2024-01-15",
      "start-at": "2024-01-15T14:30:00.000Z"
    },
    "previous-session": {
      "close-at": "2024-01-15T14:30:00.000Z",
      "close-at-ext": "2024-01-15T14:30:00.000Z",
      "instrument-collection": "string",
      "open-at": "2024-01-15T14:30:00.000Z",
      "session-date": "2024-01-15",
      "start-at": "2024-01-15T14:30:00.000Z"
    },
    "state": "string"
  },
  "context": "/market-time/futures/sessions/current/{instrument_collection}"
}

Schema

  • datarequiredobject (CurrentSession)

    The current trading session for an instrument collection, including its state and the immediately previous and next sessions. Returned for equity and futures current-session endpoints.

    • close-atstring <date-time>

      ISO-8601 date-time at which the session closes.

    • close-at-extstring <date-time>

      ISO-8601 date-time of the session's extended close.

    • instrument-collectionstring

      The instrument collection this session applies to, for example `Equity`, `CME`, or `CFE`.

      example: "Equity"

    • open-atstring <date-time>

      ISO-8601 date-time at which the session opens.

    • start-atstring <date-time>

      ISO-8601 date-time at which the session starts.

    • next-sessionobject{6 fields}

      The next trading session that follows the current one.

    • previous-sessionobject{6 fields}

      The previous trading session that preceded the current one.

    • statestring

      The current state of the market for this session.

  • contextrequiredstring

    example: "/market-time/futures/sessions/current/{instrument_collection}"

401Missing or expired access token, or a missing/malformed `User-Agent` header.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.

404No session found for the supplied `instrument_collection`.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.

422The `instrument_collection` path value is not a supported futures exchange (`CFE` or `CME`).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.

429Too many requests. Back off and reduce your 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.