Charles Schwab Trader API

App · 19 actions

Read Schwab brokerage accounts, positions, orders, transactions, quotes, option chains and market data.

Actions

ActionWhat it does
Get accountGet account.
Get instrument by cusipGet instrument by cusip.
Get market hoursGet market hours.
Get market hours for marketGet market hours for market.
Get moversGet movers.
Get option chainGet option chain.
Get option expirationsGet option expirations.
Get orderGet order.
Get price historyGet price history.
Get quoteGet quote.
Get quotesGet quotes.
Get transactionGet transaction.
Get user preferencesGet user preferences.
List account numbersList account numbers.
List account ordersList account orders.
List accountsList accounts.
List ordersList orders.
List transactionsList transactions.
Search instrumentsSearch instruments.

Get account

Get account.

Inputs

Accountaccount_hashtextRequired
Account.
Fieldsfieldstext
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 idcusip_idtextRequired
Cusip id.

Outputs

dataobject
The service response, including pagination metadata when present.
Example output
{
  "data": {
    "instruments": []
  }
}

Get market hours

Get market hours.

Inputs

MarketsmarketslistRequired
Markets.One or more of: equity, option, bond, future, forex.
Datedatedate
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 idmarket_idtextRequired
Market id.One of: equity, option, bond, future, forex.
Datedatedate
Date.

Outputs

dataobject
The service response, including pagination metadata when present.
Example output
{
  "data": {}
}

Get movers

Get movers.

Inputs

SymbolsymboltextRequired
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).
Sortsorttext
Sort.One of: VOLUME, TRADES, PERCENT_CHANGE_UP (Percent change up), PERCENT_CHANGE_DOWN (Percent change down).
Candle intervalfrequencynumber
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

SymbolsymboltextRequired
Symbol.
Contract typecontractTypetext
Contract type.One of: CALL, PUT, ALL.
Strikes to includestrikeCountnumber
Strikes to include.At least 1.
Include underlying quoteincludeUnderlyingQuotetrue/false
Include underlying quote.
Strategystrategytext
Strategy.One of: SINGLE, ANALYTICAL, COVERED, VERTICAL, CALENDAR, STRANGLE, STRADDLE, BUTTERFLY, CONDOR, DIAGONAL, COLLAR, ROLL.
Strikestrikenumber
Strike.At least 0.
Expiring on or afterfromDatedate
Expiring on or after.
Expiring on or beforetoDatedate
Expiring on or before.
Rangerangetext
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

SymbolsymboltextRequired
Symbol.

Outputs

dataobject
The service response, including pagination metadata when present.
Example output
{
  "data": {
    "expirationList": []
  }
}

Get order

Get order.

Inputs

Accountaccount_hashtextRequired
Account.
Order idorder_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

SymbolsymboltextRequired
Symbol.
Period unitperiodTypetext
Period unit.One of: day, month, year, ytd.
Periodperiodnumber
Period.At least 1.
Candle interval unitfrequencyTypetext
Candle interval unit.One of: minute, daily, weekly, monthly.
Candle intervalfrequencynumber
Candle interval.One of: 1, 5, 10, 15, 30.
Starting atstartDatedate and time
Starting at.
Ending atendDatedate and time
Ending at.
Include extended hoursneedExtendedHoursDatatrue/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

SymbolsymboltextRequired
Symbol.

Outputs

dataobject
The service response, including pagination metadata when present.
Example output
{
  "data": {}
}

Get quotes

Get quotes.

Inputs

SymbolssymbolslistRequired
Symbols.
Fieldsfieldslist
Fields.One or more of: quote, fundamental, extended, reference, regular.
Indicativeindicativetrue/false
Indicative.

Outputs

dataobject
The service response, including pagination metadata when present.
Example output
{
  "data": {}
}

Get transaction

Get transaction.

Inputs

Accountaccount_hashtextRequired
Account.
Transaction idtransaction_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

Accountaccount_hashtextRequired
Account.
Orders entered afterfromEnteredTimedate and timeRequired
Only orders entered on or after this time. Use a start within the last 60 days.
Orders entered beforetoEnteredTimedate and timeRequired
Orders entered before.
Maximum ordersmaxResultsnumber
Maximum orders to return. Narrow the time range if the result reaches this limit.From 1 to 3000.
Statusstatustext
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

Fieldsfieldstext
Fields.One of: positions.

Outputs

datalist
The service response, including pagination metadata when present.
Example output
{
  "data": []
}

List orders

List orders.

Inputs

Orders entered afterfromEnteredTimedate and timeRequired
Only orders entered on or after this time. Use a start within the last 60 days.
Orders entered beforetoEnteredTimedate and timeRequired
Orders entered before.
Maximum ordersmaxResultsnumber
Maximum orders to return. Narrow the time range if the result reaches this limit.From 1 to 3000.
Statusstatustext
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

Accountaccount_hashtextRequired
Account.
Starting atstartDatedate and timeRequired
Starting at.
Ending atendDatedate and timeRequired
Ending at.
TypestypeslistRequired
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.
Symbolsymboltext
Symbol.

Outputs

datalist
The service response, including pagination metadata when present.
Example output
{
  "data": []
}

Search instruments

Search instruments.

Inputs

SymbolsymboltextRequired
Symbol.
ProjectionprojectiontextRequired
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": []
  }
}

On this page