tastytradeDeveloper Docs
Legacy ↗

API Reference / Orders

List Today's Complex Orders

getAccountsAccountNumberComplexOrdersLive
get/accounts/{account_number}/complex-orders/live

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

Returns all complex orders that had a component order placed today, regardless of current status. Despite the `live` name, the response includes orders that were cancelled, rejected, or filled today as well as still-working orders.

Code samples

curl -X GET 'https://api.cert.tastyworks.com/accounts/5WX01234/complex-orders/live' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  -H 'User-Agent: tastytrade-docs-example/1.0'

Parameters

NameInTypeDescription
account_number*pathstring
e.g. "5WX01234"

Responses

200Complex orders with a component order placed during the current trading day.application/json

Example response

{
  "data": {
    "items": [
      {
        "id": "2000010530",
        "account-number": "5WX01234",
        "ratio-price-comparator": "lte",
        "ratio-price-is-threshold-based-on-notional": false,
        "ratio-price-threshold": "1.25",
        "terminal-at": "2024-07-31T16:50:23.417+00:00",
        "type": "OTOCO",
        "related-orders": [
          {
            "id": "abc123",
            "complex-order-id": "abc123",
            "complex-order-tag": "string",
            "replaces-order-id": "abc123",
            "replacing-order-id": "abc123",
            "status": "string"
          }
        ],
        "orders": [
          {
            "id": "abc123",
            "account-number": "5WX01234",
            "cancel-user-id": "abc123",
            "cancel-username": "string",
            "cancellable": true,
            "cancelled-at": "2024-01-15T14:30:00.000Z",
            "complex-order-id": "abc123",
            "complex-order-tag": "string",
            "confirmation-status": "string",
            "contingent-status": "string",
            "editable": true,
            "edited": true,
            "external-identifier": "string",
            "global-request-id": "abc123",
            "gtc-date": "2024-01-15",
            "in-flight-at": "2024-01-15T14:30:00.000Z",
            "liquidity-pool-instrument-type": "Equity",
            "live-at": "2024-01-15T14:30:00.000Z",
            "max-value-per-liquidity-allocation-fill": "100.00",
            "order-type": "string",
            "preflight-id": "abc123",
            "price": "100.00",
            "price-effect": "100.00",
            "received-at": "2024-01-15T14:30:00.000Z",
            "reject-reason": "string",
            "replaces-order-id": "abc123",
            "replacing-order-id": "abc123",
            "size": "string",
            "source": "string",
            "status": "string",
            "stop-trigger": "string",
            "terminal-at": "2024-01-15T14:30:00.000Z",
            "time-in-force": "string",
            "underlying-instrument-type": "Equity",
            "underlying-symbol": "AAPL",
            "updated-at": "2024-01-15T14:30:00.000Z",
            "user-id": "abc123",
            "username": "string",
            "value": "100.00",
            "value-effect": "100.00",
            "legs": [],
            "order-rule": {}
          }
        ],
        "trigger-order": {
          "id": "abc123",
          "account-number": "5WX01234",
          "cancel-user-id": "abc123",
          "cancel-username": "string",
          "cancellable": true,
          "cancelled-at": "2024-01-15T14:30:00.000Z",
          "complex-order-id": "abc123",
          "complex-order-tag": "string",
          "confirmation-status": "string",
          "contingent-status": "string",
          "editable": true,
          "edited": true,
          "external-identifier": "string",
          "global-request-id": "abc123",
          "gtc-date": "2024-01-15",
          "in-flight-at": "2024-01-15T14:30:00.000Z",
          "liquidity-pool-instrument-type": "Equity",
          "live-at": "2024-01-15T14:30:00.000Z",
          "max-value-per-liquidity-allocation-fill": "100.00",
          "order-type": "string",
          "preflight-id": "abc123",
          "price": "100.00",
          "price-effect": "100.00",
          "received-at": "2024-01-15T14:30:00.000Z",
          "reject-reason": "string",
          "replaces-order-id": "abc123",
          "replacing-order-id": "abc123",
          "size": "string",
          "source": "string",
          "status": "string",
          "stop-trigger": "string",
          "terminal-at": "2024-01-15T14:30:00.000Z",
          "time-in-force": "string",
          "underlying-instrument-type": "Equity",
          "underlying-symbol": "AAPL",
          "updated-at": "2024-01-15T14:30:00.000Z",
          "user-id": "abc123",
          "username": "string",
          "value": "100.00",
          "value-effect": "100.00",
          "legs": [
            {}
          ],
          "order-rule": {
            "cancel-at": "2024-01-15T14:30:00.000Z",
            "cancelled-at": "2024-01-15T14:30:00.000Z",
            "route-after": "2024-01-15T14:30:00.000Z",
            "routed-at": "2024-01-15T14:30:00.000Z",
            "order-conditions": []
          }
        }
      }
    ]
  },
  "context": "/accounts/{account_number}/complex-orders/live",
  "pagination": {
    "per-page": 0,
    "page-offset": 0,
    "item-offset": 0,
    "total-items": 0,
    "total-pages": 0,
    "current-item-count": 0
  }
}

Schema

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

    example: "/accounts/{account_number}/complex-orders/live"

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

403The token's scope or the account authority does not permit reading this account's orders.application/json

Example response

{
  "error": {
    "code": "not_permitted",
    "message": "User not permitted access"
  }
}

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.

404The account number does not exist or is not accessible with this token.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.

429Request rate exceeded. Back off exponentially 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.