{
  "openapi": "3.1.0",
  "info": {
    "title": "Accounts and Customers",
    "version": "10.29.1",
    "description": "tastytrade Accounts and Customers API.",
    "contact": {
      "name": "tastytrade API support",
      "email": "api.support@tastytrade.com",
      "url": "https://developer.tastytrade.com"
    }
  },
  "tags": [
    {
      "name": "api-quote-tokens"
    },
    {
      "name": "customers"
    }
  ],
  "paths": {
    "/api-quote-tokens": {
      "get": {
        "description": "Returns the streamer endpoint, entitlement level, and identification token the current customer needs to subscribe to real-time market data over the DXLink streamer. The token identifies the customer to tastytrade's quote provider, DXLink, and is valid for 24 hours. Call this before opening a quote streamer connection.",
        "responses": {
          "200": {
            "description": "The DXLink streamer URL, entitlement level, and a quote token for the current customer. Quote streamer tokens are valid for 24 hours.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/QuoteStreamerTokenAuthResult"
                    },
                    "context": {
                      "type": "string",
                      "example": "/api-quote-tokens"
                    }
                  },
                  "required": [
                    "data",
                    "context"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired access token, or a missing/malformed User-Agent header. Send a valid Authorization: Bearer token (refresh every 15 minutes) and a User-Agent like my-app/1.0.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "example": {
                    "error": {
                      "code": "unauthorized",
                      "message": "No valid access token was provided; access tokens expire after 15 minutes."
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Request rate exceeded. Back off exponentially and reduce request rate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "api-quote-tokens"
        ],
        "operationId": "getApiQuoteTokens",
        "x-tt-class": "read",
        "x-money-moving": false,
        "x-idempotent": true,
        "x-rate-limit-bucket": "read",
        "summary": "Get API Quote Token"
      }
    },
    "/customers/{customer_id}": {
      "get": {
        "description": "Returns the full customer resource, including name, addresses, suitability profile, and personal or entity details. For simplicity and security the customer's internal identifier is not exposed: pass `me` as the `customer_id` to fetch the customer linked to the current access token. Set `allow-missing=true` to avoid a 404 when the customer does not exist.",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "int32"
            },
            "example": "me",
            "description": "Only a value of `me` is allowed. The API does not expose customers' internal identifiers."
          },
          {
            "in": "query",
            "name": "allow-missing",
            "description": "Does not raise a 404 if customer is missing",
            "required": false,
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "The full customer resource for the requested customer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Customer"
                    },
                    "context": {
                      "type": "string",
                      "example": "/customers/{customer_id}"
                    }
                  },
                  "required": [
                    "data",
                    "context"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired access token, or a missing/malformed User-Agent header. Send a valid Authorization: Bearer token and a User-Agent like my-app/1.0.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "example": {
                    "error": {
                      "code": "unauthorized",
                      "message": "No valid access token was provided; access tokens expire after 15 minutes."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No customer matches the supplied customer_id. Pass `me` to resolve the current customer, or set allow-missing=true to suppress this error.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Request rate exceeded. Back off exponentially and reduce request rate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "customers"
        ],
        "operationId": "getCustomersCustomerId",
        "x-tt-class": "read",
        "x-money-moving": false,
        "x-idempotent": true,
        "x-rate-limit-bucket": "read",
        "summary": "Get Customer"
      }
    },
    "/customers/{customer_id}/accounts": {
      "get": {
        "description": "Returns every account the current customer has access to, each wrapped with the customer's authority level over it. After authenticating, this is typically the first call a client makes to discover account numbers for subsequent requests. Authority levels are `owner` (full privileges), `trade-only` (can trade but not move cash), and `read-only` (GET access only). Pass `me` as the `customer_id`.",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "int32"
            },
            "example": "me",
            "description": "Only a value of `me` is allowed. The API does not expose customers' internal identifiers."
          }
        ],
        "responses": {
          "200": {
            "description": "A list of the accounts the customer can access, each with its authority level.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "items": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/AccountAuthorityDecorator"
                          }
                        }
                      },
                      "required": [
                        "items"
                      ]
                    },
                    "context": {
                      "type": "string",
                      "example": "/customers/{customer_id}/accounts"
                    },
                    "pagination": {
                      "type": "object",
                      "description": "Paging metadata, present on paginated list responses.",
                      "properties": {
                        "per-page": {
                          "type": "integer"
                        },
                        "page-offset": {
                          "type": "integer"
                        },
                        "item-offset": {
                          "type": "integer"
                        },
                        "total-items": {
                          "type": "integer"
                        },
                        "total-pages": {
                          "type": "integer"
                        },
                        "current-item-count": {
                          "type": "integer"
                        }
                      }
                    }
                  },
                  "required": [
                    "data",
                    "context"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired access token, or a missing/malformed User-Agent header. Send a valid Authorization: Bearer token and a User-Agent like my-app/1.0.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "example": {
                    "error": {
                      "code": "unauthorized",
                      "message": "No valid access token was provided; access tokens expire after 15 minutes."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No customer matches the supplied customer_id. Pass `me` to resolve the current customer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Request rate exceeded. Back off exponentially and reduce request rate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "customers"
        ],
        "operationId": "getCustomersCustomerIdAccounts",
        "x-tt-class": "read",
        "x-money-moving": false,
        "x-idempotent": true,
        "x-rate-limit-bucket": "read",
        "summary": "List Customer Accounts"
      }
    },
    "/customers/{customer_id}/accounts/{account_number}": {
      "get": {
        "description": "Returns a single account resource by account number for the given customer. Use the account numbers returned by the list-accounts endpoint. Pass `me` as the `customer_id` to scope the lookup to the current customer.",
        "parameters": [
          {
            "in": "path",
            "name": "customer_id",
            "required": true,
            "schema": {
              "type": "string",
              "format": "int32"
            },
            "example": "me",
            "description": "Only a value of `me` is allowed. The API does not expose customers' internal identifiers."
          },
          {
            "in": "path",
            "name": "account_number",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "5WX01234",
            "description": "The account number of the account."
          }
        ],
        "responses": {
          "200": {
            "description": "The full account resource for the requested account number.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Account"
                    },
                    "context": {
                      "type": "string",
                      "example": "/customers/{customer_id}/accounts/{account_number}"
                    }
                  },
                  "required": [
                    "data",
                    "context"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or expired access token, or a missing/malformed User-Agent header. Send a valid Authorization: Bearer token and a User-Agent like my-app/1.0.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ],
                  "example": {
                    "error": {
                      "code": "unauthorized",
                      "message": "No valid access token was provided; access tokens expire after 15 minutes."
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "No account matches the supplied account_number for this customer. Verify the account number and that you are using the correct environment (sandbox vs production).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          },
          "429": {
            "description": "Request rate exceeded. Back off exponentially and reduce request rate.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "Standard tastytrade error envelope. Branch on error.code, not the message text.",
                  "properties": {
                    "error": {
                      "type": "object",
                      "required": [
                        "code",
                        "message"
                      ],
                      "properties": {
                        "code": {
                          "type": "string",
                          "description": "Machine-readable error code (see the Error reference)."
                        },
                        "message": {
                          "type": "string",
                          "description": "Human-readable explanation."
                        },
                        "errors": {
                          "type": "array",
                          "description": "Present for multi-error / validation failures; one entry per problem.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "code": {
                                "type": "string"
                              },
                              "message": {
                                "type": "string"
                              },
                              "domain": {
                                "type": "string"
                              }
                            }
                          }
                        }
                      }
                    }
                  },
                  "required": [
                    "error"
                  ]
                }
              }
            }
          }
        },
        "tags": [
          "customers"
        ],
        "operationId": "getCustomersCustomerIdAccountsAccountNumber",
        "x-tt-class": "read",
        "x-money-moving": false,
        "x-idempotent": true,
        "x-rate-limit-bucket": "read",
        "summary": "Get Account"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.cert.tastyworks.com",
      "description": "Sandbox"
    },
    {
      "url": "https://api.tastyworks.com",
      "description": "Production"
    }
  ],
  "components": {
    "schemas": {
      "QuoteStreamerTokenAuthResult": {
        "type": "object",
        "properties": {
          "dxlink-url": {
            "description": "WebSocket URL of the DXLink streamer to connect to for market data.",
            "type": "string",
            "example": "wss://tasty-openapi-ws.dxfeed.com/realtime"
          },
          "expires-at": {
            "description": "ISO-8601 timestamp at which the quote token expires. Refresh the token before this time.",
            "type": "string",
            "format": "date-time",
            "example": "2026-06-09T14:54:59.000Z"
          },
          "issued-at": {
            "description": "ISO-8601 timestamp at which the quote token was issued.",
            "type": "string",
            "format": "date-time",
            "example": "2026-06-09T14:30:00.000Z"
          },
          "level": {
            "description": "Market-data entitlement level granted to the token.",
            "type": "string",
            "example": "api"
          },
          "token": {
            "description": "Identification token presented when authenticating to the streamer. The token is unique to the customer and identifies the customer to tastytrade's quote provider, DXLink. Valid for 24 hours.",
            "type": "string",
            "example": "eyJhbGciOiJIUzI1NiJ9.example.quote.streamer.token"
          },
          "websocket-url": {
            "description": "WebSocket streamer URL.",
            "type": "string"
          }
        },
        "description": "Credentials and connection details the current customer uses to subscribe to real-time market data over the DXLink quote streamer. Returned by GET /api-quote-tokens."
      },
      "AccountAuthorityDecorator": {
        "type": "object",
        "properties": {
          "account": {
            "type": "object",
            "properties": {
              "account-number": {
                "description": "",
                "type": "string"
              },
              "account-type-name": {
                "description": "",
                "type": "string"
              },
              "closed-at": {
                "description": "",
                "type": "string",
                "format": "date-time"
              },
              "created-at": {
                "description": "",
                "type": "string",
                "format": "date-time"
              },
              "day-trader-status": {
                "description": "Whether the account is flagged as a pattern day trader. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
                "type": "string"
              },
              "ext-account-id": {
                "description": "",
                "type": "string"
              },
              "ext-crm-id": {
                "description": "",
                "type": "string"
              },
              "external-accounts": {
                "description": "",
                "type": "string"
              },
              "external-fdid": {
                "description": "",
                "type": "string"
              },
              "external-id": {
                "description": "",
                "type": "string"
              },
              "funding-date": {
                "description": "",
                "type": "string",
                "format": "date"
              },
              "futures-account-purpose": {
                "description": "",
                "type": "string"
              },
              "investment-objective": {
                "description": "",
                "type": "string"
              },
              "investment-time-horizon": {
                "description": "",
                "type": "string"
              },
              "is-closed": {
                "description": "",
                "type": "boolean"
              },
              "is-firm-error": {
                "description": "",
                "type": "boolean"
              },
              "is-firm-proprietary": {
                "description": "",
                "type": "boolean"
              },
              "is-foreign": {
                "description": "Whether the account is associated with a foreign address. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
                "type": "string"
              },
              "is-futures-approved": {
                "description": "",
                "type": "boolean"
              },
              "liquidity-needs": {
                "description": "",
                "type": "string"
              },
              "margin-or-cash": {
                "description": "",
                "type": "string"
              },
              "nickname": {
                "description": "",
                "type": "string"
              },
              "opened-at": {
                "description": "",
                "type": "string",
                "format": "date-time"
              },
              "regulatory-domain": {
                "description": "",
                "type": "string"
              },
              "risk-tolerance": {
                "description": "",
                "type": "string"
              },
              "submitting-user-id": {
                "description": "",
                "type": "string"
              },
              "suitable-options-level": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          },
          "authority-level": {
            "description": "The customer's privilege over this account: `owner` (full privileges), `trade-only` (can trade but cannot deposit/withdraw cash), or `read-only` (GET endpoints only).",
            "type": "string",
            "example": "owner"
          }
        },
        "description": "Pairs an account with the current customer's authority over it. Returned for each entry of GET /customers/{customer_id}/accounts."
      },
      "Account": {
        "type": "object",
        "properties": {
          "account-number": {
            "description": "The unique tastytrade account number. Use this in account-scoped endpoint paths.",
            "type": "string",
            "example": "5WT00001"
          },
          "account-type-name": {
            "description": "Human-readable account type, for example Individual, Roth IRA, or Traditional IRA.",
            "type": "string",
            "example": "Individual"
          },
          "closed-at": {
            "description": "ISO-8601 timestamp at which the account was closed, if applicable.",
            "type": "string",
            "format": "date-time",
            "example": "2024-12-31T23:59:59.000+00:00"
          },
          "created-at": {
            "description": "ISO-8601 timestamp at which the account record was created.",
            "type": "string",
            "format": "date-time",
            "example": "2019-03-14T15:39:31.265+00:00"
          },
          "day-trader-status": {
            "description": "Whether the account is flagged as a pattern day trader. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
            "type": "string"
          },
          "ext-account-id": {
            "description": "",
            "type": "string"
          },
          "ext-crm-id": {
            "description": "",
            "type": "string"
          },
          "external-accounts": {
            "description": "",
            "type": "string"
          },
          "external-fdid": {
            "description": "",
            "type": "string"
          },
          "external-id": {
            "description": "External account identifier used by tastytrade's backoffice systems.",
            "type": "string",
            "example": "A0000196557"
          },
          "funding-date": {
            "description": "Date the account was first funded (YYYY-MM-DD).",
            "type": "string",
            "format": "date",
            "example": "2017-01-02"
          },
          "futures-account-purpose": {
            "description": "Stated purpose for futures trading on the account.",
            "type": "string",
            "example": "SPECULATING"
          },
          "investment-objective": {
            "description": "The account's stated investment objective.",
            "type": "string",
            "example": "SPECULATION"
          },
          "investment-time-horizon": {
            "description": "",
            "type": "string"
          },
          "is-closed": {
            "description": "Whether the account is closed.",
            "type": "boolean",
            "example": false
          },
          "is-firm-error": {
            "description": "Whether the account is a firm error account.",
            "type": "boolean",
            "example": false
          },
          "is-firm-proprietary": {
            "description": "Whether the account is a firm proprietary account.",
            "type": "boolean",
            "example": false
          },
          "is-foreign": {
            "description": "Whether the account is associated with a foreign address. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
            "type": "string"
          },
          "is-futures-approved": {
            "description": "Whether the account is approved to trade futures.",
            "type": "boolean",
            "example": true
          },
          "liquidity-needs": {
            "description": "",
            "type": "string"
          },
          "margin-or-cash": {
            "description": "Whether the account is a Margin or Cash account.",
            "type": "string",
            "example": "Margin"
          },
          "nickname": {
            "description": "Customer-assigned nickname for the account.",
            "type": "string",
            "example": "Individual"
          },
          "opened-at": {
            "description": "ISO-8601 timestamp at which the account was opened.",
            "type": "string",
            "format": "date-time",
            "example": "2019-03-14T15:39:31.265+00:00"
          },
          "regulatory-domain": {
            "description": "",
            "type": "string"
          },
          "risk-tolerance": {
            "description": "",
            "type": "string"
          },
          "submitting-user-id": {
            "description": "",
            "type": "string"
          },
          "suitable-options-level": {
            "description": "The options trading level the account is approved for.",
            "type": "string",
            "example": "No Restrictions"
          }
        },
        "description": "A tastytrade brokerage account, including its identifiers, type, status flags, and suitability attributes."
      },
      "Customer": {
        "type": "object",
        "properties": {
          "id": {
            "description": "Customer identifier. The API returns `me` rather than the internal id.",
            "type": "string",
            "example": "me"
          },
          "first-name": {
            "description": "Customer's first name.",
            "type": "string",
            "example": "John"
          },
          "first-surname": {
            "description": "",
            "type": "string"
          },
          "last-name": {
            "description": "Customer's last name.",
            "type": "string",
            "example": "Doe"
          },
          "middle-name": {
            "description": "",
            "type": "string"
          },
          "prefix-name": {
            "description": "",
            "type": "string"
          },
          "second-surname": {
            "description": "",
            "type": "string"
          },
          "suffix-name": {
            "description": "",
            "type": "string"
          },
          "address": {
            "type": "object",
            "properties": {
              "city": {
                "description": "",
                "type": "string"
              },
              "country": {
                "description": "",
                "type": "string"
              },
              "is-domestic": {
                "description": "Note: the wire value is a JSON boolean (e.g. true), although this schema declares a string.",
                "type": "string"
              },
              "is-foreign": {
                "description": "Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
                "type": "string"
              },
              "postal-code": {
                "description": "",
                "type": "string"
              },
              "state-region": {
                "description": "",
                "type": "string"
              },
              "street-one": {
                "description": "",
                "type": "string"
              },
              "street-three": {
                "description": "",
                "type": "string"
              },
              "street-two": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          },
          "customer-suitability": {
            "type": "object",
            "properties": {
              "id": {
                "description": "Note: the wire value is a JSON number (e.g. 3), although this schema declares a string.",
                "type": "string"
              },
              "annual-net-income": {
                "description": "",
                "type": "integer",
                "format": "int32"
              },
              "covered-options-trading-experience": {
                "description": "",
                "type": "string"
              },
              "customer-id": {
                "description": "",
                "type": "integer",
                "format": "int32"
              },
              "employer-name": {
                "description": "",
                "type": "string"
              },
              "employment-status": {
                "description": "",
                "type": "string"
              },
              "futures-trading-experience": {
                "description": "",
                "type": "string"
              },
              "job-title": {
                "description": "",
                "type": "string"
              },
              "liquid-net-worth": {
                "description": "",
                "type": "integer",
                "format": "int32"
              },
              "marital-status": {
                "description": "",
                "type": "string"
              },
              "net-worth": {
                "description": "",
                "type": "integer",
                "format": "int32"
              },
              "number-of-dependents": {
                "description": "",
                "type": "integer",
                "format": "int32"
              },
              "occupation": {
                "description": "",
                "type": "string"
              },
              "stock-trading-experience": {
                "description": "",
                "type": "string"
              },
              "tax-bracket": {
                "description": "",
                "type": "string"
              },
              "uncovered-options-trading-experience": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          },
          "mailing-address": {
            "type": "object",
            "properties": {
              "city": {
                "description": "",
                "type": "string"
              },
              "country": {
                "description": "",
                "type": "string"
              },
              "is-domestic": {
                "description": "Note: the wire value is a JSON boolean (e.g. true), although this schema declares a string.",
                "type": "string"
              },
              "is-foreign": {
                "description": "Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
                "type": "string"
              },
              "postal-code": {
                "description": "",
                "type": "string"
              },
              "state-region": {
                "description": "",
                "type": "string"
              },
              "street-one": {
                "description": "",
                "type": "string"
              },
              "street-three": {
                "description": "",
                "type": "string"
              },
              "street-two": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          },
          "is-foreign": {
            "description": "Whether the customer is classified as foreign. Note: the wire value is a JSON boolean (e.g. false), although this schema declares a string.",
            "type": "string"
          },
          "regulatory-domain": {
            "description": "",
            "type": "string"
          },
          "usa-citizenship-type": {
            "description": "U.S. citizenship classification, for example Citizen.",
            "type": "string",
            "example": "Citizen"
          },
          "home-phone-number": {
            "description": "",
            "type": "string"
          },
          "home-phone-number-details": {
            "description": "",
            "type": "string"
          },
          "mobile-phone-number": {
            "description": "Customer's mobile phone number, e.g. +11231234567.",
            "type": "string",
            "example": "+11231234567"
          },
          "mobile-phone-number-details": {
            "description": "",
            "type": "string"
          },
          "work-phone-number": {
            "description": "",
            "type": "string"
          },
          "work-phone-number-details": {
            "description": "",
            "type": "string"
          },
          "birth-date": {
            "description": "Customer's date of birth (YYYY-MM-DD).",
            "type": "string",
            "example": "2000-01-01"
          },
          "email": {
            "description": "Customer's email address.",
            "type": "string",
            "example": "johndoe@nowhere.com"
          },
          "external-id": {
            "description": "External customer identifier used by tastytrade's backoffice systems.",
            "type": "string",
            "example": "C0000037211"
          },
          "foreign-tax-number": {
            "description": "",
            "type": "string"
          },
          "tax-number": {
            "description": "Masked tax identification number on file.",
            "type": "string",
            "example": "*****1234"
          },
          "tax-number-type": {
            "description": "Type of tax identification number on file, for example SSN.",
            "type": "string",
            "example": "SSN"
          },
          "birth-country": {
            "description": "",
            "type": "string"
          },
          "citizenship-country": {
            "description": "Country of citizenship.",
            "type": "string",
            "example": "USA"
          },
          "visa-expiration-date": {
            "description": "",
            "type": "string"
          },
          "visa-type": {
            "description": "",
            "type": "string"
          },
          "agreed-to-margining": {
            "description": "Whether the customer has agreed to margining.",
            "type": "boolean",
            "example": true
          },
          "subject-to-tax-withholding": {
            "description": "",
            "type": "boolean"
          },
          "agreed-to-terms": {
            "description": "Whether the customer has agreed to the account terms.",
            "type": "boolean",
            "example": true
          },
          "signature-of-agreement": {
            "description": "",
            "type": "boolean"
          },
          "desk-customer-id": {
            "description": "",
            "type": "string"
          },
          "ext-crm-id": {
            "description": "",
            "type": "string"
          },
          "family-member-names": {
            "description": "",
            "type": "string"
          },
          "gender": {
            "description": "",
            "type": "string"
          },
          "has-industry-affiliation": {
            "description": "",
            "type": "boolean"
          },
          "has-institutional-assets": {
            "description": "",
            "type": "string"
          },
          "has-listed-affiliation": {
            "description": "",
            "type": "boolean"
          },
          "has-political-affiliation": {
            "description": "",
            "type": "boolean"
          },
          "industry-affiliation-firm": {
            "description": "",
            "type": "string"
          },
          "is-investment-adviser": {
            "description": "",
            "type": "string"
          },
          "listed-affiliation-symbol": {
            "description": "",
            "type": "string"
          },
          "political-organization": {
            "description": "",
            "type": "string"
          },
          "user-id": {
            "description": "",
            "type": "string"
          },
          "has-delayed-quotes": {
            "description": "Whether the customer receives delayed market data quotes.",
            "type": "boolean",
            "example": false
          },
          "has-pending-or-approved-application": {
            "description": "",
            "type": "string"
          },
          "is-professional": {
            "description": "Whether the customer is classified as a professional for market-data purposes.",
            "type": "boolean",
            "example": false
          },
          "permitted-account-types": {
            "description": "",
            "type": "string"
          },
          "created-at": {
            "description": "",
            "type": "string",
            "format": "date-time"
          },
          "entity": {
            "type": "object",
            "properties": {
              "id": {
                "description": "",
                "type": "string"
              },
              "address": {
                "type": "object",
                "properties": {
                  "city": {
                    "description": "",
                    "type": "string"
                  },
                  "country": {
                    "description": "",
                    "type": "string"
                  },
                  "is-domestic": {
                    "description": "",
                    "type": "string"
                  },
                  "is-foreign": {
                    "description": "",
                    "type": "string"
                  },
                  "postal-code": {
                    "description": "",
                    "type": "string"
                  },
                  "state-region": {
                    "description": "",
                    "type": "string"
                  },
                  "street-one": {
                    "description": "",
                    "type": "string"
                  },
                  "street-three": {
                    "description": "",
                    "type": "string"
                  },
                  "street-two": {
                    "description": "",
                    "type": "string"
                  }
                },
                "description": ""
              },
              "business-nature": {
                "description": "",
                "type": "string"
              },
              "date-of-trust-creation": {
                "description": "",
                "type": "string"
              },
              "email": {
                "description": "",
                "type": "string"
              },
              "entity-officers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "description": "",
                      "type": "string"
                    },
                    "external-id": {
                      "description": "",
                      "type": "string"
                    },
                    "first-name": {
                      "description": "",
                      "type": "string"
                    },
                    "last-name": {
                      "description": "",
                      "type": "string"
                    },
                    "middle-name": {
                      "description": "",
                      "type": "string"
                    },
                    "prefix-name": {
                      "description": "",
                      "type": "string"
                    },
                    "suffix-name": {
                      "description": "",
                      "type": "string"
                    },
                    "address": {
                      "type": "object",
                      "properties": {
                        "city": {
                          "description": "",
                          "type": "string"
                        },
                        "country": {
                          "description": "",
                          "type": "string"
                        },
                        "is-domestic": {
                          "description": "",
                          "type": "string"
                        },
                        "is-foreign": {
                          "description": "",
                          "type": "string"
                        },
                        "postal-code": {
                          "description": "",
                          "type": "string"
                        },
                        "state-region": {
                          "description": "",
                          "type": "string"
                        },
                        "street-one": {
                          "description": "",
                          "type": "string"
                        },
                        "street-three": {
                          "description": "",
                          "type": "string"
                        },
                        "street-two": {
                          "description": "",
                          "type": "string"
                        }
                      },
                      "description": ""
                    },
                    "birth-country": {
                      "description": "",
                      "type": "string"
                    },
                    "birth-date": {
                      "description": "",
                      "type": "string",
                      "format": "date"
                    },
                    "citizenship-country": {
                      "description": "",
                      "type": "string"
                    },
                    "email": {
                      "description": "",
                      "type": "string"
                    },
                    "employer-name": {
                      "description": "",
                      "type": "string"
                    },
                    "employment-status": {
                      "description": "",
                      "type": "string"
                    },
                    "home-phone-number": {
                      "description": "",
                      "type": "string"
                    },
                    "is-foreign": {
                      "description": "",
                      "type": "string"
                    },
                    "job-title": {
                      "description": "",
                      "type": "string"
                    },
                    "marital-status": {
                      "description": "",
                      "type": "string"
                    },
                    "mobile-phone-number": {
                      "description": "",
                      "type": "string"
                    },
                    "number-of-dependents": {
                      "description": "",
                      "type": "string"
                    },
                    "occupation": {
                      "description": "",
                      "type": "string"
                    },
                    "owner-of-record": {
                      "description": "",
                      "type": "boolean"
                    },
                    "relationship-to-entity": {
                      "description": "",
                      "type": "string"
                    },
                    "tax-number": {
                      "description": "",
                      "type": "string"
                    },
                    "tax-number-type": {
                      "description": "",
                      "type": "string"
                    },
                    "usa-citizenship-type": {
                      "description": "",
                      "type": "string"
                    },
                    "visa-expiration-date": {
                      "description": "",
                      "type": "string",
                      "format": "date"
                    },
                    "visa-type": {
                      "description": "",
                      "type": "string"
                    },
                    "work-phone-number": {
                      "description": "",
                      "type": "string"
                    }
                  },
                  "description": ""
                }
              },
              "entity-suitability": {
                "type": "object",
                "properties": {
                  "id": {
                    "description": "",
                    "type": "string"
                  },
                  "annual-net-income": {
                    "description": "",
                    "type": "integer",
                    "format": "int32"
                  },
                  "covered-options-trading-experience": {
                    "description": "",
                    "type": "string"
                  },
                  "entity-id": {
                    "description": "",
                    "type": "integer",
                    "format": "int32"
                  },
                  "futures-trading-experience": {
                    "description": "",
                    "type": "string"
                  },
                  "liquid-net-worth": {
                    "description": "",
                    "type": "integer",
                    "format": "int32"
                  },
                  "net-worth": {
                    "description": "",
                    "type": "integer",
                    "format": "int32"
                  },
                  "stock-trading-experience": {
                    "description": "",
                    "type": "string"
                  },
                  "tax-bracket": {
                    "description": "",
                    "type": "string"
                  },
                  "uncovered-options-trading-experience": {
                    "description": "",
                    "type": "string"
                  }
                },
                "description": ""
              },
              "entity-type": {
                "description": "",
                "type": "string"
              },
              "foreign-institution": {
                "description": "",
                "type": "string"
              },
              "grantor-birth-date": {
                "description": "",
                "type": "string"
              },
              "grantor-email": {
                "description": "",
                "type": "string"
              },
              "grantor-first-name": {
                "description": "",
                "type": "string"
              },
              "grantor-last-name": {
                "description": "",
                "type": "string"
              },
              "grantor-middle-name": {
                "description": "",
                "type": "string"
              },
              "grantor-tax-number": {
                "description": "",
                "type": "string"
              },
              "has-foreign-bank-affiliation": {
                "description": "",
                "type": "string"
              },
              "has-foreign-institution-affiliation": {
                "description": "",
                "type": "string"
              },
              "is-domestic": {
                "description": "",
                "type": "string"
              },
              "legal-name": {
                "description": "",
                "type": "string"
              },
              "mailing-address": {
                "type": "object",
                "properties": {
                  "city": {
                    "description": "",
                    "type": "string"
                  },
                  "country": {
                    "description": "",
                    "type": "string"
                  },
                  "is-domestic": {
                    "description": "",
                    "type": "string"
                  },
                  "is-foreign": {
                    "description": "",
                    "type": "string"
                  },
                  "postal-code": {
                    "description": "",
                    "type": "string"
                  },
                  "state-region": {
                    "description": "",
                    "type": "string"
                  },
                  "street-one": {
                    "description": "",
                    "type": "string"
                  },
                  "street-three": {
                    "description": "",
                    "type": "string"
                  },
                  "street-two": {
                    "description": "",
                    "type": "string"
                  }
                },
                "description": ""
              },
              "phone-number": {
                "description": "",
                "type": "string"
              },
              "secretary-name": {
                "description": "",
                "type": "string"
              },
              "tax-election": {
                "description": "",
                "type": "string"
              },
              "tax-number": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          },
          "identifiable-type": {
            "description": "Whether the customer is identified as a Person or an Entity.",
            "type": "string",
            "example": "Person"
          },
          "person": {
            "type": "object",
            "properties": {
              "external-id": {
                "description": "",
                "type": "string"
              },
              "first-name": {
                "description": "",
                "type": "string"
              },
              "last-name": {
                "description": "",
                "type": "string"
              },
              "middle-name": {
                "description": "",
                "type": "string"
              },
              "prefix-name": {
                "description": "",
                "type": "string"
              },
              "suffix-name": {
                "description": "",
                "type": "string"
              },
              "birth-country": {
                "description": "",
                "type": "string"
              },
              "birth-date": {
                "description": "",
                "type": "string",
                "format": "date"
              },
              "citizenship-country": {
                "description": "",
                "type": "string"
              },
              "usa-citizenship-type": {
                "description": "",
                "type": "string"
              },
              "visa-expiration-date": {
                "description": "",
                "type": "string",
                "format": "date"
              },
              "visa-type": {
                "description": "",
                "type": "string"
              },
              "employer-name": {
                "description": "",
                "type": "string"
              },
              "employment-status": {
                "description": "",
                "type": "string"
              },
              "job-title": {
                "description": "",
                "type": "string"
              },
              "marital-status": {
                "description": "",
                "type": "string"
              },
              "number-of-dependents": {
                "description": "Note: the wire value is a JSON number (e.g. 4), although this schema declares a string.",
                "type": "string"
              },
              "occupation": {
                "description": "",
                "type": "string"
              }
            },
            "description": ""
          }
        },
        "description": "A tastytrade customer, including name, residential and mailing addresses, suitability profile, and either personal or entity details. Fetched via GET /customers/{customer_id} using `me` as the identifier."
      }
    }
  },
  "x-tastytrade-service": {
    "serviceName": "customer-account-api",
    "group": "accounts-and-customers",
    "title": "Accounts and Customers"
  }
}