swagger: '2.0'
info:
  description: This is replication of the TD Ameritrade API.
  title: TD Ameritrade API - OAuth2
  version: 0.1.4
host: api.tdameritrade.com
basePath: /v1
schemes:
  - https
paths:
  /accounts:
    get:
      produces:
        - application/json
      parameters:
        - description: >-
            Balances displayed by default, additional fields can be added here
            by adding positions or orders. Example: fields=positions,orders
          in: query
          name: fields
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Account'
        '207':
          description: >-
            Indicates there was a problem getting account data for one or more
            linked accounts, but the accounts who's data returned successfully
            is in the response. Do not aggregate balances and positions for this
            case.
          schema:
            $ref: '#/definitions/Account'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Accounts
      description: 'Account balances, positions, and orders for all linked accounts.'
      operationId: accountsGET
      summary: Get Accounts
      x-swagger-router-controller: Accounts
  /accounts/watchlists:
    get:
      produces:
        - application/json
      parameters: []
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/WatchListResponse'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: All watchlists for all of the user's linked accounts.
      operationId: accountsWatchlistsGET
      summary: Get Watchlists for Multiple Accounts
      x-swagger-router-controller: Watchlist
  '/accounts/{accountId}':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - description: >-
            Balances displayed by default, additional fields can be added here
            by adding positions or orders. Example: fields=positions,orders
          in: query
          name: fields
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Account'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Accounts
      description: 'Account balances, positions, and orders for a specific account.'
      operationId: accountsAccountIdGET
      summary: Get Account
      x-swagger-router-controller: Accounts
  '/accounts/{accountId}/orders':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: query
          name: maxResults
          required: false
          type: integer
        - format: date-time
          in: query
          name: fromEnteredTime
          required: false
          type: string
        - format: date-time
          in: query
          name: toEnteredTime
          required: false
          type: string
        - enum:
            - AWAITING_PARENT_ORDER
            - AWAITING_CONDITION
            - AWAITING_MANUAL_REVIEW
            - ACCEPTED
            - AWAITING_UR_OUT
            - PENDING_ACTIVATION
            - QUEUED
            - WORKING
            - REJECTED
            - PENDING_CANCEL
            - CANCELED
            - PENDING_REPLACE
            - REPLACED
            - FILLED
            - EXPIRED
          in: query
          name: status
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: Orders for a specific account.
      operationId: accountsAccountIdOrdersGET
      summary: Get Orders by Path
      x-swagger-router-controller: Orders
  '/accounts/{accountId}/orders/{orderId}':
    delete:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: orderId
          required: true
          type: integer
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/ErrorObject'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: An error message if the order was not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: Cancel a specific order for a spcific account
      operationId: accountsAccountIdOrdersOrderIdDELETE
      summary: Cancel Order
      x-swagger-router-controller: Orders
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: orderId
          required: true
          type: integer
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: Get a specific order for a specific account.
      operationId: accountsAccountIdOrdersOrderIdGET
      summary: Get Order
      x-swagger-router-controller: Orders
    put:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: orderId
          required: true
          type: integer
        - in: body
          name: body
          schema:
            $ref: '#/definitions/OrderGet'
      responses:
        '200':
          description: OK
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: An error message if the order was not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: >-
        Replace an existing order for an account. The existing order will be
        replaced by the new order. Once replaced, the old order will be canceled
        and a new order will be created. See our Place Order Samples Guide -
        https://developer.tdameritrade.com/content/place-order-samples.
      operationId: accountsAccountIdOrdersOrderIdPUT
      summary: Replace Order
      x-swagger-router-controller: Orders
  '/accounts/{accountId}/preferences':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Preferences'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - User Info & Preferences
      description: Preferences for a specific account.
      operationId: accountsAccountIdPreferencesGET
      summary: Get Preferences
      x-swagger-router-controller: UserInfoPreferences
    put:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: body
          name: body
          schema:
            $ref: '#/definitions/Preferences'
      responses:
        '200':
          description: OK
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this resource.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - User Info & Preferences
      description: >-
        Update preferences for a specific account. Please note that the
        directOptionsRouting and directEquityRouting values cannot be modified
        via this operation.
      operationId: accountsAccountIdPreferencesPUT
      summary: Update Preferences
      x-swagger-router-controller: UserInfoPreferences
  '/accounts/{accountId}/savedorders':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Saved Orders
      description: Saved orders for a specific account.
      operationId: accountsAccountIdSavedordersGET
      summary: Get Saved Orders by Path
      x-swagger-router-controller: SavedOrders
    post:
      consumes:
        - application/Json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: body
          name: body
          schema:
            $ref: '#/definitions/OrderGet'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/EASObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Saved Orders
      description: >-
        Save an order for a specific account. See our Place Order Samples Guide
        - https://developer.tdameritrade.com/content/place-order-samples.
      operationId: accountsAccountIdSavedordersPOST
      summary: Create Saved Orders
      x-swagger-router-controller: SavedOrders
  '/accounts/{accountId}/savedorders/{savedOrderId}':
    delete:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: savedOrderId
          required: true
          type: integer
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/EASObject'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: An error message if the order was not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Saved Orders
      description: Delete a specific saved order for a specific account.
      operationId: accountsAccountIdSavedordersSavedOrderIdDELETE
      summary: Delete Saved Orders
      x-swagger-router-controller: SavedOrders
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: savedOrderId
          required: true
          type: integer
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Saved Orders
      description: 'Specific saved order by its ID, for a specific account.'
      operationId: accountsAccountIdSavedordersSavedOrderIdGET
      summary: Get Saved Orders
      x-swagger-router-controller: SavedOrders
    put:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: path
          name: savedOrderId
          required: true
          type: integer
        - in: body
          name: body
          schema:
            $ref: '#/definitions/OrderGet'
      responses:
        '200':
          description: OK
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: An error message if the order was not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Saved Orders
      description: >-
        Replace an existing saved order for an account. The existing saved order
        will be replaced by the new order. see our Place Order Samples Guide -
        Click here.
      operationId: accountsAccountIdSavedordersSavedOrderIdPUT
      summary: Replace Saved Orders
      x-swagger-router-controller: SavedOrders
  '/accounts/{accountId}/transactions':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - description: Only transactions with the specified type will be returned.
          enum:
            - ALL
            - TRADE
            - BUY_ONLY
            - SELL_ONLY
            - CASH_IN_OR_CASH_OUT
            - CHECKING
            - DIVEDEND
            - INTEREST
            - OTHER
            - ADVISOR_FEES
          in: query
          name: type
          required: false
          type: string
        - description: Only transactions with the specified symbol will be returned.
          in: query
          name: symbol
          required: false
          type: string
        - description: >-
            Only transactions after the Start Date will be returned. Note: The
            maximum date range is one year. Valid ISO-8601 formats are :
            yyyy-MM-dd.
          in: query
          name: startDate
          required: false
          type: string
        - description: >-
            Only transactions after the end Date will be returned. Note: The
            maximum date range is one year. Valid ISO-8601 formats are :
            yyyy-MM-dd.
          in: query
          name: endDate
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Transaction'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller doesn't have access to the
            account in the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the specified transaction could not be
            found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Transactions
      description: Transaction for a specific account.
      operationId: accountsAccountIdTransactionsGET
      summary: Get Transactions
      x-swagger-router-controller: Transactions
  '/accounts/{accountId}/transactions/{transactionId}':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: path
          name: transactionId
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Transaction'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller doesn't have access to the
            account in the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the specified transaction could not be
            found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Transactions
      description: Transaction for a specific account.
      operationId: accountsAccountIdTransactionsTransactionIdGET
      summary: Get Transaction
      x-swagger-router-controller: Transactions
  '/accounts/{accountId}/watchlists':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/WatchListResponse'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: all watchlist for an account.
      operationId: accountsAccountIdWatchlistsGET
      summary: Get Watchlists for Single Account
      x-swagger-router-controller: Watchlist
    post:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: body
          name: body
          schema:
            $ref: '#/definitions/WatchListRequest'
      responses:
        '200':
          description: OK
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: >-
        Create watchlist for specific account.This method does not verify that
        the symbol or asset type are valid.
      operationId: accountsAccountIdWatchlistsPOST
      summary: Create Watchlist
      x-swagger-router-controller: Watchlist
  '/accounts/{accountId}/watchlists/{watchlistId}':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: path
          name: watchlistId
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/WatchListResponse'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the account or the watchlist ID does not
            exist.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: Specific watchlist for a specific account.
      operationId: accountsAccountIdWatchlistsWatchlistIdGET
      summary: Get Watchlists
      x-swagger-router-controller: Watchlist
    patch:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: path
          name: watchlistId
          required: true
          type: string
        - in: body
          name: body
          schema:
            $ref: '#/definitions/WatchListRequest'
      responses:
        '200':
          description: OK
        '204':
          description: Watchlist updated.
          schema:
            $ref: '#/definitions/ErrorObject'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: >-
        Partially update watchlist for a specific account: change watchlist
        name, add to the beginning/end of a watchlist, update or delete items in
        a watchlist. This method does not verify that the symbol or asset type
        are valid.
      operationId: accountsAccountIdWatchlistsWatchlistIdPATCH
      summary: Update Watchlist
      x-swagger-router-controller: Watchlist
    put:
      consumes:
        - application/json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: string
        - in: path
          name: watchlistId
          required: true
          type: string
        - in: body
          name: body
          schema:
            $ref: '#/definitions/WatchListRequest'
      responses:
        '200':
          description: OK
        '204':
          description: Watchlist updated.
          schema:
            $ref: '#/definitions/ErrorObject'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Watchlist
      description: Replace watchlist for a specific account.
      operationId: accountsAccountIdWatchlistsWatchlistIdPUT
      summary: Replace Watchlist
      x-swagger-router-controller: Watchlist
  /instruments:
    get:
      produces:
        - application/json
      parameters:
        - description: >-
            Pass your OAuth User ID to make an unauthenticated request for
            delayed data.
          in: query
          name: apikey
          required: false
          type: string
        - description: >-
            Value to pass to the search. See projection description for more
            information.
          in: query
          name: symbol
          required: true
          type: string
        - description: >-
            The type of request: symbol-search: Retrieve instrument data of a
            specific symbol or cusip symbol-regex: Retrieve instrument data for
            all symbols matching regex. Example: symbol=XYZ.* will return all
            symbols beginning with XYZ desc-search: Retrieve instrument data for
            instruments whose description contains the word supplied. Example:
            symbol=FakeCompany will return all instruments with FakeCompany in
            the description. desc-regex: Search description with full regex
            support. Example: symbol=XYZ.[A-C] returns all instruments whose
            descriptions contain a word beginning with XYZ followed by a
            character A through C. fundamental: Returns fundamental data for a
            single instrument specified by exact symbol.
          in: query
          name: projection
          required: true
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SearchInstrumentResponse'
        '400':
          description: >-
            An error message indicating the caller must pass a non null value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the instrument for the symbol/cusip was
            not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '406':
          description: >-
            An error message indicating an issue in the symbol regex, or number
            of symbols searched is over the maximum.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Instruments
      description: 'Search or retrieve instrument data, including fundamental data'
      operationId: instrumentsGET
      summary: Search Instruments
      x-swagger-router-controller: Instruments
  '/instruments/{cusip}':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: cusip
          required: true
          type: string
        - description: >-
            Pass your OAuth User ID to make an unauthenticated request for
            delayed data.
          in: query
          name: apikey
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SearchInstrumentResponse'
        '400':
          description: >-
            An error message indicating the caller must pass a non null value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the instrument for the symbol/cusip was
            not found.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Instruments
      description: Get an instrument by CUSIP
      operationId: instrumentsCusipGET
      summary: Get Instrument
      x-swagger-router-controller: Instruments
  /marketdata/chains:
    get:
      produces:
        - application/json
      parameters:
        - description: >-
            Pass your OAuth User ID to make an unauthenticated request for
            delayed data.
          in: query
          name: apikey
          required: false
          type: string
        - description: Enter one symbol
          in: query
          name: symbol
          required: false
          type: string
        - default: ALL
          description: >-
            Type of contracts to return in the chain. Can be CALL, PUT, or ALL.
            Default is ALL.
          enum:
            - CALL
            - PUT
            - ALL
          in: query
          name: contractType
          required: false
          type: string
        - description: >-
            The number of strikes to return above and below the at-the-money
            price.
          in: query
          name: strikeCount
          required: false
          type: integer
        - default: false
          description: >-
            Include quotes for options in the option chain. Can be TRUE or
            FALSE. Default is FALSE.
          in: query
          name: includeQuotes
          required: false
          type: boolean
        - description: >-
            Passing a value returns a Strategy Chain. Possible values are
            SINGLE, ANALYTICAL (allows use of the volatility, underlyingPrice,
            interestRate, and daysToExpiration params to calculate theoretical
            values), COVERED, VERTICAL, CALENDAR, STRANGLE, STRADDLE, BUTTERFLY,
            CONDOR, DIAGONAL, COLLAR, or ROLL. Default is SINGLE.
          enum:
            - SINGLE
            - ANALYTICAL
            - COVERED
            - VERTICAL
            - CALENDAR
            - STRANGLE
            - STRADDLE
            - BUTTERFLY
            - CONDOR
            - DIAGONAL
            - COLLAR
            - ROLL
          in: query
          name: strategy
          required: false
          type: string
        - description: Strike interval for spread strategy chains (see strategy param).
          in: query
          name: interval
          required: false
          type: integer
        - description: Provide a strike price to return options only at that strike price.
          in: query
          name: strike
          required: false
          type: number
        - description: >-
            Returns options for the given range. Possible values are: ITM:
            In-the-money NTM: Near-the-money OTM: Out-of-the-money SAK: Strikes
            Above Market SBK: Strikes Below Market SNK: Strikes Near Market ALL:
            All Strikes Default is ALL.
          enum:
            - ITM
            - NTM
            - OTM
            - SAK
            - SBK
            - SNK
            - ALL
          in: query
          name: range
          required: false
          type: string
        - description: >-
            Only return expirations after this date. For strategies, expiration
            refers to the nearest term expiration in the strategy. Valid
            ISO-8601 formats are: yyyy-MM-dd and yyyy-MM-ddTHH:mm:ssz.
          format: date-time
          in: query
          name: fromDate
          required: false
          type: string
        - description: >-
            Only return expirations before this date. For strategies, expiration
            refers to the nearest term expiration in the strategy. Valid
            ISO-8601 formats are: yyyy-MM-dd and yyyy-MM-ddTHH:mm:ssz.
          format: date-time
          in: query
          name: toDate
          required: false
          type: string
        - description: >-
            Volatility to use in calculations. Applies only to ANALYTICAL
            strategy chains (see strategy param).
          in: query
          name: volatility
          required: false
          type: number
        - description: >-
            Underlying price to use in calculations. Applies only to ANALYTICAL
            strategy chains (see strategy param).
          in: query
          name: underlyingPrice
          required: false
          type: number
        - description: >-
            Interest rate to use in calculations. Applies only to ANALYTICAL
            strategy chains (see strategy param).
          in: query
          name: interestRate
          required: false
          type: number
        - description: >-
            Days to expiration to use in calculations. Applies only to
            ANALYTICAL strategy chains (see strategy param)
          in: query
          name: daysToExpiration
          required: false
          type: integer
        - default: ALL
          description: >-
            Return only options expiring in the specified month. Month is given
            in the three character format. Example: JAN Default is ALL.
          in: query
          name: expMonth
          required: false
          type: string
        - default: ALL
          description: >-
            Type of contracts to return. Possible values are: S: Standard
            contract NS: Non-standard contract ALL: All contracts Default is
            ALL.
          in: query
          name: optionType
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GetOptionChainResponse'
        '400':
          description: >-
            An error message indicating the caller must pass a non null value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the optionchain for the symbol was not
            found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating internal error in the service.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Option Chains
      description: Get option chain for an optionable Symbol
      operationId: marketdataChainsGET
      summary: Get Option Chain
      x-swagger-router-controller: OptionChains
  /marketdata/hours:
    get:
      produces:
        - application/json
      parameters:
        - in: query
          name: apiKey
          required: false
          type: string
        - enum:
            - EQUITY
            - OPTION
            - FUTURE
            - BOND
            - FOREX
          in: query
          name: markets
          required: false
          type: string
        - format: date-time
          in: query
          name: date
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Hours'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Market Hours
      operationId: marketdataHoursGET
      summary: Get Hours for Multiple Markets
      x-swagger-router-controller: MarketHours
  /marketdata/quotes:
    get:
      produces:
        - application/json
      parameters:
        - in: query
          name: apikey
          required: false
          type: string
        - in: query
          name: symbol
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GetQuoteResponse'
        '400':
          description: >-
            An error message indicating the caller must pass a non null value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the instrument for the symbol/cusip was
            not found.
          schema:
            $ref: '#/definitions/ErrorObject'
        '406':
          description: >-
            An error message indicating an issue in the symbol regex, or number
            of symbols searched is over the maximum.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Quotes
      description: Get quote for one or more symbols
      operationId: marketdataQuotesGET
      summary: Get Quotes
      x-swagger-router-controller: Quotes
  '/marketdata/{index}/movers':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: index
          required: true
          type: string
        - in: query
          name: apikey
          required: false
          type: string
        - enum:
            - up
            - down
          in: query
          name: direction
          required: false
          type: string
        - enum:
            - value
            - percent
          in: query
          name: change
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Mover'
        '400':
          description: >-
            An error message indicating the caller must pass a correct value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: An error message indicating movers for the instrument was not found.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Movers
      operationId: marketdataIndexMoversGET
      summary: Get price history for a symbol
      x-swagger-router-controller: Movers
  '/marketdata/{market}/hours':
    get:
      produces:
        - application/json
      parameters:
        - in: query
          name: apiKey
          required: false
          type: string
        - in: path
          name: market
          required: true
          type: string
        - format: date-time
          in: query
          name: date
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/Hours'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Market Hours
      operationId: marketdataMarketHoursGET
      summary: Get Hours for Multiple Markets
      x-swagger-router-controller: MarketHours
  '/marketdata/{symbol}/pricehistory':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: symbol
          required: true
          type: string
        - in: query
          name: apikey
          required: false
          type: string
        - enum:
            - day
            - month
            - year
            - ytd
          in: query
          name: periodType
          required: false
          type: string
        - in: query
          name: period
          required: false
          type: integer
        - enum:
            - minute
            - daily
            - weekly
            - monthly
          in: query
          name: frequencyType
          required: false
          type: string
        - in: query
          name: frequency
          required: false
          type: integer
        - in: query
          name: endDate
          required: false
          type: integer
        - in: query
          name: startDate
          required: false
          type: integer
        - default: true
          in: query
          name: needExtendedHoursData
          required: false
          type: boolean
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/CandleList'
        '401':
          description: Unauthorized
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: Forbidden
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: Not Found
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Price History
      operationId: marketdataSymbolPricehistoryGET
      summary: Get price history for a symbol
      x-swagger-router-controller: PriceHistory
  '/marketdata/{symbol}/quotes':
    get:
      produces:
        - application/json
      parameters:
        - in: path
          name: symbol
          required: true
          type: string
        - in: query
          name: apikey
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/GetQuoteResponse'
        '400':
          description: >-
            An error message indicating the caller must pass a non null value in
            the parameter.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid
            Authorization in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '404':
          description: >-
            An error message indicating the instrument for the symbol/cusip was
            not found.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Quotes
      description: Get quote for a symbol
      operationId: marketdataSymbolQuotesGET
      summary: Get Quote
      x-swagger-router-controller: Quotes
  /oauth2/token:
    post:
      consumes:
        - application/x-www-form-urlencoded
      produces:
        - application/json
      parameters:
        - description: >-
            The grant type of the oAuth scheme. Possible values are
            authorization_code, refresh_token
          in: formData
          name: grant_type
          required: true
          type: string
        - description: Required if using refresh token grant
          in: formData
          name: refresh_token
          type: string
        - description: >-
            Set to offline to receive a refresh token on an authorization_code
            grant type request. Do not set to offline on a refresh_token grant
            type request.
          in: formData
          name: access_type
          type: string
        - description: Required if trying to use authorization code grant
          in: formData
          name: code
          type: string
        - description: OAuth User ID of your application
          in: formData
          name: client_id
          required: true
          type: integer
        - description: Required if trying to use authorization code grant
          in: formData
          name: redirect_uri
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/EASObject'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass valid credentials
            in the request body.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller doesn't have access to the
            account in the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security: []
      tags:
        - Authentication
      description: >-
        The token endpoint returns an access token along with an optional
        refresh token.
      operationId: oauth2TokenPOST
      summary: Post Access Token
      x-swagger-router-controller: Authentication
  /orders:
    get:
      produces:
        - application/json
      parameters:
        - in: query
          name: accountId
          required: false
          type: integer
        - in: query
          name: maxResults
          required: false
          type: integer
        - format: date-time
          in: query
          name: fromEnteredTime
          required: false
          type: string
        - format: date-time
          in: query
          name: toEnteredTime
          required: false
          type: string
        - enum:
            - AWAITING_PARENT_ORDER
            - AWAITING_CONDITION
            - AWAITING_MANUAL_REVIEW
            - ACCEPTED
            - AWAITING_UR_OUT
            - PENDING_ACTIVATION
            - QUEUED
            - WORKING
            - REJECTED
            - PENDING_CANCEL
            - CANCELED
            - PENDING_REPLACE
            - REPLACED
            - FILLED
            - EXPIRED
          in: query
          name: status
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: >-
        All orders for a specific account or, if account ID isn't specified,
        orders will be returned for all linked accounts.
      operationId: ordersGET
      summary: Get Orders By Query
      x-swagger-router-controller: Orders
    post:
      consumes:
        - application/Json
      produces:
        - application/json
      parameters:
        - in: path
          name: accountId
          required: true
          type: integer
        - in: body
          name: body
          schema:
            $ref: '#/definitions/OrderGet'
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/OrderGet'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '403':
          description: >-
            An error message indicating the caller is forbidden from accessing
            this page.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - Orders
      description: >-
        Place an order for a specific account. See our Place Order Samples Guide
        - https://developer.tdameritrade.com/content/place-order-samples.
      operationId: ordersPOST
      summary: Place Order
      x-swagger-router-controller: Orders
  /userprincipals:
    get:
      produces:
        - application/json
      parameters:
        - description: >-
            A comma separated String which allows one to specify additional
            fields to return. None of these fields are returned by default.
            Possible values in this String can be:
            streamerSubscriptionKeys,streamerConnectionInfo,preferences,
            surrogateIds. Example:
            fields=streamerSubscriptionKeys,streamerConnectionInfo
          in: query
          name: fields
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/UserPrincipal'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - User Info & Preferences
      description: User Principal details.
      operationId: userprincipalsGET
      summary: Get User Principals
      x-swagger-router-controller: UserInfoPreferences
  /userprincipals/streamersubscriptionkeys:
    get:
      produces:
        - application/json
      parameters:
        - description: >-
            A comma separated string of account IDs, to fetch subscription keys
            for each of them.
          in: query
          name: accountIds
          required: false
          type: string
      responses:
        '200':
          description: OK
          schema:
            $ref: '#/definitions/SubscriptionKey'
        '400':
          description: An error message indicating the validation problem with the request.
          schema:
            $ref: '#/definitions/ErrorObject'
        '401':
          description: >-
            An error message indicating the caller must pass a valid AuthToken
            in the HTTP authorization request header.
          schema:
            $ref: '#/definitions/ErrorObject'
        '500':
          description: An error message indicating there was an unexpected server error.
          schema:
            $ref: '#/definitions/ErrorObject'
        '503':
          description: An error message indicating there is a temporary problem responding.
          schema:
            $ref: '#/definitions/ErrorObject'
      security:
        - bearerAuth: []
      tags:
        - User Info & Preferences
      description: SubscriptionKey for provided accounts or default accounts.
      operationId: userprincipalsStreamersubscriptionkeysGET
      summary: Get Streamer Subscription Keys
      x-swagger-router-controller: UserInfoPreferences
definitions:
  Account:
    example:
      securitiesAccount:
        schema:
          schema: ''
    properties:
      securitiesAccount:
        $ref: '#/definitions/Account_securitiesAccount'
    type: object
  Account_securitiesAccount:
    example:
      schema:
        schema: ''
    properties:
      schema:
        $ref: '#/definitions/SecuritiesAccount'
  AssetType:
    enum:
      - EQUITY
      - OPTION
      - INDEX
      - MUTUAL_FUND
      - CASH_EQUIVALENT
      - FIXED_INCOME
      - CURRENCY
    type: string
  Bond:
    properties:
      assetType:
        enum:
          - BOND
        type: string
      bondPrice:
        format: double
        type: number
      cusip:
        type: string
      description:
        type: string
      exchange:
        type: string
      symbol:
        type: string
    type: object
  CandleList:
    description: List of Candles
    example:
      candles:
        - close: 0.8008281904610115
          datetime: 6
          high: 1.4658129805029452
          low: 5.962133916683182
          open: 5.637376656633329
          volume: 2.3021358869347655
        - close: 0.8008281904610115
          datetime: 6
          high: 1.4658129805029452
          low: 5.962133916683182
          open: 5.637376656633329
          volume: 2.3021358869347655
      empty: true
      symbol: symbol
    properties:
      candles:
        items:
          $ref: '#/definitions/CandleList_candles'
        type: array
      empty:
        type: boolean
      symbol:
        description: Symbol
        type: string
    type: object
  CandleList_candles:
    example:
      close: 0.8008281904610115
      datetime: 6
      high: 1.4658129805029452
      low: 5.962133916683182
      open: 5.637376656633329
      volume: 2.3021358869347655
    properties:
      close:
        description: Close
        format: double
        type: number
      datetime:
        description: DateTime
        format: int64
        type: integer
      high:
        description: High
        format: double
        type: number
      low:
        description: Low
        format: double
        type: number
      open:
        description: Open
        format: double
        type: number
      volume:
        description: Volume
        format: double
        type: number
    type: object
  CashAccount:
    properties:
      accountId:
        type: string
      currentBalances:
        $ref: '#/definitions/CashAccount_currentBalances'
      initialBalances:
        $ref: '#/definitions/CashAccount_initialBalances'
      isClosingOnlyRestricted:
        default: false
        type: boolean
      isDayTrader:
        default: false
        type: boolean
      orderStrategies:
        $ref: '#/definitions/MarginAccount_orderStrategies'
      positions:
        $ref: '#/definitions/MarginAccount_positions'
      projectedBalances:
        $ref: '#/definitions/CashAccount_currentBalances'
      roundTrips:
        format: int32
        type: integer
      type:
        enum:
          - CASH
          - MARGIN
        type: string
    type: object
  CashAccountBalances:
    properties:
      accruedInterest:
        format: double
        type: number
      bondValue:
        format: double
        type: number
      cashAvailableForTrading:
        format: double
        type: number
      cashAvailableForWithdrawal:
        format: double
        type: number
      cashBalance:
        format: double
        type: number
      cashCall:
        format: double
        type: number
      cashDebitCallValue:
        format: double
        type: number
      cashReceipts:
        format: double
        type: number
      liquidationValue:
        format: double
        type: number
      longMarketValue:
        format: double
        type: number
      longNonMarginableMarketValue:
        format: double
        type: number
      longOptionMarketValue:
        format: double
        type: number
      moneyMarketFund:
        format: double
        type: number
      mutualFundValue:
        format: double
        type: number
      pendingDeposits:
        format: double
        type: number
      savings:
        format: double
        type: number
      shortMarketValue:
        format: double
        type: number
      shortOptionMarketValue:
        format: double
        type: number
      totalCash:
        format: double
        type: number
      unsettledCash:
        format: double
        type: number
    type: object
  CashAccount_currentBalances:
    properties:
      schema:
        $ref: '#/definitions/CashAccountBalances'
  CashAccount_initialBalances:
    properties:
      accountValue:
        format: double
        type: number
      accruedInterest:
        format: double
        type: number
      bondValue:
        format: double
        type: number
      cashAvailableForTrading:
        format: double
        type: number
      cashAvailableForWithdrawal:
        format: double
        type: number
      cashBalance:
        format: double
        type: number
      cashDebitCallValue:
        format: double
        type: number
      cashReceipts:
        format: double
        type: number
      isInCall:
        default: false
        type: boolean
      liquidationValue:
        format: double
        type: number
      longOptionMarketValue:
        format: double
        type: number
      longStockValue:
        format: double
        type: number
      moneyMarketFund:
        format: double
        type: number
      mutualFundValue:
        format: double
        type: number
      pendingDeposits:
        format: double
        type: number
      shortOptionMarketValue:
        format: double
        type: number
      shortStockValue:
        format: double
        type: number
      unsettledCash:
        format: double
        type: number
    type: object
  CashEquivalent:
    properties:
      assetType:
        $ref: '#/definitions/Equity_assetType'
      cusip:
        type: string
      description:
        type: string
      symbol:
        type: string
      type:
        enum:
          - SAVINGS
          - MONEY_MARKET_FUND
        type: string
    type: object
  Duration:
    enum:
      - DAY
      - GOOD_TIL_CANCEL
      - FILL_OR_KILL
    type: string
  EASObject:
    example:
      access_token: access_token
      expires_in: 0
      refresh_token: refresh_token
      refresh_token_expires_in: 6
      scope: scope
      token_type: token_type
    properties:
      access_token:
        type: string
      expires_in:
        format: int32
        type: integer
      refresh_token:
        type: string
      refresh_token_expires_in:
        format: int32
        type: integer
      scope:
        type: string
      token_type:
        type: string
    type: object
  ETFQuote:
    properties:
      52WkHigh:
        format: double
        type: number
      52WkLow:
        format: double
        type: number
      askId:
        type: string
      askPrice:
        format: double
        type: number
      askSize:
        format: int32
        type: integer
      bidId:
        type: string
      bidPrice:
        format: double
        type: number
      bidSize:
        format: int32
        type: integer
      closePrice:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      divAmount:
        format: double
        type: number
      divDate:
        type: string
      divYield:
        format: double
        type: number
      exchange:
        type: string
      exchangeName:
        type: string
      highPrice:
        format: double
        type: number
      lastId:
        type: string
      lastPrice:
        format: double
        type: number
      lastSize:
        format: int32
        type: integer
      lowPrice:
        format: double
        type: number
      marginable:
        default: false
        type: boolean
      mark:
        format: double
        type: number
      netChange:
        format: double
        type: number
      openPrice:
        format: double
        type: number
      peRatio:
        format: double
        type: number
      quoteTimeInLong:
        format: int32
        type: integer
      regularMarketLastPrice:
        format: double
        type: number
      regularMarketLastSize:
        format: int32
        type: integer
      regularMarketNetChange:
        format: double
        type: number
      regularMarketTradeTimeInLong:
        format: int32
        type: integer
      securityStatus:
        type: string
      shortable:
        default: false
        type: boolean
      symbol:
        type: string
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
      volatility:
        format: double
        type: number
    type: object
  Equity:
    properties:
      assetType:
        $ref: '#/definitions/Equity_assetType'
      cusip:
        type: string
      description:
        type: string
      symbol:
        type: string
    type: object
  EquityQuote:
    properties:
      52WkHigh:
        format: double
        type: number
      52WkLow:
        format: double
        type: number
      askId:
        type: string
      askPrice:
        format: double
        type: number
      askSize:
        format: int32
        type: integer
      bidId:
        type: string
      bidPrice:
        format: double
        type: number
      bidSize:
        format: int32
        type: integer
      closePrice:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      divAmount:
        format: double
        type: number
      divDate:
        type: string
      divYield:
        format: double
        type: number
      exchange:
        type: string
      exchangeName:
        type: string
      highPrice:
        format: double
        type: number
      lastId:
        type: string
      lastPrice:
        format: double
        type: number
      lastSize:
        format: int32
        type: integer
      lowPrice:
        format: double
        type: number
      marginable:
        default: false
        type: boolean
      mark:
        format: double
        type: number
      netChange:
        format: double
        type: number
      openPrice:
        format: double
        type: number
      peRatio:
        format: double
        type: number
      quoteTimeInLong:
        format: int32
        type: integer
      regularMarketLastPrice:
        format: double
        type: number
      regularMarketLastSize:
        format: int32
        type: integer
      regularMarketNetChange:
        format: double
        type: number
      regularMarketTradeTimeInLong:
        format: int32
        type: integer
      securityStatus:
        type: string
      shortable:
        default: false
        type: boolean
      symbol:
        type: string
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
      volatility:
        format: double
        type: number
    type: object
  Equity_assetType:
    properties:
      schema:
        $ref: '#/definitions/AssetType'
  ErrorObject:
    example:
      error: error
    properties:
      error:
        type: string
    type: object
  Execution:
    example:
      activityType: EXECUTION
      executionLegs:
        - legId: 1
          mismarkedQuantity: 6.84685269835264
          price: 7.457744773683766
          quantity: 1.4894159098541704
          time: '2000-01-23T04:56:07.000Z'
        - legId: 1
          mismarkedQuantity: 6.84685269835264
          price: 7.457744773683766
          quantity: 1.4894159098541704
          time: '2000-01-23T04:56:07.000Z'
      executionType: FILL
      orderRamainingQuantity: 1.2315135367772556
      quantity: 7.386281948385884
    properties:
      activityType:
        enum:
          - EXECUTION
          - ORDER_ACTION
        type: string
      executionLegs:
        items:
          $ref: '#/definitions/Execution_executionLegs'
        type: array
        xml:
          name: executionLeg
          wrapped: true
      executionType:
        enum:
          - FILL
        type: string
      orderRamainingQuantity:
        format: doudlbe
        type: number
      quantity:
        format: double
        type: number
    type: object
  Execution_executionLegs:
    example:
      legId: 1
      mismarkedQuantity: 6.84685269835264
      price: 7.457744773683766
      quantity: 1.4894159098541704
      time: '2000-01-23T04:56:07.000Z'
    properties:
      legId:
        format: int32
        type: integer
      mismarkedQuantity:
        format: double
        type: number
      price:
        format: double
        type: number
      quantity:
        format: double
        type: number
      time:
        format: date-time
        type: string
    type: object
  ExpirationDate:
    properties:
      date:
        type: string
    type: object
  FixedIncome:
    properties:
      assetType:
        $ref: '#/definitions/Equity_assetType'
      cusip:
        type: string
      description:
        type: string
      factor:
        format: double
        type: number
      maturityDate:
        format: date-time
        type: string
      symbol:
        type: string
      variableRate:
        format: double
        type: number
    type: object
  ForexQuote:
    properties:
      52WkHighInDouble:
        format: double
        type: number
      52WkLowInDouble:
        format: double
        type: number
      askPriceInDouble:
        format: double
        type: number
      bidPriceInDouble:
        format: double
        type: number
      changeInDouble:
        format: double
        type: number
      closePriceInDouble:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      exchange:
        type: string
      exchangeName:
        type: string
      highPriceInDouble:
        format: double
        type: number
      isTradable:
        type: boolean
      lastPriceInDouble:
        format: double
        type: number
      lowPriceInDouble:
        format: double
        type: number
      mark:
        format: double
        type: number
      marketMaker:
        type: string
      openPriceInDouble:
        format: double
        type: number
      percentChange:
        format: double
        type: number
      product:
        type: string
      securityStatus:
        type: string
      symbol:
        type: string
      tick:
        format: double
        type: number
      tickAmount:
        format: double
        type: number
      tradingHours:
        type: string
    type: object
  FrequencyType:
    enum:
      - minute
      - daily
      - weekly
      - monthly
    type: string
  Fundamental:
    properties:
      assetType:
        enum:
          - EQUITY
          - ETF
          - MUTUAL_FUND
          - UNKNOWN
        type: string
      cusip:
        type: string
      description:
        type: string
      exchange:
        type: string
      fundamental:
        $ref: '#/definitions/Fundamental_fundamental'
      symbol:
        type: string
    type: object
  FundamentalData:
    properties:
      beta:
        format: double
        type: number
      bookValuePerShare:
        format: double
        type: number
      currentRatio:
        format: double
        type: number
      divGrowthRate3Year:
        format: double
        type: number
      dividendAmount:
        format: double
        type: number
      dividendDate:
        type: string
      dividendPayAmount:
        format: double
        type: number
      dividendPayDate:
        type: string
      dividendYield:
        format: double
        type: number
      epsChange:
        format: double
        type: number
      epsChangePercentTTM:
        format: double
        type: number
      epsChangeYear:
        format: double
        type: number
      epsTTM:
        format: double
        type: number
      grossMarginMRQ:
        format: double
        type: number
      grossMarginTTM:
        format: double
        type: number
      high52:
        format: double
        type: number
      interestCoverage:
        format: double
        type: number
      low52:
        format: double
        type: number
      ltDebtToEquity:
        format: double
        type: number
      marketCap:
        format: double
        type: number
      marketCapFloat:
        format: double
        type: number
      netProfitMarginMRQ:
        format: double
        type: number
      netProfitMarginTTM:
        format: double
        type: number
      operatingMarginMRQ:
        format: double
        type: number
      operatingMarginTTM:
        format: double
        type: number
      pbRatio:
        format: double
        type: number
      pcfRatio:
        format: double
        type: number
      peRatio:
        format: double
        type: number
      pegRatio:
        format: double
        type: number
      prRatio:
        format: double
        type: number
      quickRatio:
        format: double
        type: number
      returnOnAssets:
        format: double
        type: number
      returnOnEquity:
        format: double
        type: number
      returnOnInvestment:
        format: double
        type: number
      revChangeIn:
        format: double
        type: number
      revChangeTTM:
        format: double
        type: number
      revChangeYear:
        format: double
        type: number
      sharesOutstanding:
        format: double
        type: number
      shortIntDayToCover:
        format: double
        type: number
      shortIntToFloat:
        format: double
        type: number
      symbol:
        type: string
      totalDebtToCapital:
        format: double
        type: number
      totalDebtToEquity:
        format: double
        type: number
      vol10DayAvg:
        format: double
        type: number
      vol1DayAvg:
        format: double
        type: number
      vol3MonthAvg:
        format: double
        type: number
    type: object
  Fundamental_fundamental:
    properties:
      schema:
        $ref: '#/definitions/FundamentalData'
  FutureOptionsQuote:
    properties:
      askPriceInDouble:
        format: double
        type: number
      bidPriceInDouble:
        format: double
        type: number
      closePriceInDouble:
        format: double
        type: number
      contractType:
        type: string
      deltaInDouble:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      exchangeName:
        type: string
      exerciseType:
        type: string
      expirationType:
        type: string
      futureExpirationDate:
        format: int32
        type: integer
      futureIsActive:
        type: boolean
      futureIsTradable:
        type: boolean
      futurePercentChange:
        format: double
        type: number
      futureTradingHours:
        type: string
      gammaInDouble:
        format: double
        type: number
      highPriceInDouble:
        format: double
        type: number
      inTheMoney:
        type: boolean
      lastPriceInDouble:
        format: double
        type: number
      lowPriceInDouble:
        format: double
        type: number
      mark:
        format: double
        type: number
      moneyIntrinsicValueInDouble:
        format: double
        type: number
      multiplierInDouble:
        format: double
        type: number
      netChangeInDouble:
        format: double
        type: number
      openInterest:
        format: double
        type: number
      openPriceInDouble:
        format: double
        type: number
      rhoInDouble:
        format: double
        type: number
      securityStatus:
        type: string
      strikePriceInDouble:
        format: double
        type: number
      symbol:
        type: string
      thetaInDouble:
        format: double
        type: number
      tick:
        format: double
        type: number
      tickAmount:
        format: double
        type: number
      timeValueInDouble:
        format: double
        type: number
      underlying:
        type: string
      vegaInDouble:
        format: double
        type: number
      volatility:
        format: double
        type: number
    type: object
  FutureQuote:
    properties:
      askId:
        type: string
      askPriceInDouble:
        format: double
        type: number
      bidId:
        type: string
      bidPriceInDouble:
        format: double
        type: number
      changeInDouble:
        format: double
        type: number
      closePriceInDouble:
        format: double
        type: number
      description:
        type: string
      exchange:
        type: string
      exchangeName:
        type: string
      futureActiveSymbol:
        type: string
      futureExpirationDate:
        type: string
      futureIsActive:
        type: boolean
      futureIsTradable:
        type: boolean
      futureMultiplier:
        format: double
        type: number
      futurePercentChange:
        format: double
        type: number
      futurePriceFormat:
        type: string
      futureSettlementPrice:
        format: double
        type: number
      futureTradinghours:
        type: string
      highPriceInDouble:
        format: double
        type: number
      lastId:
        type: string
      lastPriceInDouble:
        format: double
        type: number
      lowPriceInDouble:
        format: double
        type: number
      mark:
        format: double
        type: number
      openInterest:
        format: double
        type: number
      openPriceInDouble:
        format: double
        type: number
      product:
        type: string
      securityStatus:
        type: string
      symbol:
        type: string
      tick:
        format: double
        type: number
      tickAmount:
        format: double
        type: number
    type: object
  GetOptionChainResponse:
    additionalProperties:
      example:
        schemas: ''
      properties:
        schemas:
          oneOf:
            - $ref: '#/definitions/OptionChain'
            - $ref: '#/definitions/StrikePriceMap'
            - $ref: '#/definitions/OptionChainOption'
            - $ref: '#/definitions/Underlying'
            - $ref: '#/definitions/ExpirationDate'
            - $ref: '#/definitions/OptionDeliverable'
      type: object
    type: object
  GetQuoteResponse:
    additionalProperties:
      example:
        schemas: ''
      properties:
        schemas:
          oneOf:
            - $ref: '#/definitions/MutualFundQuote'
            - $ref: '#/definitions/FutureQuote'
            - $ref: '#/definitions/FutureOptionsQuote'
            - $ref: '#/definitions/IndexQuote'
            - $ref: '#/definitions/OptionQuote'
            - $ref: '#/definitions/ForexQuote'
            - $ref: '#/definitions/ETFQuote'
            - $ref: '#/definitions/EquityQuote'
      type: object
    type: object
  Hours:
    example:
      category: category
      date: date
      exchange: exchange
      isOpen: true
      marketType: BOND
      product: product
      productName: productName
      sessionHours:
        additionalProperties:
          - additionalProperties
          - additionalProperties
    properties:
      category:
        type: string
      date:
        type: string
      exchange:
        type: string
      isOpen:
        type: boolean
      marketType:
        enum:
          - BOND
          - EQUITY
          - ETF
          - FOREX
          - FUTURE
          - FUTURE_OPTION
          - INDEX
          - INDICATOR
          - MUTUAL_FUND
          - OPTION
          - UNKNOWN
        type: string
      product:
        type: string
      productName:
        type: string
      sessionHours:
        $ref: '#/definitions/Hours_sessionHours'
    type: object
  Hours_sessionHours:
    example:
      additionalProperties:
        - additionalProperties
        - additionalProperties
    properties:
      additionalProperties:
        items:
          type: string
        type: array
    type: object
  IndexQuote:
    properties:
      52WkHigh:
        format: double
        type: number
      52WkLow:
        format: double
        type: number
      closePrice:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      exchange:
        type: string
      exchangeName:
        type: string
      highPrice:
        format: double
        type: number
      lastPrice:
        format: double
        type: number
      lowPrice:
        format: double
        type: number
      netChange:
        format: double
        type: number
      openPrice:
        format: double
        type: number
      securityStatus:
        type: string
      symbol:
        type: string
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
    type: object
  Instrument:
    example:
      schema: ''
    properties:
      schema: {}
    type: object
  LotMethod:
    enum:
      - FIFO
      - LIFO
      - HIGH_COST
      - LOW_COST
      - MINIMUM_TAX
      - AVERAGE_COST
      - NONE
    type: string
  MarginAccount:
    properties:
      accountId:
        type: string
      currentBalances:
        $ref: '#/definitions/MarginAccount_currentBalances'
      initialBalances:
        $ref: '#/definitions/MarginAccount_initialBalances'
      isClosingOnlyRestricted:
        default: false
        type: boolean
      isDayTrader:
        default: false
        type: boolean
      orderStrategies:
        $ref: '#/definitions/MarginAccount_orderStrategies'
      positions:
        $ref: '#/definitions/MarginAccount_positions'
      projectedBalances:
        $ref: '#/definitions/MarginAccount_currentBalances'
      roundTrips:
        format: int32
        type: integer
      type:
        enum:
          - CASH
          - MARGIN
        type: string
    type: object
  MarginAccountBalances:
    properties:
      accruedInterest:
        format: double
        type: number
      availableFunds:
        format: double
        type: number
      availableFundsNonMarginableTrade:
        format: double
        type: number
      bondValue:
        format: double
        type: number
      buyingPower:
        format: double
        type: number
      buyingPowerNonMarginableTrade:
        format: double
        type: number
      cashBalance:
        format: double
        type: number
      cashReceipts:
        format: double
        type: number
      dayTradingBuyingPower:
        format: double
        type: number
      dayTradingBuyingPowerCall:
        format: double
        type: number
      equity:
        format: double
        type: number
      equityPercentage:
        format: double
        type: number
      isInCall:
        default: false
        type: boolean
      liquidationValue:
        format: double
        type: number
      longMarginValue:
        format: double
        type: number
      longMarketValue:
        format: double
        type: number
      longOptionMarketValue:
        format: double
        type: number
      maintenanceCall:
        format: double
        type: number
      maintenanceRequirement:
        format: double
        type: number
      marginBalance:
        format: double
        type: number
      moneyMarketFund:
        format: double
        type: number
      mutualFundValue:
        format: double
        type: number
      optionBuyingPower:
        format: double
        type: number
      pendingDeposits:
        format: double
        type: number
      regTCall:
        format: double
        type: number
      savings:
        format: double
        type: number
      shortBalance:
        format: double
        type: number
      shortMarginValue:
        format: double
        type: number
      shortMarketValue:
        format: double
        type: number
      shortOptionMarketValue:
        format: double
        type: number
      sma:
        format: double
        type: number
      stockBuyingPower:
        format: double
        type: number
    type: object
  MarginAccount_currentBalances:
    properties:
      schema:
        $ref: '#/definitions/MarginAccountBalances'
  MarginAccount_initialBalances:
    properties:
      accountValue:
        format: double
        type: number
      accruedInterest:
        format: double
        type: number
      availableFundsNonMarginableTrade:
        format: double
        type: number
      bondValue:
        format: double
        type: number
      buyingPower:
        format: double
        type: number
      cashAvailableForTrading:
        format: double
        type: number
      cashBalance:
        format: double
        type: number
      cashReceipts:
        format: double
        type: number
      dayTradingBuyingPower:
        format: double
        type: number
      dayTradingBuyingPowerCall:
        format: double
        type: number
      dayTradingEquityCall:
        format: double
        type: number
      equity:
        format: double
        type: number
      equityPercentage:
        format: double
        type: number
      isInCall:
        default: false
        type: boolean
      liquidationValue:
        format: double
        type: number
      longMarginValue:
        format: double
        type: number
      longOptionMarketValue:
        format: double
        type: number
      longStockValue:
        format: double
        type: number
      maintenanceCall:
        format: double
        type: number
      maintenanceRequirement:
        format: double
        type: number
      margin:
        format: double
        type: number
      marginBalance:
        format: double
        type: number
      marginEquity:
        format: double
        type: number
      moneyMarketFund:
        format: double
        type: number
      mutualFundValue:
        format: double
        type: number
      pendingDeposits:
        format: double
        type: number
      regTCall:
        format: double
        type: number
      shortBalance:
        format: double
        type: number
      shortMarginValue:
        format: double
        type: number
      shortOptionMarketValue:
        format: double
        type: number
      shortStockValue:
        format: double
        type: number
      totalCash:
        format: double
        type: number
      unsettledCash:
        format: double
        type: number
    type: object
  MarginAccount_orderStrategies:
    properties:
      schema:
        $ref: '#/definitions/OrderGet'
  MarginAccount_positions:
    properties:
      schema:
        $ref: '#/definitions/Positions'
  Mover:
    example:
      change: 0.8008281904610115
      description: description
      direction: up
      last: 6.027456183070403
      symbol: symbol
      totalVolume: 1
    properties:
      change:
        format: double
        type: number
      description:
        type: string
      direction:
        enum:
          - up
          - down
        type: string
      last:
        format: double
        type: number
      symbol:
        type: string
      totalVolume:
        format: int64
        type: integer
    type: object
  MutualFund:
    properties:
      assetType:
        $ref: '#/definitions/Equity_assetType'
      cusip:
        type: string
      description:
        type: string
      symbol:
        type: string
      type:
        enum:
          - NOT_APPLICABLE
          - OPEN_END_NON_TAXABLE
          - OPEN_END_TAXABLE
          - NO_LOAD_NON_TAXABLE
          - NO_LOAD_TAXABLE
        type: string
    type: object
  MutualFundQuote:
    properties:
      52WkHigh:
        format: double
        type: number
      52WkLow:
        format: double
        type: number
      closePrice:
        format: double
        type: number
      description:
        type: string
      digits:
        format: int32
        type: integer
      divAmount:
        format: double
        type: number
      divDate:
        type: string
      divYield:
        format: double
        type: number
      exchange:
        type: string
      exchangeName:
        type: string
      nAV:
        format: double
        type: number
      netChange:
        format: double
        type: number
      perRatio:
        format: double
        type: number
      securityStatus:
        type: string
      symbol:
        type: string
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
    type: object
  Option:
    properties:
      assetType:
        $ref: '#/definitions/Equity_assetType'
      cusip:
        type: string
      description:
        type: string
      optionDeliverables:
        $ref: '#/definitions/OptionChainOption_optionDeliverablesList'
      optionMultiplier:
        format: int32
        type: integer
      putCall:
        $ref: '#/definitions/OptionChainOption_putCall'
      symbol:
        type: string
      type:
        enum:
          - VANILLA
          - BINARY
          - BARRIER
        type: string
      underlyingSymbol:
        type: string
    type: object
  OptionChain:
    properties:
      callExpDateMap:
        additionalProperties:
          type: object
        type: object
      daysToExpiration:
        format: double
        type: number
      interestRate:
        format: double
        type: number
      interval:
        format: double
        type: number
      isDelayed:
        type: boolean
      isIndex:
        type: boolean
      putExpDateMap:
        additionalProperties:
          type: object
        type: object
      status:
        type: string
      strategy:
        $ref: '#/definitions/OptionChain_strategy'
      symbol:
        type: string
      underlying:
        $ref: '#/definitions/OptionChain_underlying'
      underlyingPrice:
        format: double
        type: number
      volatility:
        format: double
        type: number
    type: object
  OptionChainOption:
    properties:
      askPrice:
        format: double
        type: number
      askSize:
        format: int32
        type: integer
      bidPrice:
        format: double
        type: number
      bidSize:
        format: int32
        type: integer
      closePrice:
        format: double
        type: number
      delta:
        format: double
        type: number
      delverableNote:
        type: string
      description:
        type: string
      exchangeName:
        type: string
      expirationDate:
        type: string
      expirationType:
        type: string
      gamma:
        format: double
        type: number
      highPrice:
        format: double
        type: number
      isInTheMoney:
        type: boolean
      isIndexOption:
        type: boolean
      isMini:
        type: boolean
      isNonStandard:
        type: boolean
      lastPrice:
        format: double
        type: number
      lastSize:
        format: int32
        type: integer
      lowPrice:
        format: double
        type: number
      markChange:
        format: double
        type: number
      markPercentChange:
        format: double
        type: number
      markPrice:
        format: double
        type: number
      multiplier:
        format: double
        type: number
      netChange:
        format: double
        type: number
      opePrice:
        format: double
        type: number
      openInterest:
        format: double
        type: number
      optionDeliverablesList:
        $ref: '#/definitions/OptionChainOption_optionDeliverablesList'
      percentChange:
        format: double
        type: number
      putCall:
        $ref: '#/definitions/OptionChainOption_putCall'
      quoteTimeInLong:
        format: int32
        type: integer
      rho:
        format: double
        type: number
      settlementType:
        type: string
      strikePrice:
        format: double
        type: number
      symbol:
        type: string
      theoreticalOptionValue:
        format: double
        type: number
      theoreticalVolatility:
        format: double
        type: number
      theta:
        format: double
        type: number
      timeValue:
        format: double
        type: number
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
      vega:
        format: double
        type: number
      volatility:
        format: double
        type: number
    type: object
  OptionChainOption_optionDeliverablesList:
    properties:
      schema:
        $ref: '#/definitions/OptionDeliverable'
  OptionChainOption_putCall:
    properties:
      schema:
        $ref: '#/definitions/PutCall'
  OptionChain_strategy:
    properties:
      schema:
        $ref: '#/definitions/Strategy'
  OptionChain_underlying:
    properties:
      schema:
        $ref: '#/definitions/Underlying'
  OptionDeliverable:
    items:
      $ref: '#/definitions/OptionDeliverable_inner'
    type: array
    xml:
      name: optionDeliverable
      wrapped: true
  OptionDeliverable_inner:
    properties:
      assetType:
        properties:
          schema:
            $ref: '#/definitions/AssetType'
      currencyType:
        enum:
          - USD
          - CAD
          - EUR
          - JPY
        type: string
      deliverableUnits:
        format: double
        type: number
      symbol:
        type: string
    type: object
  OptionQuote:
    properties:
      askPrice:
        format: double
        type: number
      askSize:
        format: int32
        type: integer
      bidPrice:
        format: double
        type: number
      bidSize:
        format: int32
        type: integer
      closePrice:
        format: double
        type: number
      contractType:
        type: string
      deliverables:
        type: string
      delta:
        format: double
        type: number
      description:
        type: string
      exchange:
        type: string
      exchangeName:
        type: string
      gamma:
        format: double
        type: number
      highPrice:
        format: double
        type: number
      lastPrice:
        format: double
        type: number
      lastSize:
        format: int32
        type: integer
      lowPrice:
        format: double
        type: number
      mark:
        format: double
        type: number
      moneyIntrinsicValue:
        format: double
        type: number
      multiplier:
        format: double
        type: number
      netChange:
        format: double
        type: number
      openInterest:
        format: double
        type: number
      openPrice:
        format: double
        type: number
      quoteTimeInLong:
        format: int32
        type: integer
      rho:
        format: double
        type: number
      securityStatus:
        type: string
      settlementType:
        type: string
      strikePrice:
        format: double
        type: number
      symbol:
        type: string
      theoreticalOptionValue:
        format: double
        type: number
      theta:
        format: double
        type: number
      timeValue:
        format: double
        type: number
      totalVolume:
        format: int32
        type: integer
      tradeTimeInLong:
        format: int32
        type: integer
      underlying:
        type: string
      underlyingPrice:
        format: double
        type: number
      uvExpirationType:
        type: string
      vega:
        format: double
        type: number
      volatility:
        format: double
        type: number
    type: object
  OrderActivity:
    example:
      schema:
        activityType: EXECUTION
        executionLegs:
          - legId: 1
            mismarkedQuantity: 6.84685269835264
            price: 7.457744773683766
            quantity: 1.4894159098541704
            time: '2000-01-23T04:56:07.000Z'
          - legId: 1
            mismarkedQuantity: 6.84685269835264
            price: 7.457744773683766
            quantity: 1.4894159098541704
            time: '2000-01-23T04:56:07.000Z'
        executionType: FILL
        orderRamainingQuantity: 1.2315135367772556
        quantity: 7.386281948385884
    properties:
      schema:
        $ref: '#/definitions/Execution'
    type: object
  OrderGet:
    example:
      accountId: 4
      activationPrice: 3.616076749251911
      cancelTime:
        date: date
        shortFormat: false
      cancelable: false
      childOrderStrategies:
        - {}
        - {}
      closedTime: '2000-01-23T04:56:07.000Z'
      complexOrderStrategyType: NONE
      destinationLinkName: destinationLinkName
      duration:
        schema: DAY
      editable: false
      enteredTime: '2000-01-23T04:56:07.000Z'
      filledQuantity: 6.027456183070403
      orderActivityCollection:
        - schema:
            schema:
              activityType: EXECUTION
              executionLegs:
                - legId: 1
                  mismarkedQuantity: 6.84685269835264
                  price: 7.457744773683766
                  quantity: 1.4894159098541704
                  time: '2000-01-23T04:56:07.000Z'
                - legId: 1
                  mismarkedQuantity: 6.84685269835264
                  price: 7.457744773683766
                  quantity: 1.4894159098541704
                  time: '2000-01-23T04:56:07.000Z'
              executionType: FILL
              orderRamainingQuantity: 1.2315135367772556
              quantity: 7.386281948385884
        - schema:
            schema:
              activityType: EXECUTION
              executionLegs:
                - legId: 1
                  mismarkedQuantity: 6.84685269835264
                  price: 7.457744773683766
                  quantity: 1.4894159098541704
                  time: '2000-01-23T04:56:07.000Z'
                - legId: 1
                  mismarkedQuantity: 6.84685269835264
                  price: 7.457744773683766
                  quantity: 1.4894159098541704
                  time: '2000-01-23T04:56:07.000Z'
              executionType: FILL
              orderRamainingQuantity: 1.2315135367772556
              quantity: 7.386281948385884
      orderId: 2
      orderLegCollection:
        - instruction: BUY
          instrument:
            schema:
              schema: ''
          legId: 7
          orderLegType: EQUITY
          positionEffect: OPENING
          quantity: 9.301444243932576
          quantityType: ALL_SHARES
        - instruction: BUY
          instrument:
            schema:
              schema: ''
          legId: 7
          orderLegType: EQUITY
          positionEffect: OPENING
          quantity: 9.301444243932576
          quantityType: ALL_SHARES
      orderStrategyType: SINGLE
      orderType:
        schema: MARKET
      price: 2.3021358869347655
      priceLinkBasis: MANUAL
      priceLinkType: VALUE
      quality: 0.8008281904610115
      releaseTime: '2000-01-23T04:56:07.000Z'
      remainingQuantity: 1.4658129805029452
      replacingOrderCollection:
        - {}
        - {}
      requestedDestination: INET
      session:
        schema: NORMAL
      specialInstruction: ALL_OR_NONE
      status: AWAITING_PARENT_ORDER
      statusDescription: statusDescription
      stopPrice: 5.962133916683182
      stopPriceLinkBasis: MANUAL
      stopPriceLinkType: VALUE
      stopPriceOffset: 5.637376656633329
      stopType: STANDARD
      tag: tag
      taxLotMethod: FIFO
    properties:
      accountId:
        format: int64
        type: integer
      activationPrice:
        format: double
        type: number
      cancelTime:
        $ref: '#/definitions/OrderGet_cancelTime'
      cancelable:
        default: false
        type: boolean
      childOrderStrategies:
        items:
          type: object
        type: array
        xml:
          name: childOrder
          wrapped: true
      closedTime:
        format: date-time
        type: string
      complexOrderStrategyType:
        enum:
          - NONE
          - COVERED
          - VERTICAL
          - BACK_RATIO
          - CALENDAR
          - DIAGONAL
          - STRADDLE
          - STRANGLE
          - COLLAR_SYNTHETIC
          - BUTTERFLY
          - CONDOR
          - IRON_CONDOR
          - VERTICAL_ROLL
          - COLLAR_WITH_STOCK
          - DOUBLE_DIAGONAL
          - UNBALANCED_BUTTERFLY
          - UNBALANCED_CONDOR
          - UNBALANCED_IRON_CONDOR
          - UNBALANCED_VERTICAL_ROLL
          - CUSTOM
        type: string
      destinationLinkName:
        type: string
      duration:
        $ref: '#/definitions/OrderGet_duration'
      editable:
        default: false
        type: boolean
      enteredTime:
        format: date-time
        type: string
      filledQuantity:
        format: double
        type: number
      orderActivityCollection:
        items:
          $ref: '#/definitions/OrderGet_orderActivityCollection'
        type: array
        xml:
          name: orderActivity
          wrapped: true
      orderId:
        format: int64
        type: integer
      orderLegCollection:
        items:
          $ref: '#/definitions/OrderGet_orderLegCollection'
        type: array
        xml:
          name: orderLeg
          wrapped: true
      orderStrategyType:
        enum:
          - SINGLE
          - OCO
          - TRIGGER
        type: string
      orderType:
        $ref: '#/definitions/OrderGet_orderType'
      price:
        format: double
        type: number
      priceLinkBasis:
        enum:
          - MANUAL
          - BASE
          - TRIGGER
          - LAST
          - BID
          - ASK
          - ASK_BID
          - MARK
          - AVERAGE
        type: string
      priceLinkType:
        enum:
          - VALUE
          - PERCENT
          - TICK
        type: string
      quality:
        format: double
        type: number
      releaseTime:
        format: date-time
        type: string
      remainingQuantity:
        format: double
        type: number
      replacingOrderCollection:
        items:
          type: object
        type: array
        xml:
          name: replacingOrder
          wrapped: true
      requestedDestination:
        enum:
          - INET
          - ECN_ARCA
          - CBOE
          - AMEX
          - PHLX
          - ISE
          - BOX
          - NYSE
          - NASDAQ
          - BATS
          - C2
          - AUTO
        type: string
      session:
        $ref: '#/definitions/OrderGet_session'
      specialInstruction:
        enum:
          - ALL_OR_NONE
          - DO_NOT_REDUCE
          - ALL_OR_NONE_DO_NOT_REDUCE
        type: string
      status:
        enum:
          - AWAITING_PARENT_ORDER
          - AWAITING_CONDITION
          - AWAITING_MANUAL_REVIEW
          - ACCEPTED
          - AWAITING_UR_OUT
          - PENDING_ACTIVATION
          - QUEUED
          - WORKING
          - REJECTED
          - PENDING_CANCEL
          - CANCELED
          - PENDING_REPLACE
          - REPLACED
          - FILLED
          - EXPIRED
        type: string
      statusDescription:
        type: string
      stopPrice:
        format: double
        type: number
      stopPriceLinkBasis:
        enum:
          - MANUAL
          - BASE
          - TRIGGER
          - LAST
          - BID
          - ASK
          - ASK_BID
          - MARK
          - AVERAGE
        type: string
      stopPriceLinkType:
        enum:
          - VALUE
          - PERCENT
          - TICK
        type: string
      stopPriceOffset:
        format: double
        type: number
      stopType:
        enum:
          - STANDARD
          - BID
          - ASK
          - LAST
          - MARK
        type: string
      tag:
        type: string
      taxLotMethod:
        enum:
          - FIFO
          - LIFO
          - HIGH_COST
          - LOW_COST
          - AVERAGE_COST
          - SPECIFIC_LOT
        type: string
    type: object
  OrderGet_cancelTime:
    example:
      date: date
      shortFormat: false
    properties:
      date:
        type: string
      shortFormat:
        default: false
        type: boolean
    type: object
  OrderGet_duration:
    example:
      schema: DAY
    properties:
      schema:
        $ref: '#/definitions/Duration'
  OrderGet_instrument:
    example:
      schema:
        schema: ''
    properties:
      schema:
        $ref: '#/definitions/Instrument'
  OrderGet_orderActivityCollection:
    example:
      schema:
        schema:
          activityType: EXECUTION
          executionLegs:
            - legId: 1
              mismarkedQuantity: 6.84685269835264
              price: 7.457744773683766
              quantity: 1.4894159098541704
              time: '2000-01-23T04:56:07.000Z'
            - legId: 1
              mismarkedQuantity: 6.84685269835264
              price: 7.457744773683766
              quantity: 1.4894159098541704
              time: '2000-01-23T04:56:07.000Z'
          executionType: FILL
          orderRamainingQuantity: 1.2315135367772556
          quantity: 7.386281948385884
    properties:
      schema:
        $ref: '#/definitions/OrderActivity'
    type: object
  OrderGet_orderLegCollection:
    example:
      instruction: BUY
      instrument:
        schema:
          schema: ''
      legId: 7
      orderLegType: EQUITY
      positionEffect: OPENING
      quantity: 9.301444243932576
      quantityType: ALL_SHARES
    properties:
      instruction:
        enum:
          - BUY
          - SELL
          - BUY_TO_COVER
          - SELL_SHORT
          - BUY_TO_OPEN
          - BUY_TO_CLOSE
          - SELL_TO_OPEN
          - SELL_TO_CLOSE
          - EXCHANGE
        type: string
      instrument:
        $ref: '#/definitions/OrderGet_instrument'
      legId:
        format: int64
        type: integer
      orderLegType:
        enum:
          - EQUITY
          - OPTION
          - INDEX
          - MUTUAL_FUND
          - CASH_EQUIVALENT
          - FIXED_INCOME
          - CURRENCY
        type: string
      positionEffect:
        enum:
          - OPENING
          - CLOSING
          - AUTOMATIC
        type: string
      quantity:
        format: double
        type: number
      quantityType:
        enum:
          - ALL_SHARES
          - DOLLARS
          - SHARES
        type: string
    type: object
  OrderGet_orderType:
    example:
      schema: MARKET
    properties:
      schema:
        $ref: '#/definitions/OrderType'
  OrderGet_session:
    example:
      schema: NORMAL
    properties:
      schema:
        $ref: '#/definitions/Session'
  OrderType:
    enum:
      - MARKET
      - LIMIT
      - STOP
      - STOP_LIMIT
      - TRAILING_STOP
      - MARKET_ON_CLOSE
      - EXERCISE
      - TRAILING_STOP_LIMIT
      - NET_DEBIT
      - NET_CREDIT
      - NET_ZERO
    type: string
  PeriodType:
    enum:
      - day
      - month
      - year
      - ytd
    type: string
  Positions:
    items:
      $ref: '#/definitions/Positions_inner'
    type: array
  Positions_inner:
    properties:
      agedQuantity:
        format: double
        type: number
      averagePrice:
        format: double
        type: number
      currentDayProfitLoss:
        format: double
        type: number
      currentDayProfitLossPercentage:
        format: double
        type: number
      instrument:
        properties:
          schema:
            $ref: '#/definitions/Instrument'
      longQuantity:
        format: double
        type: number
      settledLongQuantity:
        format: double
        type: number
      settledShortQuantity:
        format: double
        type: number
      shortQuantity:
        format: double
        type: number
    type: object
  PostAccessBody:
    description: Body Parmeers for the Post Access Token Endpoint
    properties:
      access_type:
        description: >-
          Set to offline to receive a refresh token on an authorization_code
          grant type request. Do not set to offline on a refresh_token grant
          type request.
        type: string
      client_id:
        description: OAuth User ID of your application
        type: integer
      code:
        description: Required if trying to use authorization code grant
        type: string
      grant_type:
        description: >-
          The grant type of the oAuth scheme. Possible values are
          authorization_code, refresh_token
        type: string
      redirect_uri:
        description: Required if trying to use authorization code grant
        type: string
      refresh_token:
        description: Required if using refresh token grant
        type: string
    required:
      - client_id
      - grant_type
    type: object
  Preferences:
    example:
      authTokenTimeout: FIFTY_FIVE_MINUTES
      defaultAdvancedToolLaunch: TA
      defaultEquityOrderDuration: DAY
      defaultEquityOrderLegInstruction: BUY
      defaultEquityOrderMarketSession: AM
      defaultEquityOrderPriceLinkType: VALUE
      defaultEquityOrderType: MARKET
      defaultEquityQuantity: 0
      directEquityRouting: false
      directOptionsRouting: false
      expressTrading: false
      mutualFundTaxLotMethod:
        schema: FIFO
    properties:
      authTokenTimeout:
        enum:
          - FIFTY_FIVE_MINUTES
          - TWO_HOURS
          - FOUR_HOURS
          - EIGHT_HOURS
        type: string
      defaultAdvancedToolLaunch:
        enum:
          - TA
          - 'N'
          - 'Y'
          - TOS
          - NONE
          - CC2
        type: string
      defaultEquityOrderDuration:
        enum:
          - DAY
          - GOOD_TILL_CANCEL
          - NONE
        type: string
      defaultEquityOrderLegInstruction:
        enum:
          - BUY
          - SELL
          - BUY_TO_COVER
          - SELL_SHORT
          - NONE
        type: string
      defaultEquityOrderMarketSession:
        enum:
          - AM
          - PM
          - NORMAL
          - SEAMLESS
          - NONE
        type: string
      defaultEquityOrderPriceLinkType:
        enum:
          - VALUE
          - PERCENT
          - NONE
        type: string
      defaultEquityOrderType:
        enum:
          - MARKET
          - LIMIT
          - STOP
          - STOP_LIMIT
          - TRAILING_STOP
          - MARKET_ON_CLOSE
          - NONE
        type: string
      defaultEquityQuantity:
        format: int32
        minimum: 0
        type: integer
      directEquityRouting:
        default: false
        type: boolean
      directOptionsRouting:
        default: false
        type: boolean
      equityTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
      expressTrading:
        default: false
        type: boolean
      mutualFundTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
      optionTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
    required:
      - authTokenTimeout
      - defaultAdvancedToolLaunch
      - defaultEquityOrderDuration
      - defaultEquityOrderLegInstruction
      - defaultEquityOrderMarketSession
      - defaultEquityOrderPriceLinkType
      - defaultEquityOrderType
      - defaultEquityQuantity
      - equityTaxLotMethod
      - expressTrading
      - mutualFundTaxLotMethod
      - optionTaxLotMethod
    type: object
  PutCall:
    enum:
      - PUT
      - CALL
    type: string
  SearchInstrument:
    example:
      $ref: '#/x-components/examples/instrumentExample'
    properties:
      assetType:
        enum:
          - EQUITY
          - ETF
          - FOREX
          - FUTURE
          - FUTURE_OPTION
          - INDEX
          - INDICATOR
          - MUTUAL_FUND
          - OPTION
          - UNKNOWN
        type: string
      cusip:
        type: string
      description:
        type: string
      exchange:
        type: string
      symbol:
        type: string
    type: object
  SearchInstrumentResponse:
    additionalProperties:
      example:
        $ref: '#/x-components/examples/instrumentExample'
      properties:
        schemas:
          discriminator:
            mapping:
              BOND: '#/components/schemas/Bond'
            propertyName: assetType
          oneOf:
            - $ref: '#/definitions/SearchInstrument'
            - $ref: '#/definitions/Bond'
            - $ref: '#/definitions/FundamentalData'
            - $ref: '#/definitions/Fundamental'
      type: object
    type: object
  SecuritiesAccount:
    example:
      schema: ''
    properties:
      schema: {}
    type: object
  Session:
    enum:
      - NORMAL
      - AM
      - PM
      - SEAMLESS
    type: string
  Strategy:
    enum:
      - SINGLE
      - ANALYTICAL
      - COVERED
      - VERTICAL
      - CALENDAR
      - STRANGLE
      - STRADDLE
      - BUTTERFLY
      - CONDOR
      - DIAGONAL
      - COLLAR
      - ROLL
    type: string
  StrikePriceMap:
    type: object
  SubscriptionKey:
    example:
      keys:
        - key: key
        - key: key
    properties:
      keys:
        items:
          $ref: '#/definitions/SubscriptionKey_keys'
        type: array
    type: object
  SubscriptionKey_keys:
    example:
      key: key
    properties:
      key:
        type: string
    type: object
  Transaction:
    example:
      accruedInterest: 2.3021358869347655
      achStatus: Approved
      cashBalanceEffectFlag: false
      clearingReferenceNumber: clearingReferenceNumber
      dayTradeBuyingPowerEffect: 1.4658129805029452
      description: description
      fees:
        key: 7.061401241503109
      netAmount: 5.962133916683182
      orderDate: '2000-01-23T04:56:07.000Z'
      orderId: orderId
      requirementReallocationAmount: 6.027456183070403
      settlementDate: '2000-01-23T04:56:07.000Z'
      sma: 0.8008281904610115
      subAccount: subAccount
      transactionDate: '2000-01-23T04:56:07.000Z'
      transactionId: 5
      transactionItem:
        accountId: 9
        amount: 3.616076749251911
        cost: 4.145608029883936
        instruction: BUY
        instrument:
          assetType: EQUITY
          bondInterestRate: 1.0246457001441578
          bondMaturityDate: '2000-01-23T04:56:07.000Z'
          cusip: cusip
          description: description
          optionExpirationDate: '2000-01-23T04:56:07.000Z'
          optionStrikePrice: 1.2315135367772556
          putCall: PUT
          symbol: symbol
          underlyingSymbol: underlyingSymbol
        parentChildIndicator: parentChildIndicator
        parentOrderKey: 7
        positionEffect: OPENING
        price: 2.027123023002322
      transactionSubType: transactionSubType
      type: TRADE
    properties:
      accruedInterest:
        format: double
        type: number
      achStatus:
        enum:
          - Approved
          - Rejected
          - Cancel
          - Error
        type: string
      cashBalanceEffectFlag:
        default: false
        type: boolean
      clearingReferenceNumber:
        type: string
      dayTradeBuyingPowerEffect:
        format: double
        type: number
      description:
        type: string
      fees:
        additionalProperties:
          format: double
          type: number
        type: object
      netAmount:
        format: double
        type: number
      orderDate:
        format: date-time
        type: string
      orderId:
        type: string
      requirementReallocationAmount:
        format: double
        type: number
      settlementDate:
        format: date-time
        type: string
      sma:
        format: double
        type: number
      subAccount:
        type: string
      transactionDate:
        format: date-time
        type: string
      transactionId:
        format: int64
        type: integer
      transactionItem:
        $ref: '#/definitions/Transaction_transactionItem'
      transactionSubType:
        type: string
      type:
        enum:
          - TRADE
          - RECEIVE_AND_DELIVER
          - DIVIDEND_OR_INTEREST
          - ACH_RECEIPT
          - ACH_DISBURSEMENT
          - CASH_RECEIPT
          - CASH_DISBURSEMENT
          - ELECTRONIC_FUND
          - WIRE_OUT
          - WIRE_IN
          - JOURNAL
          - MEMORANDUM
          - MARGIN_CALL
          - MONEY_MARKET
          - SMA_ADJUSTMENT
        type: string
    type: object
  Transaction_transactionItem:
    example:
      accountId: 9
      amount: 3.616076749251911
      cost: 4.145608029883936
      instruction: BUY
      instrument:
        assetType: EQUITY
        bondInterestRate: 1.0246457001441578
        bondMaturityDate: '2000-01-23T04:56:07.000Z'
        cusip: cusip
        description: description
        optionExpirationDate: '2000-01-23T04:56:07.000Z'
        optionStrikePrice: 1.2315135367772556
        putCall: PUT
        symbol: symbol
        underlyingSymbol: underlyingSymbol
      parentChildIndicator: parentChildIndicator
      parentOrderKey: 7
      positionEffect: OPENING
      price: 2.027123023002322
    properties:
      accountId:
        format: int32
        type: integer
      amount:
        format: double
        type: number
      cost:
        format: double
        type: number
      instruction:
        enum:
          - BUY
          - SELL
        type: string
      instrument:
        $ref: '#/definitions/Transaction_transactionItem_instrument'
      parentChildIndicator:
        type: string
      parentOrderKey:
        format: int32
        type: integer
      positionEffect:
        enum:
          - OPENING
          - CLOSING
          - AUTOMATIC
        type: string
      price:
        format: double
        type: number
    type: object
  Transaction_transactionItem_instrument:
    example:
      assetType: EQUITY
      bondInterestRate: 1.0246457001441578
      bondMaturityDate: '2000-01-23T04:56:07.000Z'
      cusip: cusip
      description: description
      optionExpirationDate: '2000-01-23T04:56:07.000Z'
      optionStrikePrice: 1.2315135367772556
      putCall: PUT
      symbol: symbol
      underlyingSymbol: underlyingSymbol
    properties:
      assetType:
        enum:
          - EQUITY
          - MUTUAL_FUND
          - OPTION
          - FIXED_INCOME
          - CASH_EQUIVALENT
        type: string
      bondInterestRate:
        format: double
        type: number
      bondMaturityDate:
        format: date-time
        type: string
      cusip:
        type: string
      description:
        type: string
      optionExpirationDate:
        format: date-time
        type: string
      optionStrikePrice:
        format: double
        type: number
      putCall:
        enum:
          - PUT
          - CALL
        type: string
      symbol:
        type: string
      underlyingSymbol:
        type: string
    type: object
  Underlying:
    properties:
      ask:
        format: double
        type: number
      askSize:
        format: int32
        type: integer
      bid:
        format: double
        type: number
      bidSize:
        format: int32
        type: integer
      change:
        format: double
        type: number
      close:
        format: double
        type: number
      delayed:
        type: boolean
      description:
        type: string
      exchangeName:
        enum:
          - IND
          - ASE
          - NYS
          - NAS
          - NAP
          - PAC
          - OPR
          - BATS
        type: string
      fiftyTwoWeekHigh:
        format: double
        type: number
      fiftyTwoWeekLow:
        format: double
        type: number
      highePrice:
        format: double
        type: number
      last:
        format: double
        type: number
      lowPrice:
        format: double
        type: number
      makrPercentChange:
        format: double
        type: number
      mark:
        format: double
        type: number
      markChange:
        format: double
        type: number
      openPrice:
        format: double
        type: number
      percentChange:
        format: double
        type: number
      quoteTime:
        format: int64
        type: integer
      symbol:
        type: string
      totalVolume:
        format: int64
        type: integer
      tradeTime:
        format: int64
        type: integer
    type: object
  UserPrincipal:
    example:
      accessLevel: accessLevel
      accounts:
        - accountCdDomainId: accountCdDomainId
          accountId: accountId
          acl: acl
          authorizations:
            advancedMargin: false
            apex: false
            levelTwoQuotes: false
            marginTrading: false
            optionTradingLevel: COVERED
            scottradeAccount: false
            stockTrading: false
            streamerAccess: false
            streamingNews: false
          company: company
          description: description
          displayName: displayName
          preferences:
            authTokenTimeout: FIFTY_FIVE_MINUTES
            defaultAdvancedToolLaunch: TA
            defaultEquityOrderDuration: DAY
            defaultEquityOrderLegInstruction: BUY
            defaultEquityOrderMarketSession: AM
            defaultEquityOrderPriceLinkType: VALUE
            defaultEquityOrderType: MARKET
            defaultEquityQuantity: 0
            directEquityRouting: false
            directOptionsRouting: false
            expressTrading: false
            mutualFundTaxLotMethod:
              schema: FIFO
          segment: segment
          surrogateIds:
            key: surrogateIds
        - accountCdDomainId: accountCdDomainId
          accountId: accountId
          acl: acl
          authorizations:
            advancedMargin: false
            apex: false
            levelTwoQuotes: false
            marginTrading: false
            optionTradingLevel: COVERED
            scottradeAccount: false
            stockTrading: false
            streamerAccess: false
            streamingNews: false
          company: company
          description: description
          displayName: displayName
          preferences:
            authTokenTimeout: FIFTY_FIVE_MINUTES
            defaultAdvancedToolLaunch: TA
            defaultEquityOrderDuration: DAY
            defaultEquityOrderLegInstruction: BUY
            defaultEquityOrderMarketSession: AM
            defaultEquityOrderPriceLinkType: VALUE
            defaultEquityOrderType: MARKET
            defaultEquityQuantity: 0
            directEquityRouting: false
            directOptionsRouting: false
            expressTrading: false
            mutualFundTaxLotMethod:
              schema: FIFO
          segment: segment
          surrogateIds:
            key: surrogateIds
      authToken: authToken
      lastLoginTime: '2000-01-23T04:56:07.000Z'
      loginTime: '2000-01-23T04:56:07.000Z'
      primaryAccountId: primaryAccountId
      professionalStatus: PROFESSIONAL
      quotes:
        isAmexDelayed: false
        isCmeDelayed: false
        isForexDelayed: false
        isIceDelayed: false
        isNasdaqDelayed: false
        isNyseDelayed: false
        isOpraDelayed: false
      stalePassword: false
      streamerInfo:
        accessLevel: accessLevel
        acl: acl
        appId: appId
        streamerBinaryUrl: streamerBinaryUrl
        streamerSocketUrl: streamerSocketUrl
        token: token
        tokenTimestamp: '2000-01-23T04:56:07.000Z'
        userGroup: userGroup
      streamerSubscriptionKeys:
        schema:
          keys:
            - key: key
            - key: key
      tokenExpirationTime: '2000-01-23T04:56:07.000Z'
      userCdDomainId: userCdDomainId
      userId: userId
    properties:
      accessLevel:
        type: string
      accounts:
        items:
          $ref: '#/definitions/UserPrincipal_accounts'
        type: array
      authToken:
        type: string
      lastLoginTime:
        format: date-time
        type: string
      loginTime:
        format: date-time
        type: string
      primaryAccountId:
        type: string
      professionalStatus:
        enum:
          - PROFESSIONAL
          - NON_PROFESSIONAL
          - UNKNOWN_STATUS
        type: string
      quotes:
        $ref: '#/definitions/UserPrincipal_quotes'
      stalePassword:
        default: false
        type: boolean
      streamerInfo:
        $ref: '#/definitions/UserPrincipal_streamerInfo'
      streamerSubscriptionKeys:
        $ref: '#/definitions/UserPrincipal_streamerSubscriptionKeys'
      tokenExpirationTime:
        format: date-time
        type: string
      userCdDomainId:
        type: string
      userId:
        type: string
    type: object
  UserPrincipal_accounts:
    example:
      accountCdDomainId: accountCdDomainId
      accountId: accountId
      acl: acl
      authorizations:
        advancedMargin: false
        apex: false
        levelTwoQuotes: false
        marginTrading: false
        optionTradingLevel: COVERED
        scottradeAccount: false
        stockTrading: false
        streamerAccess: false
        streamingNews: false
      company: company
      description: description
      displayName: displayName
      preferences:
        authTokenTimeout: FIFTY_FIVE_MINUTES
        defaultAdvancedToolLaunch: TA
        defaultEquityOrderDuration: DAY
        defaultEquityOrderLegInstruction: BUY
        defaultEquityOrderMarketSession: AM
        defaultEquityOrderPriceLinkType: VALUE
        defaultEquityOrderType: MARKET
        defaultEquityQuantity: 0
        directEquityRouting: false
        directOptionsRouting: false
        expressTrading: false
        mutualFundTaxLotMethod:
          schema: FIFO
      segment: segment
      surrogateIds:
        key: surrogateIds
    properties:
      accountCdDomainId:
        type: string
      accountId:
        type: string
      acl:
        type: string
      authorizations:
        $ref: '#/definitions/UserPrincipal_authorizations'
      company:
        type: string
      description:
        type: string
      displayName:
        type: string
      preferences:
        $ref: '#/definitions/UserPrincipal_preferences'
      segment:
        type: string
      surrogateIds:
        additionalProperties:
          type: string
        type: object
    type: object
  UserPrincipal_authorizations:
    example:
      advancedMargin: false
      apex: false
      levelTwoQuotes: false
      marginTrading: false
      optionTradingLevel: COVERED
      scottradeAccount: false
      stockTrading: false
      streamerAccess: false
      streamingNews: false
    properties:
      advancedMargin:
        default: false
        type: boolean
      apex:
        default: false
        type: boolean
      levelTwoQuotes:
        default: false
        type: boolean
      marginTrading:
        default: false
        type: boolean
      optionTradingLevel:
        enum:
          - COVERED
          - FULL
          - LONG
          - SPREAD
          - NONE
        type: string
      scottradeAccount:
        default: false
        type: boolean
      stockTrading:
        default: false
        type: boolean
      streamerAccess:
        default: false
        type: boolean
      streamingNews:
        default: false
        type: boolean
    type: object
  UserPrincipal_preferences:
    example:
      authTokenTimeout: FIFTY_FIVE_MINUTES
      defaultAdvancedToolLaunch: TA
      defaultEquityOrderDuration: DAY
      defaultEquityOrderLegInstruction: BUY
      defaultEquityOrderMarketSession: AM
      defaultEquityOrderPriceLinkType: VALUE
      defaultEquityOrderType: MARKET
      defaultEquityQuantity: 0
      directEquityRouting: false
      directOptionsRouting: false
      expressTrading: false
      mutualFundTaxLotMethod:
        schema: FIFO
    properties:
      authTokenTimeout:
        enum:
          - FIFTY_FIVE_MINUTES
          - TWO_HOURS
          - FOUR_HOURS
          - EIGHT_HOURS
        type: string
      defaultAdvancedToolLaunch:
        enum:
          - TA
          - 'N'
          - 'Y'
          - TOS
          - NONE
          - CC2
        type: string
      defaultEquityOrderDuration:
        enum:
          - DAY
          - GOOD_TILL_CANCEL
          - NONE
        type: string
      defaultEquityOrderLegInstruction:
        enum:
          - BUY
          - SELL
          - BUY_TO_COVER
          - SELL_SHORT
          - NONE
        type: string
      defaultEquityOrderMarketSession:
        enum:
          - AM
          - PM
          - NORMAL
          - SEAMLESS
          - NONE
        type: string
      defaultEquityOrderPriceLinkType:
        enum:
          - VALUE
          - PERCENT
          - NONE
        type: string
      defaultEquityOrderType:
        enum:
          - MARKET
          - LIMIT
          - STOP
          - STOP_LIMIT
          - TRAILING_STOP
          - MARKET_ON_CLOSE
          - NONE
        type: string
      defaultEquityQuantity:
        format: int32
        minimum: 0
        type: integer
      directEquityRouting:
        default: false
        type: boolean
      directOptionsRouting:
        default: false
        type: boolean
      equityTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
      expressTrading:
        default: false
        type: boolean
      mutualFundTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
      optionTaxLotMethod:
        $ref: '#/definitions/UserPrincipal_preferences_mutualFundTaxLotMethod'
    type: object
  UserPrincipal_preferences_mutualFundTaxLotMethod:
    example:
      schema: FIFO
    properties:
      schema:
        $ref: '#/definitions/LotMethod'
  UserPrincipal_quotes:
    example:
      isAmexDelayed: false
      isCmeDelayed: false
      isForexDelayed: false
      isIceDelayed: false
      isNasdaqDelayed: false
      isNyseDelayed: false
      isOpraDelayed: false
    properties:
      isAmexDelayed:
        default: false
        type: boolean
      isCmeDelayed:
        default: false
        type: boolean
      isForexDelayed:
        default: false
        type: boolean
      isIceDelayed:
        default: false
        type: boolean
      isNasdaqDelayed:
        default: false
        type: boolean
      isNyseDelayed:
        default: false
        type: boolean
      isOpraDelayed:
        default: false
        type: boolean
    type: object
  UserPrincipal_streamerInfo:
    example:
      accessLevel: accessLevel
      acl: acl
      appId: appId
      streamerBinaryUrl: streamerBinaryUrl
      streamerSocketUrl: streamerSocketUrl
      token: token
      tokenTimestamp: '2000-01-23T04:56:07.000Z'
      userGroup: userGroup
    properties:
      accessLevel:
        type: string
      acl:
        type: string
      appId:
        type: string
      streamerBinaryUrl:
        type: string
      streamerSocketUrl:
        type: string
      token:
        type: string
      tokenTimestamp:
        format: date-time
        type: string
      userGroup:
        type: string
    type: object
  UserPrincipal_streamerSubscriptionKeys:
    example:
      schema:
        keys:
          - key: key
          - key: key
    properties:
      schema:
        $ref: '#/definitions/SubscriptionKey'
  WatchList:
    example:
      accountId: accountId
      name: name
      status: UNCHANGED
      watchlistId: watchlistId
      watchlistItems:
        - averagePrice: 0.14658129805029452
          commission: 0.5962133916683182
          instrument:
            assetType: EQUITY
            description: description
            symbol: symbol
          purchasedDate: {}
          quantity: 6.027456183070403
          sequenceId: 0
          status: UNCHANGED
        - averagePrice: 0.14658129805029452
          commission: 0.5962133916683182
          instrument:
            assetType: EQUITY
            description: description
            symbol: symbol
          purchasedDate: {}
          quantity: 6.027456183070403
          sequenceId: 0
          status: UNCHANGED
    properties:
      accountId:
        type: string
      name:
        type: string
      status:
        enum:
          - UNCHANGED
          - CREATED
          - UPDATED
          - DELETED
        type: string
      watchlistId:
        type: string
      watchlistItems:
        items:
          $ref: '#/definitions/WatchList_watchlistItems'
        type: array
    required:
      - watchlistItems
    type: object
  WatchListRequest:
    properties:
      name:
        type: string
      watchlistId:
        type: string
      watchlistItems:
        items:
          $ref: '#/definitions/WatchListRequest_watchlistItems'
        type: array
    required:
      - name
      - watchlistItems
    type: object
  WatchListRequest_instrument:
    properties:
      assetType:
        enum:
          - EQUITY
          - OPTION
          - MUTUAL_FUND
          - FIXED_INCOME
          - INDEX
        type: string
      symbol:
        type: string
    type: object
  WatchListRequest_watchlistItems:
    properties:
      averagePrice:
        format: double
        minimum: 0
        type: number
      commission:
        format: double
        minimum: 0
        type: number
      instrument:
        $ref: '#/definitions/WatchListRequest_instrument'
      purchasedDate:
        type: object
      quantity:
        format: double
        type: number
      sequenceId:
        format: int32
        minimum: 0
        type: integer
    type: object
  WatchListResponse:
    additionalProperties:
      example:
        schema:
          accountId: accountId
          name: name
          status: UNCHANGED
          watchlistId: watchlistId
          watchlistItems:
            - averagePrice: 0.14658129805029452
              commission: 0.5962133916683182
              instrument:
                assetType: EQUITY
                description: description
                symbol: symbol
              purchasedDate: {}
              quantity: 6.027456183070403
              sequenceId: 0
              status: UNCHANGED
            - averagePrice: 0.14658129805029452
              commission: 0.5962133916683182
              instrument:
                assetType: EQUITY
                description: description
                symbol: symbol
              purchasedDate: {}
              quantity: 6.027456183070403
              sequenceId: 0
              status: UNCHANGED
      properties:
        schema:
          $ref: '#/definitions/WatchList'
      type: object
    type: object
  WatchList_instrument:
    example:
      assetType: EQUITY
      description: description
      symbol: symbol
    properties:
      assetType:
        enum:
          - EQUITY
          - OPTION
          - MUTUAL_FUND
          - FIXED_INCOME
          - INDEX
        type: string
      description:
        type: string
      symbol:
        type: string
    type: object
  WatchList_watchlistItems:
    example:
      averagePrice: 0.14658129805029452
      commission: 0.5962133916683182
      instrument:
        assetType: EQUITY
        description: description
        symbol: symbol
      purchasedDate: {}
      quantity: 6.027456183070403
      sequenceId: 0
      status: UNCHANGED
    properties:
      averagePrice:
        format: double
        minimum: 0
        type: number
      commission:
        format: double
        minimum: 0
        type: number
      instrument:
        $ref: '#/definitions/WatchList_instrument'
      purchasedDate:
        type: object
      quantity:
        format: double
        type: number
      sequenceId:
        format: int32
        minimum: 0
        type: integer
      status:
        enum:
          - UNCHANGED
          - CREATED
          - UPDATED
          - DELETED
        type: string
    type: object
securityDefinitions:
  application:
    authorizationUrl: >-
      https://auth.tdameritrade.com/auth?response_type=code&redirect_uri=http%3A%2F%2Flocalhost&client_id=YHJUQFCHRMJ7XODGVGGPINB05SCG2H45%40AMER.OAUTHAP
    flow: accessCode
    scopes: {}
    tokenUrl: /oauth2/token
    type: oauth2
  bearerAuth:
    in: header
    name: Authorization
    type: apiKey
security:
  - application:
      - read
      - write
x-components:
  examples:
    bondExample:
      value:
        assetType: BOND
        bondPrice: 11
        cusip: christopherqueen
        descriptions: Chris Queen Madeup Bond
        exchange: CDQ
        symbol: cdq
    fundamentalDataExample:
      value:
        beta: 0.51493
        bookValuePerShare: 0
        currentRatio: 79.54602
        divGrowthRate3Year: 0
        dividendAmount: 0
        dividendPayAmount: 0
        dividendPayDate: 0
        dividendYield: 0
        epsChange: 0
        epsChangePercentTTM: 7.09258
        epsChangeYear: 0
        epsTTM: 0
        grossMarginMRQ: 0
        grossMarginTTM: 0
        high52: 12.845
        interestCoverage: '0,'
        low52: 4.65
        ltDebtToEquity: 80.56223
        marketCap: 2855.913
        marketCapFloat: 239.4534
        netProfitMarginMRQ: 0
        netProfitMarginTTM: 0
        operatingMarginMRQ: 0
        operatingMarginTTM: 0
        pbRatio: 21.99646
        pcfRatio: 0
        peRatio: 0
        pegRatio: 0
        prRatio: 0
        quickRatio: 0
        returnOnAssets: 0
        returnOnEquity: 0
        returnOnInvestment: 0
        revChangeIn: 0
        revChangeTTM: 0
        revChangeYear: 0
        sharesOutstanding: 328671632
        shortIntDayToCover: 0
        shortIntToFloat: 0
        symbol: NG
        totalDebtToCapital: 44.61743
        totalDebtToEquity: 80.56223
        vol10DayAvg: 3357303
        vol1DayAvg: 3357300
        vol3MonthAvg: 77925210
    fundamentalExample:
      value:
        NG:
          assetType: EQUITY
          cusip: 6.6987e+210
          description: Novagold Resources Inc.
          exchange: AMEX
          fundamental:
            beta: 0.51493
            bookValuePerShare: 0
            currentRatio: 79.54602
            divGrowthRate3Year: 0
            dividendAmount: 0
            dividendPayAmount: 0
            dividendPayDate: 0
            dividendYield: 0
            epsChange: 0
            epsChangePercentTTM: 7.09258
            epsChangeYear: 0
            epsTTM: 0
            grossMarginMRQ: 0
            grossMarginTTM: 0
            high52: 12.845
            interestCoverage: '0,'
            low52: 4.65
            ltDebtToEquity: 80.56223
            marketCap: 2855.913
            marketCapFloat: 239.4534
            netProfitMarginMRQ: 0
            netProfitMarginTTM: 0
            operatingMarginMRQ: 0
            operatingMarginTTM: 0
            pbRatio: 21.99646
            pcfRatio: 0
            peRatio: 0
            pegRatio: 0
            prRatio: 0
            quickRatio: 0
            returnOnAssets: 0
            returnOnEquity: 0
            returnOnInvestment: 0
            revChangeIn: 0
            revChangeTTM: 0
            revChangeYear: 0
            sharesOutstanding: 328671632
            shortIntDayToCover: 0
            shortIntToFloat: 0
            symbol: NG
            totalDebtToCapital: 44.61743
            totalDebtToEquity: 80.56223
            vol10DayAvg: 3357303
            vol1DayAvg: 3357300
            vol3MonthAvg: 77925210'
          symbol: NG
    instrumentExample:
      value:
        assetType: EQUITY
        cusip: 6.6987e+210
        description: Novagold Resources Inc.
        exchange: AMEX
        symbol: NG

