tastytrade · Schema

Leg

FinanceBrokerageTradingOptionsFuturesEquitiesCryptoMarket DataWebSocket

Properties

Name Type Description
type string The instrument type
direction string The position direction
side string The option side (only applicable for equity-option type)
quantity integer Number of contracts or shares (1-10 for options, 1-100 for stocks)
strikeSelection string How to select the strike for this leg
strikeRelativeLeg integer Index of the leg to use as reference when strike selection is relative to another leg
delta number Delta value when strikeSelection is "delta" (expressed as integer from 1 to 100)
percentageOTM number Percentage OTM when strikeSelection is "percentageOTM" or "percentageOTMRelative" (e.g. 0.1 for 10% OTM, -0.1 for 10% ITM)
currentPriceOffset number Offset from current price when strikeSelection is currentPriceOffset related (max 50000)
premium number Premium value when strikeSelection is "premium" (max 50000)
daysUntilExpiration integer Days until expiration for this leg
View JSON Schema on GitHub

JSON Schema

backtesting-Leg.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://developer.tastytrade.com/schemas/backtesting/Leg",
  "title": "Leg",
  "type": "object",
  "required": [
    "type",
    "direction",
    "quantity",
    "strikeSelection",
    "daysUntilExpiration"
  ],
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "equity",
        "equity-option"
      ],
      "description": "The instrument type"
    },
    "direction": {
      "type": "string",
      "enum": [
        "long",
        "short"
      ],
      "description": "The position direction"
    },
    "side": {
      "type": "string",
      "enum": [
        "call",
        "put"
      ],
      "description": "The option side (only applicable for equity-option type)"
    },
    "quantity": {
      "type": "integer",
      "minimum": 1,
      "maximum": 100,
      "description": "Number of contracts or shares (1-10 for options, 1-100 for stocks)"
    },
    "strikeSelection": {
      "type": "string",
      "enum": [
        "delta",
        "percentageOTM",
        "percentageOTMRelative",
        "currentPriceOffset",
        "currentPriceOffsetRelative",
        "currentPriceExactOffsetRelative",
        "premium"
      ],
      "description": "How to select the strike for this leg"
    },
    "strikeRelativeLeg": {
      "type": "integer",
      "description": "Index of the leg to use as reference when strike selection is relative to another leg"
    },
    "delta": {
      "type": "number",
      "minimum": 1,
      "maximum": 100,
      "description": "Delta value when strikeSelection is \"delta\" (expressed as integer from 1 to 100)"
    },
    "percentageOTM": {
      "type": "number",
      "description": "Percentage OTM when strikeSelection is \"percentageOTM\" or \"percentageOTMRelative\" (e.g. 0.1 for 10% OTM, -0.1 for 10% ITM)"
    },
    "currentPriceOffset": {
      "type": "number",
      "maximum": 50000,
      "description": "Offset from current price when strikeSelection is currentPriceOffset related (max 50000)"
    },
    "premium": {
      "type": "number",
      "maximum": 50000,
      "description": "Premium value when strikeSelection is \"premium\" (max 50000)"
    },
    "daysUntilExpiration": {
      "type": "integer",
      "description": "Days until expiration for this leg"
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/backtesting-Leg"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.