tastytrade orders API

Allows an API client to view, filter, create, cancel and replace orders.

Operations 11

GET /accounts/{account_number}/orders #
POST /accounts/{account_number}/orders #
POST /accounts/{account_number}/orders/dry-run #
GET /accounts/{account_number}/orders/live #
GET /accounts/{account_number}/orders/{id} #
PUT /accounts/{account_number}/orders/{id} #
PATCH /accounts/{account_number}/orders/{id} #
DELETE /accounts/{account_number}/orders/{id} #
POST /accounts/{account_number}/orders/{id}/dry-run #
GET /customers/{customer_id}/orders #
GET /customers/{customer_id}/orders/live #

Work with this as data

Every API 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 apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • 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 API
curl "https://apis.io/api/v1/apis/tastytrade-orders-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

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

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

tastytrade-orders-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Account Status accounts Orders API
  version: 7.1.0
  description: Operations about accounts
servers:
- url: https://api.tastyworks.com
tags:
- name: orders
  description: Allows an API client to view, filter, create, cancel and replace orders.
paths:
  /accounts/{account_number}/orders:
    get:
      description: "Returns a paginated list of the customer's orders (as identified by the provided authentication token)\n      based on sort param. If no sort is passed in, it defaults to descending order."
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: page-offset
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - in: query
        name: per-page
        required: false
        schema:
          type: integer
          format: int32
          default: 100
          maximum: 200
          minimum: 1
      - in: query
        name: end-at
        description: DateTime end range for filtering orders in full date-time
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: end-date
        required: false
        schema:
          type: string
          format: date
      - in: query
        name: futures-symbol
        description: Used to fetch both futures and futures options orders
        required: false
        schema:
          type: string
      - in: query
        name: sort
        description: The order to sort results in. Accepts `Desc` or `Asc`. Defaults to `Desc`
        required: false
        schema:
          type: string
          enum:
          - Desc
          - Asc
          default: Desc
      - in: query
        name: start-at
        description: DateTime start rage for filtering orders in full date-time. Required if start-date param not provided
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: start-date
        required: false
        schema:
          type: string
          format: date
      - in: query
        name: status
        description: ' (example: status[]={value1}&status[]={value2})'
        required: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: underlying-instrument-type
        description: Underlying instrument type
        required: false
        schema:
          type: string
      - in: query
        name: underlying-symbol
        required: false
        schema:
          type: string
      responses:
        '200':
          description: "Returns a paginated list of the customer's orders (as identified by the provided authentication token)\n      based on sort param. If no sort is passed in, it defaults to descending order."
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: getAccountsAccountNumberOrders
    post:
      description: Accepts a json document containing parameters to create an order for the client.
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: Accepts a json document containing parameters to create an order for the client.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlacedOrderResponse'
      tags:
      - orders
      operationId: postAccountsAccountNumberOrders
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postAccountsAccountNumberOrders'
        required: true
  /accounts/{account_number}/orders/dry-run:
    post:
      description: "Accepts a json document containing parameters to create an order and \\\n          then runs the prefights without placing the order."
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: "Accepts a json document containing parameters to create an order and \\\n          then runs the prefights without placing the order."
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlacedOrderResponse'
      tags:
      - orders
      operationId: postAccountsAccountNumberOrdersDryRun
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postAccountsAccountNumberOrdersDryRun'
        required: true
  /accounts/{account_number}/orders/live:
    get:
      description: Returns a list of orders from the current trading day. Includes all statuses, not only Live.
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: page-offset
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - in: query
        name: per-page
        required: false
        schema:
          type: integer
          format: int32
          default: 100
          maximum: 200
          minimum: 1
      responses:
        '200':
          description: Returns a list of orders from the current trading day. Includes all statuses, not only Live.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: getAccountsAccountNumberOrdersLive
  /accounts/{account_number}/orders/{id}:
    get:
      description: Returns a single order based on the id
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Returns a single order based on the id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: getAccountsAccountNumberOrdersId
    put:
      description: Replaces a live order with a new one. Subsequent fills of the original order will abort the replacement.
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Replaces a live order with a new one. Subsequent fills of the original order will abort the replacement.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: putAccountsAccountNumberOrdersId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/putAccountsAccountNumberOrdersId'
        required: true
    patch:
      description: "Edit price and execution properties of a live order by replacement. Subsequent fills of the original order\n      will abort the replacement."
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: "Edit price and execution properties of a live order by replacement. Subsequent fills of the original order\n      will abort the replacement."
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: patchAccountsAccountNumberOrdersId
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/patchAccountsAccountNumberOrdersId'
        required: true
    delete:
      description: Requests order cancellation
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '200':
          description: Requests order cancellation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: deleteAccountsAccountNumberOrdersId
  /accounts/{account_number}/orders/{id}/dry-run:
    post:
      description: Runs through preflights for cancel-replace and edit without routing
      parameters:
      - in: path
        name: account_number
        required: true
        schema:
          type: integer
          format: int32
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int32
      responses:
        '201':
          description: Runs through preflights for cancel-replace and edit without routing
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlacedOrderResponse'
      tags:
      - orders
      operationId: postAccountsAccountNumberOrdersIdDryRun
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/postAccountsAccountNumberOrdersIdDryRun'
        required: true
  /customers/{customer_id}/orders:
    get:
      description: "Returns a paginated list of the customer's orders (as identified by the provided authentication token)\n              based on sort param. If no sort is passed in, it defaults to descending order."
      parameters:
      - in: path
        name: customer_id
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: account-numbers
        description: 'The account numbers to use for the lookup (example: account-numbers[]={value1}&account-numbers[]={value2})'
        required: true
        schema:
          type: array
          items:
            type: string
      - in: query
        name: page-offset
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - in: query
        name: per-page
        required: false
        schema:
          type: integer
          format: int32
          default: 100
          maximum: 200
          minimum: 1
      - in: query
        name: end-at
        description: DateTime end range for filtering orders in full date-time
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: end-date
        required: false
        schema:
          type: string
          format: date
      - in: query
        name: futures-symbol
        description: Used to fetch both futures and futures options orders
        required: false
        schema:
          type: string
      - in: query
        name: sort
        description: The order to sort results in. Accepts `Desc` or `Asc`. Defaults to `Desc`
        required: false
        schema:
          type: string
          enum:
          - Desc
          - Asc
          default: Desc
      - in: query
        name: start-at
        description: DateTime start rage for filtering orders in full date-time. Required if start-date param not provided
        required: false
        schema:
          type: string
          format: date-time
      - in: query
        name: start-date
        required: false
        schema:
          type: string
          format: date
      - in: query
        name: status
        description: ' (example: status[]={value1}&status[]={value2})'
        required: false
        schema:
          type: array
          items:
            type: string
      - in: query
        name: underlying-instrument-type
        description: Underlying instrument type
        required: false
        schema:
          type: string
      - in: query
        name: underlying-symbol
        required: false
        schema:
          type: string
      responses:
        '200':
          description: "Returns a paginated list of the customer's orders (as identified by the provided authentication token)\n              based on sort param. If no sort is passed in, it defaults to descending order."
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: getCustomersCustomerIdOrders
  /customers/{customer_id}/orders/live:
    get:
      description: Returns a list of orders from the current trading day. Includes all statuses, not only Live.
      parameters:
      - in: path
        name: customer_id
        required: true
        schema:
          type: integer
          format: int32
      - in: query
        name: account-numbers
        description: 'The account numbers to use for the lookup (example: account-numbers[]={value1}&account-numbers[]={value2})'
        required: true
        schema:
          type: array
          items:
            type: string
      - in: query
        name: page-offset
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - in: query
        name: per-page
        required: false
        schema:
          type: integer
          format: int32
          default: 100
          maximum: 200
          minimum: 1
      responses:
        '200':
          description: Returns a list of orders from the current trading day. Includes all statuses, not only Live.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Order'
      tags:
      - orders
      operationId: getCustomersCustomerIdOrdersLive
components:
  schemas:
    postAccountsAccountNumberOrdersIdDryRun:
      type: object
      properties:
        gtc-date:
          type: string
          format: date
          description: The date in which a GTD order will expire. Can only be provided if time-in-force is GTD.
        order-type:
          type: string
          description: "The type of order in regards to the price. i.e.\n                                    `Limit`, `Market`, `Marketable Limit`, `Notional Market`, `Stop` or `Stop Limit`"
          enum:
          - Limit
          - Market
          - Marketable Limit
          - Notional Market
          - Stop
          - Stop Limit
        stop-trigger:
          type: number
          format: double
          description: The price trigger at which a stop or stop-limit order becomes valid.
        time-in-force:
          type: string
          description: "The length in time before the order expires. i.e.\n                                       `Day`, `Ext`, `Ext Overnight`, `GTC`, `GTC Ext`, `GTC Ext Overnight`, `GTD` or `IOC`"
          enum:
          - Day
          - Ext
          - Ext Overnight
          - GTC
          - GTC Ext
          - GTC Ext Overnight
          - GTD
          - IOC
        price:
          type: number
          format: double
          description: The price of the Order. Required for limit and stop-limit orders.
        price-effect:
          type: string
          description: If pay or receive payment for placing the order. i.e. `Credit` or `Debit`
          enum:
          - Credit
          - Debit
        value:
          type: number
          format: double
          description: The notional value of the Order, required for notional market orders.
        value-effect:
          type: string
          description: If pay or receive payment for placing the notional market order. i.e. `Credit` or `Debit`
          enum:
          - Credit
          - Debit
        automated-source:
          type: boolean
          description: If the order was placed from an automated source
          default: false
        external-identifier:
          type: string
          description: External identifier for the order
        partition-key:
          type: string
          description: Account partition key
        preflight-id:
          type: string
          description: Transient order identifier used for matching preflight errors to an individual order
        source:
          type: string
          description: The source the order is coming from
        legs:
          type: array
          items:
            type: object
            properties:
              action:
                type: string
                description: TODO
                enum:
                - Allocate
                - Buy
                - Buy to Close
                - Buy to Open
                - Sell
                - Sell to Close
                - Sell to Open
              instrument-type:
                type: string
                description: The type of Instrument.
                enum:
                - Cryptocurrency
                - Equity
                - Equity Option
                - Event Contract
                - Fixed Income Security
                - Future
                - Future Option
                - Liquidity Pool
              quantity:
                type: number
                format: double
                description: TODO
              symbol:
                type: string
                description: "Symbol for stock, specific option symbol in the\n          OCC symbology or specific future symbol. e.g. \"AAPL\", \"AAPL  150515C00120000\", \"/ESM5\""
            required:
            - action
            - instrument-type
            - symbol
      required:
      - order-type
      - stop-trigger
      - time-in-force
      - price-effect
      - value-effect
      description: Runs through preflights for cancel-replace and edit without routing
    putAccountsAccountNumberOrdersId:
      type: object
      properties:
        gtc-date:
          type: string
          format: date
          description: The date in which a GTD order will expire. Can only be provided if time-in-force is GTD.
        order-type:
          type: string
          description: "The type of order in regards to the price. i.e.\n                                    `Limit`, `Market`, `Marketable Limit`, `Notional Market`, `Stop` or `Stop Limit`"
          enum:
          - Limit
          - Market
          - Marketable Limit
          - Notional Market
          - Stop
          - Stop Limit
        stop-trigger:
          type: number
          format: double
          description: The price trigger at which a stop or stop-limit order becomes valid.
        time-in-force:
          type: string
          description: "The length in time before the order expires. i.e.\n                                       `Day`, `Ext`, `Ext Overnight`, `GTC`, `GTC Ext`, `GTC Ext Overnight`, `GTD` or `IOC`"
          enum:
          - Day
          - Ext
          - Ext Overnight
          - GTC
          - GTC Ext
          - GTC Ext Overnight
          - GTD
          - IOC
        price:
          type: number
          format: double
          description: The price of the Order. Required for limit and stop-limit orders.
        price-effect:
          type: string
          description: If pay or receive payment for placing the order. i.e. `Credit` or `Debit`
          enum:
          - Credit
          - Debit
        value:
          type: number
          format: double
          description: The notional value of the Order, required for notional market orders.
        value-effect:
          type: string
          description: If pay or receive payment for placing the notional market order. i.e. `Credit` or `Debit`
          enum:
          - Credit
          - Debit
        automated-source:
          type: boolean
          description: If the order was placed from an automated source
          default: false
        external-identifier:
          type: string
          description: External identifier for the order
        partition-key:
          type: string
          description: Account partition key
        preflight-id:
          type: string
          description: Transient order identifier used for matching preflight errors to an individual order
        source:
          type: string
          description: The source the order is coming from
        rules:
          type: object
          properties:
            cancel-at:
              type: string
              format: date-time
              description: Latest time an order should be canceled at
            conditions:
              type: array
              items:
                type: object
                properties:
                  action:
                    type: string
                    description: "The action in which the trigger is enacted. i.e.\n                                    `cancel` and `route`"
                    enum:
                    - cancel
                    - route
                  instrument-type:
                    type: string
                    description: "The instrument's type in relation to the condition. e.g. \\\n                                              `Equity` or `Future`"
                    enum:
                    - Bond
                    - Cryptocurrency
                    - Currency Pair
                    - Equity
                    - Equity Offering
                    - Equity Option
                    - Event Contract
                    - Fixed Income Security
                    - Future
                    - Future Option
                    - Index
                    - Liquidity Pool
                    - Unknown
                    - Warrant
                  symbol:
                    type: string
                    description: "The symbol to apply the condition to. \\\n                                      e.g Stock Ticker Symbol `AAPL` or the TW Future Symbol `/ESZ9`"
                  comparator:
                    type: string
                    description: "How to compare against the threshold. \\\n                                        Currently Supports `gte` (Greater than or Equal To) or `lte` (Less than or Equal to)"
                    enum:
                    - gte
                    - lte
                  indicator:
                    type: string
                    description: The indicator for the trigger, currently only supports `last`
                    enum:
                    - last
                    - nat
                  threshold:
                    type: number
                    format: double
                    description: The price at which the condition triggers.
                  price-components:
                    type: array
                    items:
                      type: object
                      properties:
                        instrument-type:
                          type: string
                          description: The instrument's type in relation to the symbol.
                          enum:
                          - Bond
                          - Cryptocurrency
                          - Currency Pair
                          - Equity
                          - Equity Offering
                          - Equity Option
                          - Event Contract
                          - Fixed Income Security
                          - Future
                          - Future Option
                          - Index
                          - Liquidity Pool
                          - Unknown
                          - Warrant
                        quantity:
                          type: number
                          format: double
                          description: The Ratio quantity in relation to the symbol
                        quantity-direction:
                          type: string
                          description: The quantity direction(ie Long or Short) in relation to the symbol
                          enum:
                          - Long
                          - Short
                        symbol:
                          type: string
                          description: "The symbol to apply the condition to. \\\n                                      e.g. Stock Ticker Symbol `AAPL` or the TW Future Symbol `/ESZ9`"
                      required:
                      - instrument-type
                      - quantity
                      - quantity-direction
                      - symbol
                required:
                - action
                - comparator
                - indicator
                - threshold
            route-after:
              type: string
              format: date-time
              description: Earliest time an order should route at
      required:
      - order-type
      - stop-trigger
      - time-in-force
      - price-effect
      - value-effect
      description: Replaces a live order with a new one. Subsequent fills of the original order will abort the replacement.
    PlacedOrderResponse:
      type: object
      properties:
        buying-power-effect:
          description: ''
          type: string
        closing-fee-calculation:
          description: ''
          type: string
        complex-order:
          type: object
          properties:
            id:
              description: ''
              type: string
            account-number:
              description: ''
              type: string
            ratio-price-comparator:
              description: ''
              type: string
            ratio-price-is-threshold-based-on-notional:
              description: ''
              type: boolean
            ratio-price-threshold:
              description: ''
              type: number
              format: double
            terminal-at:
              description: ''
              type: string
            type:
              description: ''
              type: string
            related-orders:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: ''
                    type: string
                  complex-order-id:
                    description: ''
                    type: string
                  complex-order-tag:
                    description: ''
                    type: string
                  replaces-order-id:
                    description: ''
                    type: string
                  replacing-order-id:
                    description: ''
                    type: string
                  status:
                    description: ''
                    type: string
                description: Non-current orders. This includes replaced orders, unfilled orders, and terminal orders.
            orders:
              type: array
              items:
                type: object
                properties:
                  id:
                    description: ''
                    type: string
                  account-number:
                    description: ''
                    type: string
                  cancel-user-id:
                    description: ''
                    type: string
                  cancel-username:
                    description: ''
                    type: string
                  cancellable:
                    description: ''
                    type: boolean
                  cancelled-at:
                    description: ''
                    type: string
                    format: date-time
                  cancelled-size:
                    description: ''
                    type: number
                    format: double
                  complex-order-id:
                    description: ''
                    type: string
                  complex-order-tag:
                    description: ''
                    type: string
                  contingent-status:
                    description: ''
                    type: string
                  editable:
                    description: ''
                    type: boolean
                  edited:
                    description: ''
                    type: boolean
                  external-identifier:
                    description: ''
                    type: string
                  global-request-id:
                    description: ''
                    type: string
                  gtc-date:
                    description: ''
                    type: string
                    format: date
                  in-flight-at:
                    description: ''
                    type: string
                    format: date-time
                  leg-count:
                    description: ''
                    type: string
                  live-at:
                    description: ''
                    type: string
                    format: date-time
                  order-type:
                    description: ''
                    type: string
                  preflight-id:
                    description: ''
                    type: string
                  price:
                    description: ''
                    type: number
                    format: double
                  price-effect:
                    description: ''
                    type: string
                  received-at:
                    description: ''
                    type: string
                    format: date-time
                  reject-reason:
                    description: ''
                    type: string
                  replaces-order-id:
                    description: ''
                    type: string
                  replacing-order-id:
                    description: ''
                    type: string
                  size:
                    description: ''
                    type: string
                  source:
                    description: ''
                    type: string
                  status:
                    description: ''
                    type: string
                  stop-trigger:
                    description: ''
                    type: string
                  terminal-at:
                    description: ''
                    type: string
                    format: date-time
                  time-in-force:
                    description: ''
                    type: string
                  underlying-instrument-type:
                    description: ''
                    type: string
                  underlying-symbol:
                    description: ''
                    type: string
                  updated-at:
                    description: ''
                    type: string
                  user-id:
                    description: ''
                    type: string
                  username:
                    description: ''
                    type: string
                  value:
                    description: ''
                    type: number
                    format: double
                  value-effect:
                    description: ''
                    type: string
                  legs:
                    type: array
                    items:
                      type: object
                      properties:
                        action:
                          description: ''
                          type: string
                        instrument-type:
                          description: ''
                          type: string
                        quantity:
                          description: ''
                          type: string
                        remaining-qu

# --- truncated at 32 KB (87 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/tastytrade/refs/heads/main/openapi/tastytrade-orders-api-openapi.yml