# Charles Schwab Trader API

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

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/charles-schwab

## Actions

### Get account

Get account.

**Inputs**

- Account (`account_hash`, text, required): Account.
- Fields (`fields`, text): Fields. One of: `positions`.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "securitiesAccount": {
      "accountNumber": "example",
      "positions": []
    }
  }
}
```

### Get instrument by cusip

Get instrument by cusip.

**Inputs**

- Cusip id (`cusip_id`, text, required): Cusip id.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "instruments": []
  }
}
```

### Get market hours

Get market hours.

**Inputs**

- Markets (`markets`, list, required): Markets. One or more of: `equity`, `option`, `bond`, `future`, `forex`.
- Date (`date`, date): Date.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {}
}
```

### Get market hours for market

Get market hours for market.

**Inputs**

- Market id (`market_id`, text, required): Market id. One of: `equity`, `option`, `bond`, `future`, `forex`.
- Date (`date`, date): Date.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {}
}
```

### Get movers

Get movers.

**Inputs**

- Symbol (`symbol`, text, required): 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 (`sort`, text): Sort. One of: `VOLUME`, `TRADES`, `PERCENT_CHANGE_UP` (Percent change up), `PERCENT_CHANGE_DOWN` (Percent change down).
- Candle interval (`frequency`, number): Candle interval. One of: `0`, `1`, `5`, `10`, `30`, `60`.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "screeners": []
  }
}
```

### Get option chain

Get option chain.

**Inputs**

- Symbol (`symbol`, text, required): Symbol.
- Contract type (`contractType`, text): Contract type. One of: `CALL`, `PUT`, `ALL`.
- Strikes to include (`strikeCount`, number): Strikes to include. At least 1.
- Include underlying quote (`includeUnderlyingQuote`, true/false): Include underlying quote.
- Strategy (`strategy`, text): Strategy. One of: `SINGLE`, `ANALYTICAL`, `COVERED`, `VERTICAL`, `CALENDAR`, `STRANGLE`, `STRADDLE`, `BUTTERFLY`, `CONDOR`, `DIAGONAL`, `COLLAR`, `ROLL`.
- Strike (`strike`, number): Strike. At least 0.
- Expiring on or after (`fromDate`, date): Expiring on or after.
- Expiring on or before (`toDate`, date): Expiring on or before.
- Range (`range`, text): Range. One of: `ITM`, `NTM`, `OTM`, `SAK`, `SBK`, `SNK`, `ALL`.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "callExpDateMap": {},
    "putExpDateMap": {},
    "status": "example",
    "symbol": "example"
  }
}
```

### Get option expirations

Get option expirations.

**Inputs**

- Symbol (`symbol`, text, required): Symbol.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "expirationList": []
  }
}
```

### Get order

Get order.

**Inputs**

- Account (`account_hash`, text, required): Account.
- Order id (`order_id`, text, required): Order id.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "orderId": 1,
    "status": "example"
  }
}
```

### Get price history

Get price history.

**Inputs**

- Symbol (`symbol`, text, required): Symbol.
- Period unit (`periodType`, text): Period unit. One of: `day`, `month`, `year`, `ytd`.
- Period (`period`, number): Period. At least 1.
- Candle interval unit (`frequencyType`, text): Candle interval unit. One of: `minute`, `daily`, `weekly`, `monthly`.
- Candle interval (`frequency`, number): Candle interval. One of: `1`, `5`, `10`, `15`, `30`.
- Starting at (`startDate`, date and time): Starting at.
- Ending at (`endDate`, date and time): Ending at.
- Include extended hours (`needExtendedHoursData`, true/false): Include extended hours.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "candles": [],
    "empty": false,
    "symbol": "example"
  }
}
```

### Get quote

Get quote.

**Inputs**

- Symbol (`symbol`, text, required): Symbol.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {}
}
```

### Get quotes

Get quotes.

**Inputs**

- Symbols (`symbols`, list, required): Symbols.
- Fields (`fields`, list): Fields. One or more of: `quote`, `fundamental`, `extended`, `reference`, `regular`.
- Indicative (`indicative`, true/false): Indicative.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {}
}
```

### Get transaction

Get transaction.

**Inputs**

- Account (`account_hash`, text, required): Account.
- Transaction id (`transaction_id`, text, required): Transaction id.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "activityId": 1,
    "type": "example"
  }
}
```

### Get user preferences

Get user preferences.

**Inputs**: None.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "accounts": []
  }
}
```

### List account numbers

List account numbers.

**Inputs**: None.

**Outputs**

- `data` (list): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": []
}
```

### List account orders

List account orders.

**Inputs**

- Account (`account_hash`, text, required): Account.
- Orders entered after (`fromEnteredTime`, date and time, required): Only orders entered on or after this time. Use a start within the last 60 days.
- Orders entered before (`toEnteredTime`, date and time, required): Orders entered before.
- Maximum orders (`maxResults`, number): Maximum orders to return. Narrow the time range if the result reaches this limit. From 1 to 3000.
- Status (`status`, text): 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**

- `data` (list): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": []
}
```

### List accounts

List accounts.

**Inputs**

- Fields (`fields`, text): Fields. One of: `positions`.

**Outputs**

- `data` (list): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": []
}
```

### List orders

List orders.

**Inputs**

- Orders entered after (`fromEnteredTime`, date and time, required): Only orders entered on or after this time. Use a start within the last 60 days.
- Orders entered before (`toEnteredTime`, date and time, required): Orders entered before.
- Maximum orders (`maxResults`, number): Maximum orders to return. Narrow the time range if the result reaches this limit. From 1 to 3000.
- Status (`status`, text): 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**

- `data` (list): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": []
}
```

### List transactions

List transactions.

**Inputs**

- Account (`account_hash`, text, required): Account.
- Starting at (`startDate`, date and time, required): Starting at.
- Ending at (`endDate`, date and time, required): Ending at.
- Types (`types`, list, required): 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 (`symbol`, text): Symbol.

**Outputs**

- `data` (list): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": []
}
```

### Search instruments

Search instruments.

**Inputs**

- Symbol (`symbol`, text, required): Symbol.
- Projection (`projection`, text, required): Projection. One of: `symbol-search`, `symbol-regex`, `desc-search`, `desc-regex`, `search`, `fundamental`.

**Outputs**

- `data` (object): The service response, including pagination metadata when present.

**Example output**

```json
{
  "data": {
    "instruments": []
  }
}
```
