openapi: 3.0.0 info: description: TD Ameritrade API version: 3.0.1 title: TD Ameritrade Accounts and Trading API termsOfService: https://developer.tdameritrade.com/legal contact: email: austin.millan@protonmail.com servers: - url: https://api.tdameritrade.com/v2 - url: http://api.tdameritrade.com/v2 tags: - name: Accounts and Trading paths: /accounts/{accountId}/orders/{orderId}: delete: tags: - Accounts and Trading summary: Cancel Order description: 'Cancel a specific order for a specific account. ' operationId: cancelOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: orderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '404': description: An error message if the order was not found. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] put: tags: - Accounts and Trading summary: Replace Order 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. operationId: replaceOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: orderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 requestBody: $ref: '#/components/requestBodies/Order' responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '404': description: An error message if the order was not found. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] get: tags: - Accounts and Trading summary: Get Order description: Get a specific order for a specific account. operationId: getOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: orderId in: path description: Order Number required: true schema: type: integer format: int64 responses: '200': description: A Order object content: application/json: schema: $ref: '#/components/schemas/Order' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /accounts/{accountId}/orders: get: tags: - Accounts and Trading summary: Get Orders By Path description: Orders for a specific account. operationId: getOrdersByPath parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: maxResults in: query description: The maximum number of orders to retrieve. required: true schema: type: integer - name: fromEnteredTime in: query description: Specifies that no orders entered before this time should be returned. Valid ISO-8601 formats are yyyy-MM-dd and yyyy-MM-dd'T'HH:mm:ssz Date must be within 60 days from today's date. 'toEnteredTime' must also be set. required: true schema: type: string - name: toEnteredTime in: query description: Specifies that no orders entered after this time should be returned.Valid ISO-8601 formats are :yyyy-MM-dd and yyyy-MM-dd'T'HH:mm:ssz. 'fromEnteredTime' must also be set. required: true schema: type: string format: string maximum: 0 - name: status in: query description: The maximum number of orders to retrieve. required: true schema: type: integer format: int64 maximum: 0 responses: '200': description: A Order object content: application/json: schema: $ref: '#/components/schemas/Order' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] post: tags: - Accounts and Trading summary: Place Order description: Place an order for a specific account. operationId: placeOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string requestBody: $ref: '#/components/requestBodies/Order' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Order' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /orders: get: tags: - Accounts and Trading summary: Get Orders By Query description: All orders for a specific account or, if account ID isn't specified, orders will be returned for all linked accounts operationId: getOrdersByQuery parameters: - name: accountId in: query description: Account Number required: true schema: type: integer format: string - name: maxResults in: query description: The maximum number of orders to retrieve. required: true schema: type: integer - name: fromEnteredTime in: query description: Specifies that no orders entered before this time should be returned. Valid ISO-8601 formats are yyyy-MM-dd and yyyy-MM-dd'T'HH:mm:ssz Date must be within 60 days from today's date. 'toEnteredTime' must also be set. required: true schema: type: string - name: toEnteredTime in: query description: Specifies that no orders entered after this time should be returned.Valid ISO-8601 formats are :yyyy-MM-dd and yyyy-MM-dd'T'HH:mm:ssz. 'fromEnteredTime' must also be set. required: true schema: type: string format: string maximum: 0 - name: status in: query description: The maximum number of orders to retrieve. required: true schema: type: integer format: int64 maximum: 0 responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /accounts/{accountId}/savedorders: get: tags: - Accounts and Trading summary: Get Saved Orders by Path description: Saved orders for a specific account. operationId: getSavedOrdersByPath parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string responses: '200': description: A Order object content: application/json: schema: type: array items: $ref: '#/components/schemas/SavedOrder' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] post: tags: - Accounts and Trading summary: Create Saved Order description: 'Save an order for a specific account. ' operationId: saveOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: orderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 requestBody: content: application/json: schema: $ref: '#/components/schemas/SavedOrder' description: The order to save. responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /accounts/{accountId}/savedorders/{savedOrderId}: delete: tags: - Accounts and Trading summary: Delete Saved Order description: Delete a specific saved order for a specific account. operationId: deleteSavedOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: savedOrderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] get: tags: - Accounts and Trading summary: Get Saved Order description: Specific saved order by its ID, for a specific account. operationId: getSavedOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: savedOrderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 responses: '200': description: A Order object content: application/json: schema: $ref: '#/components/schemas/Order' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] put: tags: - Accounts and Trading summary: Replace Saved Order description: Replace an existing saved order for an account. The existing saved order will be replaced by the new order. operationId: replaceSavedOrder parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string - name: savedOrderId in: path description: Order Number required: true schema: type: integer format: int64 maximum: 0 requestBody: content: application/json: schema: $ref: '#/components/schemas/SavedOrder' description: The order to place. responses: '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '404': description: An error message if the order was not found. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /accounts/{accountId}: get: tags: - Accounts and Trading summary: Get Account description: Account balances, positions, and orders for a specific account. operationId: getAccount parameters: - name: accountId in: path description: Account Number required: true schema: type: integer format: string responses: '200': description: A Account Object content: application/json: schema: $ref: '#/components/schemas/Account' '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] /accounts: get: tags: - Accounts and Trading summary: Get Accounts description: Account balances, positions, and orders for a specific account. operationId: getAccounts responses: '200': description: A Account Object content: application/json: schema: $ref: '#/components/schemas/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. '400': description: An error message indicating the validation problem with the request. '401': description: An error message indicating the caller must pass a valid AuthToken in the HTTP authorization request header. '403': description: An error message indicating the caller is forbidden from accessing this page. '500': description: An error message indicating there was an unexpected server error. security: - Bearer: [] components: schemas: CashAccount: properties: accountId: example: string type: string currentBalances: properties: accruedInterest: example: 0 type: number bondValue: example: 0 type: number cashAvailableForTrading: example: 0 type: number cashAvailableForWithdrawal: example: 0 type: number cashBalance: example: 0 type: number cashCall: example: 0 type: number cashDebitCallValue: example: 0 type: number cashReceipts: example: 0 type: number liquidationValue: example: 0 type: number longMarketValue: example: 0 type: number longNonMarginableMarketValue: example: 0 type: number longOptionMarketValue: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number pendingDeposits: example: 0 type: number savings: example: 0 type: number shortMarketValue: example: 0 type: number shortOptionMarketValue: example: 0 type: number totalCash: example: 0 type: number unsettledCash: example: 0 type: number type: object initialBalances: properties: accountValue: example: 0 type: number accruedInterest: example: 0 type: number bondValue: example: 0 type: number cashAvailableForTrading: example: 0 type: number cashAvailableForWithdrawal: example: 0 type: number cashBalance: example: 0 type: number cashDebitCallValue: example: 0 type: number cashReceipts: example: 0 type: number isInCall: type: boolean liquidationValue: example: 0 type: number longOptionMarketValue: example: 0 type: number longStockValue: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number pendingDeposits: example: 0 type: number shortOptionMarketValue: example: 0 type: number shortStockValue: example: 0 type: number unsettledCash: example: 0 type: number type: object isClosingOnlyRestricted: type: boolean isDayTrader: type: boolean orderStrategies: items: properties: accountId: example: 0 type: number activationPrice: example: 0 type: number cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object cancelable: type: boolean childOrderStrategies: items: type: object type: array closeTime: example: string type: string complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' editable: type: boolean enteredTime: example: string type: string filledQuantity: example: 0 type: number orderActivityCollection: items: $ref: '#/components/schemas/Execution' type: array orderId: example: 0 type: number orderLegCollection: items: properties: instruction: $ref: '#/components/schemas/Instruction' instrument: $ref: '#/components/schemas/InstrumentType' legId: example: 0 type: number orderLegType: $ref: '#/components/schemas/AssetType' positionEffect: $ref: '#/components/schemas/PositionEffect' quantity: example: 0 type: number quantityType: $ref: '#/components/schemas/QuantityType' type: object type: array orderStrategyType: $ref: '#/components/schemas/OrderStrategyType' orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number replacingOrderCollection: items: type: object type: array requestedDestination: $ref: '#/components/schemas/DestinationExchange' session: $ref: '#/components/schemas/Session' specialInstruction: $ref: '#/components/schemas/SpecialInstruction' status: $ref: '#/components/schemas/OrderStatus' statusDescription: example: string type: string stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' tag: example: string type: string taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object type: array positions: items: properties: agedQuantity: example: 0 type: number averagePrice: example: 0 type: number currentDayProfitLoss: example: 0 type: number currentDayProfitLossPercentage: example: 0 type: number instrument: $ref: '#/components/schemas/InstrumentType' longQuantity: example: 0 type: number marketValue: example: 0 type: number settledLongQuantity: example: 0 type: number settledShortQuantity: example: 0 type: number shortQuantity: example: 0 type: number type: object type: array projectedBalances: properties: accruedInterest: example: 0 type: number bondValue: example: 0 type: number cashAvailableForTrading: example: 0 type: number cashAvailableForWithdrawal: example: 0 type: number cashBalance: example: 0 type: number cashCall: example: 0 type: number cashDebitCallValue: example: 0 type: number cashReceipts: example: 0 type: number liquidationValue: example: 0 type: number longMarketValue: example: 0 type: number longNonMarginableMarketValue: example: 0 type: number longOptionMarketValue: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number pendingDeposits: example: 0 type: number savings: example: 0 type: number shortMarketValue: example: 0 type: number shortOptionMarketValue: example: 0 type: number totalCash: example: 0 type: number unsettledCash: example: 0 type: number type: object roundTrips: example: 0 type: number type: example: '''CASH'' or ''MARGIN''' type: string type: object QuantityType: enum: - ALL_SHARES - DOLLARS - SHARES example: '''ALL_SHARES'' or ''DOLLARS'' or ''SHARES''' type: string Option: properties: assetType: $ref: '#/components/schemas/AssetType' cusip: example: string type: string description: example: string type: string optionDeliverables: items: properties: assetType: $ref: '#/components/schemas/AssetType' currencyType: $ref: '#/components/schemas/CurrencyType' deliverableUnits: example: 0 type: number symbol: example: string type: string type: object type: array optionMultiplier: example: 0 type: number putCall: $ref: '#/components/schemas/PutOrCall' symbol: example: string type: string type: $ref: '#/components/schemas/OptionType' underlyingSymbol: example: string type: string type: object FixedIncome: properties: assetType: $ref: '#/components/schemas/AssetType' cusip: example: string type: string description: example: string type: string factor: example: 0 type: number maturityDate: example: string type: string symbol: example: string type: string variableRate: example: 0 type: number type: object MarginAccount: properties: accountId: example: string type: string currentBalances: properties: accruedInterest: example: 0 type: number availableFunds: example: 0 type: number availableFundsNonMarginableTrade: example: 0 type: number bondValue: example: 0 type: number buyingPower: example: 0 type: number buyingPowerNonMarginableTrade: example: 0 type: number cashBalance: example: 0 type: number cashReceipts: example: 0 type: number dayTradingBuyingPower: example: 0 type: number dayTradingBuyingPowerCall: example: 0 type: number equity: example: 0 type: number equityPercentage: example: 0 type: number isInCall: type: boolean liquidationValue: example: 0 type: number longMarginValue: example: 0 type: number longMarketValue: example: 0 type: number longOptionMarketValue: example: 0 type: number maintenanceCall: example: 0 type: number maintenanceRequirement: example: 0 type: number marginBalance: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number optionBuyingPower: example: 0 type: number pendingDeposits: example: 0 type: number regTCall: example: 0 type: number savings: example: 0 type: number shortBalance: example: 0 type: number shortMarginValue: example: 0 type: number shortMarketValue: example: 0 type: number shortOptionMarketValue: example: 0 type: number sma: example: 0 type: number stockBuyingPower: example: 0 type: number type: object initialBalances: properties: accountValue: example: 0 type: number accruedInterest: example: 0 type: number availableFundsNonMarginableTrade: example: 0 type: number bondValue: example: 0 type: number buyingPower: example: 0 type: number cashAvailableForTrading: example: 0 type: number cashBalance: example: 0 type: number cashReceipts: example: 0 type: number dayTradingBuyingPower: example: 0 type: number dayTradingBuyingPowerCall: example: 0 type: number dayTradingEquityCall: example: 0 type: number equity: example: 0 type: number equityPercentage: example: 0 type: number isInCall: type: boolean liquidationValue: example: 0 type: number longMarginValue: example: 0 type: number longOptionMarketValue: example: 0 type: number longStockValue: example: 0 type: number maintenanceCall: example: 0 type: number maintenanceRequirement: example: 0 type: number margin: example: 0 type: number marginBalance: example: 0 type: number marginEquity: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number pendingDeposits: example: 0 type: number regTCall: example: 0 type: number shortBalance: example: 0 type: number shortMarginValue: example: 0 type: number shortOptionMarketValue: example: 0 type: number shortStockValue: example: 0 type: number totalCash: example: 0 type: number unsettledCash: example: 0 type: number type: object isClosingOnlyRestricted: type: boolean isDayTrader: type: boolean orderStrategies: items: properties: accountId: example: 0 type: number activationPrice: example: 0 type: number cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object cancelable: type: boolean childOrderStrategies: items: type: object type: array closeTime: example: string type: string complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' editable: type: boolean enteredTime: example: string type: string filledQuantity: example: 0 type: number orderActivityCollection: $ref: '#/components/schemas/Execution' orderId: example: 0 type: number orderLegCollection: items: properties: instruction: $ref: '#/components/schemas/Instruction' instrument: $ref: '#/components/schemas/InstrumentType' legId: example: 0 type: number orderLegType: $ref: '#/components/schemas/AssetType' positionEffect: $ref: '#/components/schemas/PositionEffect' quantity: example: 0 type: number quantityType: $ref: '#/components/schemas/QuantityType' type: object type: array orderStrategyType: $ref: '#/components/schemas/OrderStrategyType' orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number replacingOrderCollection: items: type: object type: array requestedDestination: $ref: '#/components/schemas/DestinationExchange' session: $ref: '#/components/schemas/Session' specialInstruction: $ref: '#/components/schemas/SpecialInstruction' status: $ref: '#/components/schemas/OrderStatus' statusDescription: example: string type: string stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' tag: example: string type: string taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object type: array positions: items: properties: agedQuantity: example: 0 type: number averagePrice: example: 0 type: number currentDayProfitLoss: example: 0 type: number currentDayProfitLossPercentage: example: 0 type: number instrument: $ref: '#/components/schemas/InstrumentType' longQuantity: example: 0 type: number marketValue: example: 0 type: number settledLongQuantity: example: 0 type: number settledShortQuantity: example: 0 type: number shortQuantity: example: 0 type: number type: object type: array projectedBalances: properties: accruedInterest: example: 0 type: number availableFunds: example: 0 type: number availableFundsNonMarginableTrade: example: 0 type: number bondValue: example: 0 type: number buyingPower: example: 0 type: number buyingPowerNonMarginableTrade: example: 0 type: number cashBalance: example: 0 type: number cashReceipts: example: 0 type: number dayTradingBuyingPower: example: 0 type: number dayTradingBuyingPowerCall: example: 0 type: number equity: example: 0 type: number equityPercentage: example: 0 type: number isInCall: type: boolean liquidationValue: example: 0 type: number longMarginValue: example: 0 type: number longMarketValue: example: 0 type: number longOptionMarketValue: example: 0 type: number maintenanceCall: example: 0 type: number maintenanceRequirement: example: 0 type: number marginBalance: example: 0 type: number moneyMarketFund: example: 0 type: number mutualFundValue: example: 0 type: number optionBuyingPower: example: 0 type: number pendingDeposits: example: 0 type: number regTCall: example: 0 type: number savings: example: 0 type: number shortBalance: example: 0 type: number shortMarginValue: example: 0 type: number shortMarketValue: example: 0 type: number shortOptionMarketValue: example: 0 type: number sma: example: 0 type: number stockBuyingPower: example: 0 type: number type: object roundTrips: example: 0 type: number type: example: '''CASH'' or ''MARGIN''' type: string type: object PriceLinkBasis: enum: - MANUAL - BASE - TRIGGER - LAST - BID - ASK - ASK_BID - MARK - AVERAGE example: '''MANUAL'' or ''BASE'' or ''TRIGGER'' or ''LAST'' or ''BID'' or ''ASK'' or ''ASK_BID'' or ''MARK'' or ''AVERAGE''' type: string AccountType: oneOf: - $ref: '#/components/schemas/CashAccount' - $ref: '#/components/schemas/MarginAccount' type: object MutualFund: properties: assetType: $ref: '#/components/schemas/AssetType' cusip: example: string type: string description: example: string type: string symbol: example: string type: string type: example: '''NOT_APPLICABLE'' or ''OPEN_END_NON_TAXABLE'' or ''OPEN_END_TAXABLE'' or ''NO_LOAD_NON_TAXABLE'' or ''NO_LOAD_TAXABLE''' type: string type: object InstrumentType: oneOf: - $ref: '#/components/schemas/Option' - $ref: '#/components/schemas/MutualFund' - $ref: '#/components/schemas/CashEquivalent' - $ref: '#/components/schemas/Equity' - $ref: '#/components/schemas/FixedIncome' type: object Equity: properties: assetType: $ref: '#/components/schemas/AssetType' cusip: example: string type: string description: example: string type: string symbol: example: string type: string type: object StopType: enum: - STANDARD - BID - ASK - LAST - MARK example: '''STANDARD'' or ''BID'' or ''ASK'' or ''LAST'' or ''MARK''' type: string PositionEffect: enum: - OPENING - CLOSING - AUTOMATIC example: '''OPENING'' or ''CLOSING'' or ''AUTOMATIC''' type: string TaxLotMethod: enum: - FIFO - LIFO - HIGH_COST - LOW_COST - AVERAGE_COST - SPECIFIC_LOT example: '''FIFO'' or ''LIFO'' or ''HIGH_COST'' or ''LOW_COST'' or ''AVERAGE_COST'' or ''SPECIFIC_LOT''' type: string Duration: enum: - DAY - GOOD_TILL_CANCEL - FILL_OR_KILL example: '''DAY'' or ''GOOD_TILL_CANCEL'' or ''FILL_OR_KILL''' type: string Instruction: enum: - BUY - SELL - BUY_TO_COVER - BUY_TO_OPEN - BUY_TO_CLOSE - SELL_TO_OPEN - SELL_TO_CLOSE - EXCHANGE example: '''BUY'' or ''SELL'' or ''BUY_TO_COVER'' or ''SELL_SHORT'' or ''BUY_TO_OPEN'' or ''BUY_TO_CLOSE'' or ''SELL_TO_OPEN'' or ''SELL_TO_CLOSE'' or ''EXCHANGE''' type: string Session: enum: - NORMAL - SEAMLESS - AM - PM example: '''NORMAL'' or ''AM'' or ''PM'' or ''SEAMLESS''' type: string OrderType: enum: - MARKET - LIMIT - STOP - STOP_LIMIT - TRAILING_STOP - MARKET_ON_CLOSE - EXERCISE - TRAILING_STOP_LIMIT - NET_DEBIT - NET_CREDIT - NET_ZERO example: '''MARKET'' or ''LIMIT'' or ''STOP'' or ''STOP_LIMIT'' or ''TRAILING_STOP'' or ''MARKET_ON_CLOSE'' or ''EXERCISE'' or ''TRAILING_STOP_LIMIT'' or ''NET_DEBIT'' or ''NET_CREDIT'' or ''NET_ZERO''' type: string SpecialInstruction: enum: - ALL_OR_NONE - DO_NOT_REDUCE - ALL_OR_NONE_DO_NOT_REDUCE example: '''ALL_OR_NONE'' or ''DO_NOT_REDUCE'' or ''ALL_OR_NONE_DO_NOT_REDUCE''' type: string OrderStatus: enum: - AWAITING_PARENT_ORDER - AWAITING_CONDITION - AWAITING_MANUAL_REVIEW - ACCEPTED - AWAITING_UR_OUT - PENDING_ACTIVATION - WORKING - REJECTED - QUEUED - PENDING_CANCEL - CANCELED - PENDING_REPLACE - REPLACED - FILLED - EXPIRED example: '''AWAITING_PARENT_ORDER'' or ''AWAITING_CONDITION'' or ''AWAITING_MANUAL_REVIEW'' or ''ACCEPTED'' or ''AWAITING_UR_OUT'' or ''PENDING_ACTIVATION'' or ''QUEUED'' or ''WORKING'' or ''REJECTED'' or ''PENDING_CANCEL'' or ''CANCELED'' or ''PENDING_REPLACE'' or ''REPLACED'' or ''FILLED'' or ''EXPIRED''' type: string DestinationExchange: enum: - INET - ECN_ARCA - CBOE - AMEX - PHLX - ISE - BOX - NYSE - NASDAQ - BATS - C2 - AUTO example: '''INET'' or ''ECN_ARCA'' or ''CBOE'' or ''AMEX'' or ''PHLX'' or ''ISE'' or ''BOX'' or ''NYSE'' or ''NASDAQ'' or ''BATS'' or ''C2'' or ''AUTO''' type: string PriceLinkType: enum: - VALUE - PERCENT - TICK example: '''VALUE'' or ''PERCENT'' or ''TICK''' type: string CurrencyType: enum: - USD - CAD - EUR - JPY example: '''USD'' or ''CAD'' or ''EUR'' or ''JPY''' 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 example: '''NONE'' or ''COVERED'' or ''VERTICAL'' or ''BACK_RATIO'' or ''CALENDAR'' or ''DIAGONAL'' or ''STRADDLE'' or ''STRANGLE'' or ''COLLAR_SYNTHETIC'' or ''BUTTERFLY'' or ''CONDOR'' or ''IRON_CONDOR'' or ''VERTICAL_ROLL'' or ''COLLAR_WITH_STOCK'' or ''DOUBLE_DIAGONAL'' or ''UNBALANCED_BUTTERFLY'' or ''UNBALANCED_CONDOR'' or ''UNBALANCED_IRON_CONDOR'' or ''UNBALANCED_VERTICAL_ROLL'' or ''CUSTOM''' type: string OrderStrategyType: enum: - SINGLE - OCO - TRIGGER example: '''SINGLE'' or ''OCO'' or ''TRIGGER''' type: string SavedOrder: properties: accountId: example: 0 type: number activationPrice: example: 0 type: number cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object cancelable: type: boolean childOrderStrategies: items: properties: accountId: example: 0 type: number activationPrice: example: 0 type: number cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object cancelable: type: boolean closeTime: example: string type: string complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' editable: type: boolean enteredTime: example: string type: string filledQuantity: example: 0 type: number orderActivityCollection: items: $ref: '#/components/schemas/Execution' type: array orderId: example: 0 type: number orderLegCollection: items: properties: instruction: $ref: '#/components/schemas/Instruction' instrument: $ref: '#/components/schemas/InstrumentType' legId: example: 0 type: number orderLegType: $ref: '#/components/schemas/AssetType' positionEffect: $ref: '#/components/schemas/PositionEffect' quantity: example: 0 type: number quantityType: $ref: '#/components/schemas/QuantityType' type: object type: array orderStrategyType: $ref: '#/components/schemas/OrderStrategyType' orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number replacingOrderCollection: items: type: object type: array requestedDestination: $ref: '#/components/schemas/DestinationExchange' session: $ref: '#/components/schemas/Session' specialInstruction: $ref: '#/components/schemas/SpecialInstruction' status: $ref: '#/components/schemas/OrderStatus' stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' tag: example: string type: string taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object type: array closeTime: example: string type: string complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' editable: type: boolean enteredTime: example: string type: string filledQuantity: example: 0 type: number orderActivityCollection: items: $ref: '#/components/schemas/Execution' type: array orderId: example: 0 type: number orderLegCollection: items: properties: instruction: $ref: '#/components/schemas/Instruction' instrument: $ref: '#/components/schemas/InstrumentType' legId: example: 0 type: number orderLegType: $ref: '#/components/schemas/AssetType' positionEffect: $ref: '#/components/schemas/PositionEffect' quantity: example: 0 type: number quantityType: $ref: '#/components/schemas/QuantityType' type: object type: array orderStrategyType: $ref: '#/components/schemas/OrderStrategyType' orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number requestedDestination: $ref: '#/components/schemas/DestinationExchange' savedOrderId: example: 0 type: number savedTime: example: string type: string session: $ref: '#/components/schemas/Session' specialInstruction: $ref: '#/components/schemas/SpecialInstruction' status: $ref: '#/components/schemas/OrderStatus' statusDescription: example: string type: string stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' tag: example: string type: string taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object Execution: properties: activityType: example: '''EXECUTION'' or ''ORDER_ACTION''' type: string executionLegs: items: properties: legId: example: 0 type: number mismarkedQuantity: example: 0 type: number price: example: 0 type: number quantity: example: 0 type: number time: example: string type: string type: object type: array executionType: example: FILL type: string orderRemainingQuantity: example: 0 type: number quantity: example: 0 type: number type: object OptionType: enum: - VANILLA - BINARY - BARRIER example: '''VANILLA'' or ''BINARY'' or ''BARRIER''' type: string Order: properties: accountId: example: 0 type: number activationPrice: example: 0 type: number cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object cancelable: type: boolean childOrderStrategies: items: properties: cancelTime: properties: date: example: string type: string shortFormat: type: boolean type: object complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' filledQuantity: example: 0 type: number orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number requestedDestination: $ref: '#/components/schemas/DestinationExchange' session: $ref: '#/components/schemas/Session' stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object type: array closeTime: example: string type: string complexOrderStrategyType: $ref: '#/components/schemas/ComplexOrderStrategyType' destinationLinkName: example: string type: string duration: $ref: '#/components/schemas/Duration' editable: type: boolean enteredTime: example: string type: string filledQuantity: example: 0 type: number orderActivityCollection: items: $ref: '#/components/schemas/Execution' type: array orderId: example: 0 type: number orderLegCollection: items: properties: instruction: $ref: '#/components/schemas/Instruction' instrument: $ref: '#/components/schemas/InstrumentType' legId: example: 0 type: number orderLegType: $ref: '#/components/schemas/OrderType' positionEffect: $ref: '#/components/schemas/PositionEffect' quantity: example: 0 type: number quantityType: $ref: '#/components/schemas/QuantityType' type: object type: array orderStrategyType: $ref: '#/components/schemas/OrderStrategyType' orderType: $ref: '#/components/schemas/OrderType' price: example: 0 type: number priceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' priceLinkType: $ref: '#/components/schemas/PriceLinkType' quantity: example: 0 type: number releaseTime: example: string type: string remainingQuantity: example: 0 type: number replacingOrderCollection: items: type: object type: array requestedDestination: $ref: '#/components/schemas/DestinationExchange' session: $ref: '#/components/schemas/Session' specialInstruction: $ref: '#/components/schemas/SpecialInstruction' status: $ref: '#/components/schemas/OrderStatus' statusDescription: example: string type: string stopPrice: example: 0 type: number stopPriceLinkBasis: $ref: '#/components/schemas/PriceLinkBasis' stopPriceLinkType: $ref: '#/components/schemas/PriceLinkType' stopPriceOffset: example: 0 type: number stopType: $ref: '#/components/schemas/StopType' tag: example: string type: string taxLotMethod: $ref: '#/components/schemas/TaxLotMethod' type: object CashEquivalent: properties: assetType: $ref: '#/components/schemas/AssetType' cusip: example: string type: string description: example: string type: string symbol: example: string type: string type: example: '''SAVINGS'' or ''MONEY_MARKET_FUND''' type: string type: object AssetType: enum: - EQUITY - OPTION - FUTURE_OPTION - INDICATOR - FOREX - MUTUAL_FUND - INDEX - CASH_EQUIVALENT - FIXED_INCOME - CURRENCY - ETF - BOND - UNKNOWN example: '''EQUITY'' or ''OPTION'' or ''INDEX'' or ''MUTUAL_FUND'' or ''CASH_EQUIVALENT'' or ''FIXED_INCOME'' or ''CURRENCY''' type: string PutOrCall: enum: - PUT - CALL - ALL example: '''PUT'' or ''CALL'' or ''ALL''' type: string Account: properties: securitiesAccount: $ref: '#/components/schemas/AccountType' type: object requestBodies: Order: content: application/json: schema: $ref: '#/components/schemas/Order' description: The order to place. securitySchemes: Bearer: type: apiKey name: Authorization in: header externalDocs: description: Find out more about Swagger url: http://swagger.io