Charles Schwab Trader API
App · 19 actions
Read Schwab brokerage accounts, positions, orders, transactions, quotes, option chains and market data.
Actions
| Action | What it does |
|---|---|
| Get account | Get account. |
| Get instrument by cusip | Get instrument by cusip. |
| Get market hours | Get market hours. |
| Get market hours for market | Get market hours for market. |
| Get movers | Get movers. |
| Get option chain | Get option chain. |
| Get option expirations | Get option expirations. |
| Get order | Get order. |
| Get price history | Get price history. |
| Get quote | Get quote. |
| Get quotes | Get quotes. |
| Get transaction | Get transaction. |
| Get user preferences | Get user preferences. |
| List account numbers | List account numbers. |
| List account orders | List account orders. |
| List accounts | List accounts. |
| List orders | List orders. |
| List transactions | List transactions. |
| Search instruments | Search instruments. |
Get account
Get account.
Inputs
- Account
account_hashtextRequired - Account.
- Fields
fieldstext - Fields.One of:
positions.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"securitiesAccount": {
"accountNumber": "example",
"positions": []
}
}
}Get instrument by cusip
Get instrument by cusip.
Inputs
- Cusip id
cusip_idtextRequired - Cusip id.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"instruments": []
}
}Get market hours
Get market hours.
Inputs
- Markets
marketslistRequired - Markets.One or more of:
equity,option,bond,future,forex. - Date
datedate - Date.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {}
}Get market hours for market
Get market hours for market.
Inputs
- Market id
market_idtextRequired - Market id.One of:
equity,option,bond,future,forex. - Date
datedate - Date.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {}
}Get movers
Get movers.
Inputs
- Symbol
symboltextRequired - Symbol.One of:
$DJI,$COMPX,$SPX,NYSE,NASDAQ,OTCBB,INDEX_ALL(Index all),EQUITY_ALL(Equity all),OPTION_ALL(Option all),OPTION_PUT(Option put),OPTION_CALL(Option call). - Sort
sorttext - Sort.One of:
VOLUME,TRADES,PERCENT_CHANGE_UP(Percent change up),PERCENT_CHANGE_DOWN(Percent change down). - Candle interval
frequencynumber - Candle interval.One of:
0,1,5,10,30,60.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"screeners": []
}
}Get option chain
Get option chain.
Inputs
- Symbol
symboltextRequired - Symbol.
- Contract type
contractTypetext - Contract type.One of:
CALL,PUT,ALL. - Strikes to include
strikeCountnumber - Strikes to include.At least 1.
- Include underlying quote
includeUnderlyingQuotetrue/false - Include underlying quote.
- Strategy
strategytext - Strategy.One of:
SINGLE,ANALYTICAL,COVERED,VERTICAL,CALENDAR,STRANGLE,STRADDLE,BUTTERFLY,CONDOR,DIAGONAL,COLLAR,ROLL. - Strike
strikenumber - Strike.At least 0.
- Expiring on or after
fromDatedate - Expiring on or after.
- Expiring on or before
toDatedate - Expiring on or before.
- Range
rangetext - Range.One of:
ITM,NTM,OTM,SAK,SBK,SNK,ALL.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"callExpDateMap": {},
"putExpDateMap": {},
"status": "example",
"symbol": "example"
}
}Get option expirations
Get option expirations.
Inputs
- Symbol
symboltextRequired - Symbol.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"expirationList": []
}
}Get order
Get order.
Inputs
- Account
account_hashtextRequired - Account.
- Order id
order_idtextRequired - Order id.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"orderId": 1,
"status": "example"
}
}Get price history
Get price history.
Inputs
- Symbol
symboltextRequired - Symbol.
- Period unit
periodTypetext - Period unit.One of:
day,month,year,ytd. - Period
periodnumber - Period.At least 1.
- Candle interval unit
frequencyTypetext - Candle interval unit.One of:
minute,daily,weekly,monthly. - Candle interval
frequencynumber - Candle interval.One of:
1,5,10,15,30. - Starting at
startDatedate and time - Starting at.
- Ending at
endDatedate and time - Ending at.
- Include extended hours
needExtendedHoursDatatrue/false - Include extended hours.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"candles": [],
"empty": false,
"symbol": "example"
}
}Get quote
Get quote.
Inputs
- Symbol
symboltextRequired - Symbol.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {}
}Get quotes
Get quotes.
Inputs
- Symbols
symbolslistRequired - Symbols.
- Fields
fieldslist - Fields.One or more of:
quote,fundamental,extended,reference,regular. - Indicative
indicativetrue/false - Indicative.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {}
}Get transaction
Get transaction.
Inputs
- Account
account_hashtextRequired - Account.
- Transaction id
transaction_idtextRequired - Transaction id.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"activityId": 1,
"type": "example"
}
}Get user preferences
Get user preferences.
Inputs
None.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"accounts": []
}
}List account numbers
List account numbers.
Inputs
None.
Outputs
datalist- The service response, including pagination metadata when present.
Example output
{
"data": []
}List account orders
List account orders.
Inputs
- Account
account_hashtextRequired - Account.
- Orders entered after
fromEnteredTimedate and timeRequired - Only orders entered on or after this time. Use a start within the last 60 days.
- Orders entered before
toEnteredTimedate and timeRequired - Orders entered before.
- Maximum orders
maxResultsnumber - Maximum orders to return. Narrow the time range if the result reaches this limit.From 1 to 3000.
- Status
statustext - Status.One of:
AWAITING_PARENT_ORDER(Awaiting parent order),AWAITING_CONDITION(Awaiting condition),AWAITING_STOP_CONDITION(Awaiting stop condition),AWAITING_MANUAL_REVIEW(Awaiting manual review),ACCEPTED,AWAITING_UR_OUT(Awaiting ur out),PENDING_ACTIVATION(Pending activation),QUEUED,WORKING,REJECTED, and 11 more.
Outputs
datalist- The service response, including pagination metadata when present.
Example output
{
"data": []
}List accounts
List accounts.
Inputs
- Fields
fieldstext - Fields.One of:
positions.
Outputs
datalist- The service response, including pagination metadata when present.
Example output
{
"data": []
}List orders
List orders.
Inputs
- Orders entered after
fromEnteredTimedate and timeRequired - Only orders entered on or after this time. Use a start within the last 60 days.
- Orders entered before
toEnteredTimedate and timeRequired - Orders entered before.
- Maximum orders
maxResultsnumber - Maximum orders to return. Narrow the time range if the result reaches this limit.From 1 to 3000.
- Status
statustext - Status.One of:
AWAITING_PARENT_ORDER(Awaiting parent order),AWAITING_CONDITION(Awaiting condition),AWAITING_STOP_CONDITION(Awaiting stop condition),AWAITING_MANUAL_REVIEW(Awaiting manual review),ACCEPTED,AWAITING_UR_OUT(Awaiting ur out),PENDING_ACTIVATION(Pending activation),QUEUED,WORKING,REJECTED, and 11 more.
Outputs
datalist- The service response, including pagination metadata when present.
Example output
{
"data": []
}List transactions
List transactions.
Inputs
- Account
account_hashtextRequired - Account.
- Starting at
startDatedate and timeRequired - Starting at.
- Ending at
endDatedate and timeRequired - Ending at.
- Types
typeslistRequired - Types.One or more of:
TRADE,RECEIVE_AND_DELIVER(Receive and deliver),DIVIDEND_OR_INTEREST(Dividend or interest),ACH_RECEIPT(Ach receipt),ACH_DISBURSEMENT(Ach disbursement),CASH_RECEIPT(Cash receipt),CASH_DISBURSEMENT(Cash disbursement),ELECTRONIC_FUND(Electronic fund),WIRE_OUT(Wire out),WIRE_IN(Wire in), and 5 more. - Symbol
symboltext - Symbol.
Outputs
datalist- The service response, including pagination metadata when present.
Example output
{
"data": []
}Search instruments
Search instruments.
Inputs
- Symbol
symboltextRequired - Symbol.
- Projection
projectiontextRequired - Projection.One of:
symbol-search,symbol-regex,desc-search,desc-regex,search,fundamental.
Outputs
dataobject- The service response, including pagination metadata when present.
Example output
{
"data": {
"instruments": []
}
}