Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

TD Ameritrade Accounts and Trading API

The Accounts and Trading API from TD Ameritrade — 7 operation(s) for accounts and trading.

TD Ameritrade Accounts and Trading API is one of 15 APIs that TD Ameritrade publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Accounts and Trading. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and authentication docs.

This API exposes 13 operations across 7 paths, and defines 32 schemas. It is described by OpenAPI 3.0.0, at version 3.0.1.

Requests are made against 2 base URLs: https://api.tdameritrade.com/v2, http://api.tdameritrade.com/v2.

13 operations 7 paths 32 schemas 2 DELETE7 GET2 POST2 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.0.0
API Version
3.0.1
Base URL
https://api.tdameritrade.com/v1
Authentication
API Key
Terms of Service
Resource Areas
1

Authentication & Security 1

TD Ameritrade Accounts and Trading API declares 1 security scheme for authenticating requests. An API key is passed in the header as Authorization (Bearer).

Paths & Operations 13

Across 7 paths, the API surfaces 13 operations — 2 DELETE, 7 GET, 2 POST, 2 PUT. Each is listed below with its method, path, parameters, and response codes.

Accounts and Trading 13
DELETE
/accounts/{accountId}/orders/{orderId}
Cancel Order
cancelOrder 2 params → 400401403404500
PUT
/accounts/{accountId}/orders/{orderId}
Replace Order
replaceOrder 2 params body → 400401403404500
GET
/accounts/{accountId}/orders/{orderId}
Get Order
getOrder 2 params → 200400401403500
GET
/accounts/{accountId}/orders
Get Orders By Path
getOrdersByPath 5 params → 200400401403500
POST
/accounts/{accountId}/orders
Place Order
placeOrder 1 param body → 200400401403500
GET
/orders
Get Orders By Query
getOrdersByQuery 5 params → 400401403500
GET
/accounts/{accountId}/savedorders
Get Saved Orders by Path
getSavedOrdersByPath 1 param → 200400401403500
POST
/accounts/{accountId}/savedorders
Create Saved Order
saveOrder 2 params body → 400401403500
DELETE
/accounts/{accountId}/savedorders/{savedOrderId}
Delete Saved Order
deleteSavedOrder 2 params → 400401403500
GET
/accounts/{accountId}/savedorders/{savedOrderId}
Get Saved Order
getSavedOrder 2 params → 200400401403500
PUT
/accounts/{accountId}/savedorders/{savedOrderId}
Replace Saved Order
replaceSavedOrder 2 params body → 400401403404500
GET
/accounts/{accountId}
Get Account
getAccount 1 param → 200400401403500
GET
/accounts
Get Accounts
getAccounts → 200207400401403500

Schemas 32

The contract defines 32 schemas that model the data the API accepts and returns. The most detailed are SavedOrder (37 properties), Order (36 properties), MarginAccount (10 properties), CashAccount (10 properties). Each schema is shown below with its type and property counts.

CashAccount
object
10 properties
QuantityType
string
Option
object
9 properties
FixedIncome
object
7 properties
MarginAccount
object
10 properties
PriceLinkBasis
string
AccountType
object
MutualFund
object
5 properties
InstrumentType
object
Equity
object
4 properties
StopType
string
PositionEffect
string
TaxLotMethod
string
Duration
string
Instruction
string
Session
string
OrderType
string
SpecialInstruction
string
OrderStatus
string
DestinationExchange
string
PriceLinkType
string
CurrencyType
string
ComplexOrderStrategyType
string
OrderStrategyType
string
SavedOrder
object
37 properties
Execution
object
5 properties
OptionType
string
Order
object
36 properties
CashEquivalent
object
5 properties
AssetType
string
PutOrCall
string
Account
object
1 property

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

td-ameritrade-accounts-and-trading-api-openapi.yml Raw ↑

Other APIs TD Ameritrade publishes across the network.

TD Ameritrade Market Data API
TD Ameritrade Instruments API
TD Ameritrade Authentication API
TD Ameritrade Streaming Market Data API
TD Ameritrade Authentication API
TD Ameritrade Instruments API
TD Ameritrade Market Hours API
TD Ameritrade Movers API
TD Ameritrade Option Chains API
TD Ameritrade Price History API
TD Ameritrade Quotes API
TD Ameritrade Transaction History API