# tastytrade

> Read brokerage accounts, positions, orders and market data with tastytrade.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/tastytrade

## Actions

### Get a brokerage account

Read details of an account, including its type and status.

**Inputs**

- Customer Id (`customer_id`, text, required): Use me for the signed-in customer, or enter a customer ID.
- Account Number (`account_number`, text, required): The account number of the account.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "account-number": "example",
      "account-type-name": "example",
      "closed-at": "example",
      "created-at": "example",
      "day-trader-status": "example",
      "ext-account-id": "example",
      "ext-crm-id": "example",
      "external-accounts": "example",
      "external-fdid": "example",
      "external-id": "example",
      "funding-date": "example",
      "futures-account-purpose": "example",
      "investment-objective": "example",
      "investment-time-horizon": "example",
      "is-closed": true,
      "is-firm-error": true,
      "is-firm-proprietary": true,
      "is-foreign": "example",
      "is-futures-approved": true,
      "liquidity-needs": "example",
      "margin-or-cash": "example",
      "nickname": "example",
      "opened-at": "example",
      "regulatory-domain": "example",
      "risk-tolerance": "example",
      "submitting-user-id": "example",
      "suitable-options-level": "example"
    }
  }
}
```

### Get a transaction

Read the details and fees of a brokerage transaction.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Id (`id`, number, required): The id.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "account-number": "example",
      "action": "example",
      "agency-price": "example",
      "clearing-fees": "example",
      "clearing-fees-effect": "example",
      "commission": "example",
      "commission-effect": "example",
      "cost-basis-reconciliation-date": "example",
      "created-at": "example",
      "currency": "example",
      "currency-conversion-fees": "example",
      "currency-conversion-fees-effect": "example",
      "description": "example",
      "destination-venue": "example",
      "exchange": "example",
      "exchange-affiliation-identifier": "example",
      "exec-id": "example",
      "executed-at": "example",
      "ext-exchange-order-number": "example",
      "ext-exec-id": "example",
      "ext-global-order-number": 1,
      "ext-group-fill-id": "example",
      "ext-group-id": "example",
      "id": 1,
      "instrument-type": "example",
      "is-estimated-fee": true,
      "leg-count": 1,
      "lots": {
        "executed-at": "example",
        "id": "example",
        "price": "example",
        "quantity": "example",
        "quantity-direction": "example",
        "transaction-date": "example",
        "transaction-id": 1
      },
      "net-value": "example",
      "net-value-effect": "example",
      "order-id": 1,
      "other-charge": "example",
      "other-charge-description": "example",
      "other-charge-effect": "example",
      "price": "example",
      "principal-price": "example",
      "proprietary-index-option-fees": "example",
      "proprietary-index-option-fees-effect": "example",
      "quantity": "example",
      "regulatory-fees": "example",
      "regulatory-fees-effect": "example",
      "reverses-id": 1,
      "symbol": "example",
      "transaction-date": "example",
      "transaction-sub-type": "example",
      "transaction-type": "example",
      "underlying-symbol": "example",
      "value": "example",
      "value-effect": "example"
    }
  }
}
```

### Get a watchlist

Read the instruments saved in a watchlist.

**Inputs**

- Watchlist Name (`watchlist_name`, text, required): The watchlist name.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "cms-id": "example",
      "group-name": "example",
      "name": "example",
      "order-index": 1,
      "watchlist-entries": {}
    }
  }
}
```

### Get account balances

Read cash, account value and buying power.

**Inputs**

- Currency (`currency`, text): Currency balance to get for account
- Account Number (`account_number`, text, required): The account number.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "account-number": "example",
      "apex-starting-day-margin-equity": "example",
      "available-trading-funds": "example",
      "bond-margin-requirement": "example",
      "buying-power-adjustment": "example",
      "buying-power-adjustment-effect": "example",
      "cash-available-to-withdraw": "example",
      "cash-balance": "example",
      "cash-settle-balance": "example",
      "closed-loop-available-balance": "example",
      "cryptocurrency-margin-requirement": "example",
      "currency": "example",
      "day-equity-call-value": "example",
      "day-trade-excess": "example",
      "day-trading-buying-power": "example",
      "day-trading-call-value": "example",
      "derivative-buying-power": "example",
      "effective-cryptocurrency-buying-power": "example",
      "equity-buying-power": "example",
      "equity-offering-margin-requirement": "example",
      "futures-intraday-margin-requirement": "example",
      "futures-margin-requirement": "example",
      "futures-overnight-margin-requirement": "example",
      "long-bond-value": "example",
      "long-cryptocurrency-value": "example",
      "long-derivative-value": "example",
      "long-equity-value": "example",
      "long-futures-derivative-value": "example",
      "long-futures-value": "example",
      "long-margineable-value": "example",
      "maintenance-call-value": "example",
      "maintenance-excess": "example",
      "maintenance-requirement": "example",
      "margin-equity": "example",
      "margin-settle-balance": "example",
      "net-liquidating-value": "example",
      "pending-cash": "example",
      "pending-cash-effect": "example",
      "pending-margin-interest": "example",
      "reg-t-call-value": "example",
      "reg-t-margin-requirement": "example",
      "short-cryptocurrency-value": "example",
      "short-derivative-value": "example",
      "short-equity-value": "example",
      "short-futures-derivative-value": "example",
      "short-futures-value": "example",
      "short-margineable-value": "example",
      "sma-equity-option-buying-power": "example",
      "snapshot-date": "example",
      "special-memorandum-account-apex-adjustment": "example",
      "special-memorandum-account-value": "example",
      "time-of-day": "example",
      "total-settle-balance": "example",
      "unsettled-cryptocurrency-fiat-amount": "example",
      "unsettled-cryptocurrency-fiat-effect": "example",
      "updated-at": "example",
      "used-derivative-buying-power": "example"
    }
  }
}
```

### Get an equity instrument

Look up a listed equity by ticker symbol.

**Inputs**

- Symbol (`symbol`, text, required): The symbol of the equity, i.e. `AAPL`

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "active": true,
      "borrow-rate": "example",
      "bypass-manual-review": true,
      "country-of-incorporation": "example",
      "country-of-taxation": "example",
      "cusip": "example",
      "description": "example",
      "halted-at": "example",
      "id": 1,
      "instrument-sub-type": "example",
      "instrument-type": "example",
      "is-closing-only": true,
      "is-etf": true,
      "is-fractional-quantity-eligible": true,
      "is-illiquid": true,
      "is-index": true,
      "is-options-closing-only": true,
      "lendability": "example",
      "listed-market": "example",
      "market-time-instrument-collection": "example",
      "option-tick-sizes": [
        {
          "symbol": "example",
          "threshold": "example",
          "value": "example"
        }
      ],
      "overnight-trading-permitted": true,
      "pre-ipo": true,
      "short-description": "example",
      "stops-trading-at": "example",
      "streamer-symbol": "example",
      "symbol": "example",
      "tick-sizes": [
        {
          "symbol": "example",
          "threshold": "example",
          "value": "example"
        }
      ],
      "underlying-product-type": "example"
    }
  }
}
```

### Get an order

Read the status, terms and legs for an order.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Id (`id`, number, required): The id.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "account-number": "example",
      "cancel-user-id": "example",
      "cancel-username": "example",
      "cancellable": true,
      "cancelled-at": "example",
      "cancelled-size": "example",
      "complex-order-id": "example",
      "complex-order-tag": "example",
      "contingent-status": "example",
      "editable": true,
      "edited": true,
      "external-identifier": "example",
      "global-request-id": "example",
      "gtc-date": "example",
      "id": "example",
      "in-flight-at": "example",
      "leg-count": "example",
      "legs": [
        {
          "action": "example",
          "fills": [
            {}
          ],
          "instrument-type": "example",
          "quantity": "example",
          "remaining-quantity": "example",
          "symbol": "example"
        }
      ],
      "live-at": "example",
      "order-rule": {
        "cancel-at": "example",
        "cancelled-at": "example",
        "order-conditions": [
          {
            "action": {},
            "comparator": {},
            "id": {},
            "indicator": {},
            "instrument-type": {},
            "is-threshold-based-on-notional": {},
            "price-components": {},
            "symbol": {},
            "threshold": {},
            "triggered-at": {},
            "triggered-value": {}
          }
        ],
        "route-after": "example",
        "routed-at": "example"
      },
      "order-type": "example",
      "preflight-id": "example",
      "price": "example",
      "price-effect": "example",
      "received-at": "example",
      "reject-reason": "example",
      "replaces-order-id": "example",
      "replacing-order-id": "example",
      "size": "example",
      "source": "example",
      "status": "example",
      "stop-trigger": "example",
      "terminal-at": "example",
      "time-in-force": "example",
      "underlying-instrument-type": "example",
      "underlying-symbol": "example",
      "updated-at": "example",
      "user-id": "example",
      "username": "example",
      "value": "example",
      "value-effect": "example"
    }
  }
}
```

### Get current equity market session

Read the trading session for the current time.

**Inputs**

- Current Time (`current_time`, date and time): The time the current session is based on

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "close-at": "example",
      "close-at-ext": "example",
      "instrument-collection": "example",
      "next-session": {
        "close-at": "example",
        "close-at-ext": "example",
        "instrument-collection": "example",
        "open-at": "example",
        "session-date": "example",
        "start-at": "example"
      },
      "open-at": "example",
      "previous-session": {
        "close-at": "example",
        "close-at-ext": "example",
        "instrument-collection": "example",
        "open-at": "example",
        "session-date": "example",
        "start-at": "example"
      },
      "start-at": "example",
      "state": "example"
    }
  }
}
```

### Get customer profile

Read the brokerage profile associated with the connection.

**Inputs**

- Customer Id (`customer_id`, text, required): Use me for the signed-in customer, or enter a customer ID.
- Allow Missing (`allow_missing`, true/false): Does not raise a 404 if customer is missing

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "address": {
        "city": "example",
        "country": "example",
        "is-domestic": "example",
        "is-foreign": "example",
        "postal-code": "example",
        "state-region": "example",
        "street-one": "example",
        "street-three": "example",
        "street-two": "example"
      },
      "agreed-to-margining": true,
      "agreed-to-terms": true,
      "birth-country": "example",
      "birth-date": "example",
      "cherry-club-date": "example",
      "citizenship-country": "example",
      "created-at": "example",
      "customer-suitability": {
        "annual-net-income": 1,
        "covered-options-trading-experience": "example",
        "customer-id": 1,
        "employer-name": "example",
        "employment-status": "example",
        "futures-trading-experience": "example",
        "id": "example",
        "job-title": "example",
        "liquid-net-worth": 1,
        "marital-status": "example",
        "net-worth": 1,
        "number-of-dependents": 1,
        "occupation": "example",
        "stock-trading-experience": "example",
        "tax-bracket": "example",
        "uncovered-options-trading-experience": "example"
      },
      "desk-customer-id": "example",
      "email": "example",
      "entity": {
        "address": {
          "city": "example",
          "country": "example",
          "is-domestic": "example",
          "is-foreign": "example",
          "postal-code": "example",
          "state-region": "example",
          "street-one": "example",
          "street-three": "example",
          "street-two": "example"
        },
        "business-nature": "example",
        "date-of-trust-creation": "example",
        "email": "example",
        "entity-officers": [
          {
            "address": {},
            "birth-country": {},
            "birth-date": {},
            "citizenship-country": {},
            "email": {},
            "employer-name": {},
            "employment-status": {},
            "external-id": {},
            "first-name": {},
            "home-phone-number": {},
            "id": {},
            "is-foreign": {},
            "job-title": {},
            "last-name": {},
            "marital-status": {},
            "middle-name": {},
            "mobile-phone-number": {},
            "number-of-dependents": {},
            "occupation": {},
            "owner-of-record": {},
            "prefix-name": {},
            "relationship-to-entity": {},
            "suffix-name": {},
            "tax-number": {},
            "tax-number-type": {},
            "usa-citizenship-type": {},
            "visa-expiration-date": {},
            "visa-type": {},
            "work-phone-number": {}
          }
        ],
        "entity-suitability": {
          "annual-net-income": 1,
          "covered-options-trading-experience": "example",
          "entity-id": 1,
          "futures-trading-experience": "example",
          "id": "example",
          "liquid-net-worth": 1,
          "net-worth": 1,
          "stock-trading-experience": "example",
          "tax-bracket": "example",
          "uncovered-options-trading-experience": "example"
        },
        "entity-type": "example",
        "foreign-institution": "example",
        "grantor-birth-date": "example",
        "grantor-email": "example",
        "grantor-first-name": "example",
        "grantor-last-name": "example",
        "grantor-middle-name": "example",
        "grantor-tax-number": "example",
        "has-foreign-bank-affiliation": "example",
        "has-foreign-institution-affiliation": "example",
        "id": "example",
        "is-domestic": "example",
        "is-hedge-fund": "example",
        "legal-name": "example",
        "mailing-address": {
          "city": "example",
          "country": "example",
          "is-domestic": "example",
          "is-foreign": "example",
          "postal-code": "example",
          "state-region": "example",
          "street-one": "example",
          "street-three": "example",
          "street-two": "example"
        },
        "phone-number": "example",
        "secretary-name": "example",
        "tax-election": "example",
        "tax-number": "example"
      },
      "ext-crm-id": "example",
      "external-id": "example",
      "family-member-names": "example",
      "first-name": "example",
      "first-surname": "example",
      "foreign-tax-number": "example",
      "gender": "example",
      "has-delayed-quotes": true,
      "has-industry-affiliation": true,
      "has-institutional-assets": "example",
      "has-listed-affiliation": true,
      "has-pending-or-approved-application": "example",
      "has-political-affiliation": true,
      "home-phone-number": "example",
      "home-phone-number-details": "example",
      "id": "example",
      "identifiable-type": "example",
      "industry-affiliation-firm": "example",
      "is-foreign": "example",
      "is-investment-adviser": "example",
      "is-professional": true,
      "last-name": "example",
      "listed-affiliation-symbol": "example",
      "mailing-address": {
        "city": "example",
        "country": "example",
        "is-domestic": "example",
        "is-foreign": "example",
        "postal-code": "example",
        "state-region": "example",
        "street-one": "example",
        "street-three": "example",
        "street-two": "example"
      },
      "middle-name": "example",
      "mobile-phone-number": "example",
      "mobile-phone-number-details": "example",
      "permitted-account-types": "example",
      "person": {
        "birth-country": "example",
        "birth-date": "example",
        "citizenship-country": "example",
        "employer-name": "example",
        "employment-status": "example",
        "external-id": "example",
        "first-name": "example",
        "job-title": "example",
        "last-name": "example",
        "marital-status": "example",
        "middle-name": "example",
        "number-of-dependents": "example",
        "occupation": "example",
        "prefix-name": "example",
        "suffix-name": "example",
        "usa-citizenship-type": "example",
        "visa-expiration-date": "example",
        "visa-type": "example"
      },
      "political-organization": "example",
      "prefix-name": "example",
      "regulatory-domain": "example",
      "second-surname": "example",
      "signature-of-agreement": true,
      "subject-to-tax-withholding": true,
      "suffix-name": "example",
      "tax-number": "example",
      "tax-number-type": "example",
      "usa-citizenship-type": "example",
      "user-id": "example",
      "visa-expiration-date": "example",
      "visa-type": "example",
      "work-phone-number": "example",
      "work-phone-number-details": "example"
    }
  }
}
```

### Get daily fees

Read the total fees for an account on a selected date.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Date (`date`, date): The date to get fees for, defaults to today

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "total-fees": "example",
      "total-fees-effect": "example"
    }
  }
}
```

### Get market metrics

Read market metrics for the selected symbols.

**Inputs**

- Symbols (`symbols`, list, required): Comma separated list of symbols i.e. ?symbols=AAPL,FB,BRK%2FB

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "annual-dividend-per-share": "example",
          "beta": "example",
          "beta-updated-at": "example",
          "borrow-rate": "example",
          "corr-spy-3month": "example",
          "created-at": "example",
          "dividend-ex-date": "example",
          "dividend-next-date": "example",
          "dividend-pay-date": "example",
          "dividend-rate-per-share": "example",
          "dividend-updated-at": "example",
          "dividend-yield": "example",
          "earnings": {
            "actual-eps": {},
            "consensus-estimate": {},
            "estimated": {},
            "expected-report-date": {},
            "late-flag": {},
            "quarter-end-date": {},
            "time-of-day": {},
            "updated-at": {},
            "visible": {}
          },
          "earnings-per-share": "example",
          "historical-volatility-30-day": "example",
          "historical-volatility-60-day": "example",
          "historical-volatility-90-day": "example",
          "implied-volatility-30-day": "example",
          "implied-volatility-index": "example",
          "implied-volatility-index-15-day": "example",
          "implied-volatility-index-5-day-change": "example",
          "implied-volatility-index-rank": "example",
          "implied-volatility-index-rank-source": "example",
          "implied-volatility-percentile": "example",
          "implied-volatility-updated-at": "example",
          "industry": "example",
          "iv-hv-30-day-difference": "example",
          "lendability": "example",
          "liquidity-rank": "example",
          "liquidity-rating": 1,
          "liquidity-running-state": {
            "count": {},
            "started-at": {},
            "sum": {},
            "updated-at": {}
          },
          "liquidity-value": "example",
          "listed-market": "example",
          "market-cap": 1,
          "option-expiration-implied-volatilities": [
            {}
          ],
          "price-earnings-ratio": "example",
          "sector": "example",
          "symbol": "example",
          "tos-implied-volatility-index-rank": "example",
          "tos-implied-volatility-index-rank-updated-at": "example",
          "tw-implied-volatility-index-rank": "example",
          "updated-at": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List account transactions

Read a brokerage account’s transaction history.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Page Offset (`page_offset`, number): The page offset.
- Per Page (`per_page`, number): The per page. From 1 to 2000.
- Currency (`currency`, text): Currency
- Sort (`sort`, text): The order to sort results in. Defaults to Desc, Accepts `Desc` or `Asc`. One of: `Desc`, `Asc`.
- Sub Type (`sub_type`, list): Filter based on transaction_sub_type (example: sub-type[]={value1}&sub-type[]={value2})
- Type (`type`, text): Filter based on transaction_type
- Types (`types`, list): Allows filtering on multiple transaction_types (example: types[]={value1}&types[]={value2})
- Trade Action (`trade_action`, text): The action of the transaction. i.e. `Allocate`, `Buy`, `Buy to Close`, `Buy to Open`, `Sell`, `Sell to Close` or `Sell to Open`
- End Date (`end_date`, date): The end date of transactions to query. Defaults to now.
- Futures Symbol (`futures_symbol`, text): The full TW Future Symbol `/ESZ9` or \ `/NGZ19` if two year digit are appropriate
- Instrument Type (`instrument_type`, text): The type of Instrument. i.e. `Bond`, `Cryptocurrency`, `Currency Pair`, `Equity`, `Equity Offering`, `Equity Option`, `Event Contract`, `Fixed Income Security`, `Future`, `Future.
- Partition Key (`partition_key`, text): Account partition key
- Start Date (`start_date`, date): The start date of transactions to query.
- Symbol (`symbol`, text): The Stock Ticker Symbol `AAPL`, OCC Option Symbol `AAPL 191004P00275000`, \ TW Future Symbol `/ESZ9`, or TW Future Option Symbol `./ESZ9 EW4U9 190927P2975`
- Underlying Symbol (`underlying_symbol`, text): The Underlying Symbol. The Ticker Symbol `FB` or \ TW Future Symbol with out date component `/M6E` or the full TW Future Symbol `/ESU9`
- End At (`end_at`, date and time): DateTime end range for filtering transactions in full date-time
- Start At (`start_at`, date and time): DateTime start range for filtering transactions in full date-time

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "account-number": "example",
          "action": "example",
          "agency-price": "example",
          "clearing-fees": "example",
          "clearing-fees-effect": "example",
          "commission": "example",
          "commission-effect": "example",
          "cost-basis-reconciliation-date": "example",
          "created-at": "example",
          "currency": "example",
          "currency-conversion-fees": "example",
          "currency-conversion-fees-effect": "example",
          "description": "example",
          "destination-venue": "example",
          "exchange": "example",
          "exchange-affiliation-identifier": "example",
          "exec-id": "example",
          "executed-at": "example",
          "ext-exchange-order-number": "example",
          "ext-exec-id": "example",
          "ext-global-order-number": 1,
          "ext-group-fill-id": "example",
          "ext-group-id": "example",
          "id": 1,
          "instrument-type": "example",
          "is-estimated-fee": true,
          "leg-count": 1,
          "lots": {
            "executed-at": {},
            "id": {},
            "price": {},
            "quantity": {},
            "quantity-direction": {},
            "transaction-date": {},
            "transaction-id": {}
          },
          "net-value": "example",
          "net-value-effect": "example",
          "order-id": 1,
          "other-charge": "example",
          "other-charge-description": "example",
          "other-charge-effect": "example",
          "price": "example",
          "principal-price": "example",
          "proprietary-index-option-fees": "example",
          "proprietary-index-option-fees-effect": "example",
          "quantity": "example",
          "regulatory-fees": "example",
          "regulatory-fees-effect": "example",
          "reverses-id": 1,
          "symbol": "example",
          "transaction-date": "example",
          "transaction-sub-type": "example",
          "transaction-type": "example",
          "underlying-symbol": "example",
          "value": "example",
          "value-effect": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List brokerage accounts

Read the brokerage accounts for the signed-in customer.

**Inputs**

- Customer Id (`customer_id`, text, required): Use me for the signed-in customer, or enter a customer ID.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "account": {
            "account-number": {},
            "account-type-name": {},
            "closed-at": {},
            "created-at": {},
            "day-trader-status": {},
            "ext-account-id": {},
            "ext-crm-id": {},
            "external-accounts": {},
            "external-fdid": {},
            "external-id": {},
            "funding-date": {},
            "futures-account-purpose": {},
            "investment-objective": {},
            "investment-time-horizon": {},
            "is-closed": {},
            "is-firm-error": {},
            "is-firm-proprietary": {},
            "is-foreign": {},
            "is-futures-approved": {},
            "liquidity-needs": {},
            "margin-or-cash": {},
            "nickname": {},
            "opened-at": {},
            "regulatory-domain": {},
            "risk-tolerance": {},
            "submitting-user-id": {},
            "suitable-options-level": {}
          },
          "authority-level": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List equity market holidays

Read the published equity market holiday calendar.

**Inputs**: None.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "market-half-days": {},
          "market-holidays": {}
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List historical dividends

Read dividend history for a symbol.

**Inputs**

- Symbol (`symbol`, text, required): Symbol to get dividends data for

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "amount": "example",
          "occurred-date": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List option chains

Read the expirations and strikes for an equity’s options.

**Inputs**

- Symbol (`symbol`, text, required): The symbol.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "deliverables": [
            {}
          ],
          "expirations": [
            {}
          ],
          "option-chain-type": "example",
          "root-symbol": "example",
          "shares-per-contract": 1,
          "tick-sizes": [
            {}
          ],
          "underlying-symbol": "example"
        }
      ]
    }
  }
}
```

### List positions

Read current or closed positions for a brokerage account.

**Inputs**

- Underlying Symbol (`underlying_symbol`, list): An array of Underlying symbol(s) for positions (example: underlying-symbol[]={value1}&underlying-symbol[]={value2})
- Symbol (`symbol`, text): A single symbol. Stock Ticker Symbol `AAPL`, \ OCC Option Symbol `AAPL 191004P00275000`, \ TW Future Symbol `/ESZ9`, or \ TW Future Option Symbol `./ESZ9 EW4U9 190927P2975`
- Instrument Type (`instrument_type`, text): The type of Instrument. One of: `Bond`, `Cryptocurrency`, `Currency Pair`, `Equity`, `Equity Offering`, `Equity Option`, `Future`, `Future Option`, `Index`, `Unknown`, `Warrant`.
- Include Closed Positions (`include_closed_positions`, true/false): If closed positions should be included in the query
- Underlying Product Code (`underlying_product_code`, text): The underlying Future's Product code. i.e `ES`
- Partition Keys (`partition_keys`, list): Account partition keys (example: partition-keys[]={value1}&partition-keys[]={value2})
- Net Positions (`net_positions`, true/false): Returns net positions grouped by instrument type and symbol
- Include Marks (`include_marks`, true/false): Include current quote mark (note: can decrease performance)
- Account Number (`account_number`, text, required): The account number.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "account-number": "example",
          "average-daily-market-close-price": "example",
          "average-open-price": "example",
          "average-yearly-market-close-price": "example",
          "close-price": "example",
          "cost-effect": "example",
          "created-at": "example",
          "deliverable-type": "example",
          "expires-at": "example",
          "fixing-price": "example",
          "instrument-type": "example",
          "is-frozen": true,
          "is-suppressed": true,
          "mark": "example",
          "mark-price": "example",
          "multiplier": 1,
          "order-id": 1,
          "quantity": "example",
          "quantity-direction": "example",
          "realized-day-gain": "example",
          "realized-day-gain-date": "example",
          "realized-day-gain-effect": "example",
          "realized-today": "example",
          "realized-today-date": "example",
          "realized-today-effect": "example",
          "restricted-quantity": "example",
          "symbol": "example",
          "underlying-symbol": "example",
          "updated-at": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List public watchlists

Find public watchlists offered by tastytrade.

**Inputs**

- Counts Only (`counts_only`, true/false): The counts only.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "cms-id": "example",
          "group-name": "example",
          "name": "example",
          "order-index": 1,
          "watchlist-entries": {}
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List today’s orders

Read a brokerage account’s orders for today.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Page Offset (`page_offset`, number): The page offset.
- Per Page (`per_page`, number): The per page. From 1 to 200.
- Status (`status`, list): (example: status[]={value1}&status[]={value2}). One or more of: `Cancelled`, `Cancel Requested`, `Contingent`, `Expired`, `Filled`, `In Flight`, `Live`, `Partially Removed`, `Received`, `Rejected`, and 3 more.
- Underlying Symbol (`underlying_symbol`, text): The underlying symbol.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "account-number": "example",
          "cancel-user-id": "example",
          "cancel-username": "example",
          "cancellable": true,
          "cancelled-at": "example",
          "cancelled-size": "example",
          "complex-order-id": "example",
          "complex-order-tag": "example",
          "contingent-status": "example",
          "editable": true,
          "edited": true,
          "external-identifier": "example",
          "global-request-id": "example",
          "gtc-date": "example",
          "id": "example",
          "in-flight-at": "example",
          "leg-count": "example",
          "legs": [
            {}
          ],
          "live-at": "example",
          "order-rule": {
            "cancel-at": {},
            "cancelled-at": {},
            "order-conditions": {},
            "route-after": {},
            "routed-at": {}
          },
          "order-type": "example",
          "preflight-id": "example",
          "price": "example",
          "price-effect": "example",
          "received-at": "example",
          "reject-reason": "example",
          "replaces-order-id": "example",
          "replacing-order-id": "example",
          "size": "example",
          "source": "example",
          "status": "example",
          "stop-trigger": "example",
          "terminal-at": "example",
          "time-in-force": "example",
          "underlying-instrument-type": "example",
          "underlying-symbol": "example",
          "updated-at": "example",
          "user-id": "example",
          "username": "example",
          "value": "example",
          "value-effect": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### List watchlists

Read the customer’s saved market watchlists.

**Inputs**: None.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "cms-id": "example",
          "group-name": "example",
          "name": "example",
          "order-index": 1,
          "watchlist-entries": {}
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```

### Search orders

Find brokerage orders in a selected time or date range.

**Inputs**

- Account Number (`account_number`, text, required): The account number.
- Page Offset (`page_offset`, number): The page offset.
- Per Page (`per_page`, number): The per page. From 1 to 200.
- End At (`end_at`, date and time): DateTime end range for filtering orders in full date-time
- End Date (`end_date`, date): The end date.
- Futures Symbol (`futures_symbol`, text): Used to fetch both futures and futures options orders
- Sort (`sort`, text): The order to sort results in. Accepts `Desc` or `Asc`. Defaults to `Desc`. One of: `Desc`, `Asc`.
- Start At (`start_at`, date and time): DateTime start of the range for filtering orders, in full date-time format. At least one of `start-date` or `start-at` is required.
- Start Date (`start_date`, date): Start date for filtering orders. At least one of `start-date` or `start-at` is required.
- Status (`status`, list): (example: status[]={value1}&status[]={value2})
- Underlying Instrument Type (`underlying_instrument_type`, text): Underlying instrument type
- Underlying Symbol (`underlying_symbol`, text): The underlying symbol.
- Without Count (`without_count`, true/false): Skip calculating the total item count. When true, `total-items` and `total-pages` are null.

**Outputs**

- `data` (object): The response from tastytrade.

**Example output**

```json
{
  "data": {
    "context": "example",
    "data": {
      "items": [
        {
          "account-number": "example",
          "cancel-user-id": "example",
          "cancel-username": "example",
          "cancellable": true,
          "cancelled-at": "example",
          "cancelled-size": "example",
          "complex-order-id": "example",
          "complex-order-tag": "example",
          "contingent-status": "example",
          "editable": true,
          "edited": true,
          "external-identifier": "example",
          "global-request-id": "example",
          "gtc-date": "example",
          "id": "example",
          "in-flight-at": "example",
          "leg-count": "example",
          "legs": [
            {}
          ],
          "live-at": "example",
          "order-rule": {
            "cancel-at": {},
            "cancelled-at": {},
            "order-conditions": {},
            "route-after": {},
            "routed-at": {}
          },
          "order-type": "example",
          "preflight-id": "example",
          "price": "example",
          "price-effect": "example",
          "received-at": "example",
          "reject-reason": "example",
          "replaces-order-id": "example",
          "replacing-order-id": "example",
          "size": "example",
          "source": "example",
          "status": "example",
          "stop-trigger": "example",
          "terminal-at": "example",
          "time-in-force": "example",
          "underlying-instrument-type": "example",
          "underlying-symbol": "example",
          "updated-at": "example",
          "user-id": "example",
          "username": "example",
          "value": "example",
          "value-effect": "example"
        }
      ]
    },
    "pagination": {
      "current-item-count": 1,
      "item-offset": 1,
      "page-offset": 1,
      "per-page": 1,
      "total-items": 1,
      "total-pages": 1
    }
  }
}
```
