tastytradeDeveloper Docs
Legacy ↗

API Reference / Risk Parameters

Get Account Position Limit

getAccountsAccountNumberPositionLimit
get/accounts/{account_number}/position-limit

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

Returns the position and order size limits configured for an account, broken out by instrument type (equities, equity options, futures, and future options). Use this to validate order and position sizing before submitting orders.

Code samples

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

Parameters

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

Responses

200The account's position and order size limits.application/json

Example response

{
  "data": {
    "id": 12345,
    "account-number": "5WX01234",
    "equity-option-order-size": 2500,
    "equity-order-size": 10000,
    "future-option-order-size": 100,
    "future-order-size": 100,
    "underlying-opening-order-limit": 5000,
    "equity-option-position-size": 10000,
    "equity-position-size": 50000,
    "future-option-position-size": 500,
    "future-position-size": 500
  },
  "context": "/accounts/{account_number}/position-limit"
}

Schema

  • datarequiredobject (PositionLimit)

    The maximum order and position sizes permitted for an account, broken out by instrument type.

    • idinteger <int32>

      Unique identifier for this position-limit record.

      example: 12345

    • account-numberstring

      The account these limits apply to.

      example: "5WX01234"

    • equity-option-order-sizeinteger <int32>

      Maximum number of contracts allowed on a single equity option order.

      example: 2500

    • equity-order-sizeinteger <int32>

      Maximum number of shares allowed on a single equity order.

      example: 10000

    • future-option-order-sizeinteger <int32>

      Maximum number of contracts allowed on a single future option order.

      example: 100

    • future-order-sizeinteger <int32>

      Maximum number of contracts allowed on a single futures order.

      example: 100

    • underlying-opening-order-limitinteger <int32>

      Maximum opening order size permitted per underlying.

      example: 5000

    • equity-option-position-sizeinteger <int32>

      Maximum aggregate equity option position size, in contracts.

      example: 10000

    • equity-position-sizeinteger <int32>

      Maximum aggregate equity position size, in shares.

      example: 50000

    • future-option-position-sizeinteger <int32>

      Maximum aggregate future option position size, in contracts.

      example: 500

    • future-position-sizeinteger <int32>

      Maximum aggregate futures position size, in contracts.

      example: 500

  • contextrequiredstring

    example: "/accounts/{account_number}/position-limit"

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.

403Authenticated, but the token's scope or the account authority does not permit reading this account's position limit.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.

404No account exists for the supplied `account_number`, or it is not visible under the authenticated customer.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.

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.