Actions13
- Accounts Actions
- Orders Actions
- Transactions Actions
- User Preference Actions
Overview
This node interacts with the Schwab Trader API to retrieve orders based on specified query parameters. Specifically, the "Get Orders By Query Param" operation allows users to fetch a list of orders filtered by criteria such as time range, status, and maximum number of results.
Common scenarios where this node is beneficial include:
- Retrieving recent trading orders within a specific timeframe for reporting or analysis.
- Filtering orders by their status (e.g., only filled or pending orders) to monitor trading activity.
- Limiting the number of returned orders to manage data volume in workflows.
Practical example: A user wants to get all orders entered between two dates that are currently "WORKING" status, limiting the results to 1000 orders, to feed into a dashboard showing active trades.
Properties
| Name | Meaning |
|---|---|
| Max Results | The maximum number of orders to retrieve. Default is 3000. If set to 0, it may imply no explicit limit. |
| From Entered Time | Required. Specifies the start of the time window; no orders entered before this ISO-8601 timestamp will be returned. Must be within 60 days from today's date. Requires 'To Entered Time' to also be set. |
| To Entered Time | Required. Specifies the end of the time window; no orders entered after this ISO-8601 timestamp will be returned. Requires 'From Entered Time' to also be set. |
| Status | Optional. Filters orders by their status. Possible values include: AWAITING_PARENT_ORDER, AWAITING_CONDITION, AWAITING_STOP_CONDITION, AWAITING_MANUAL_REVIEW, ACCEPTED, AWAITING_UR_OUT, PENDING_ACTIVATION, QUEUED, WORKING, REJECTED, PENDING_CANCEL, CANCELED, PENDING_REPLACE, REPLACED, FILLED, EXPIRED, NEW, AWAITING_RELEASE_TIME, PENDING_ACKNOWLEDGEMENT, PENDING_RECALL, UNKNOWN. |
| Additional Headers | Optional. Allows adding custom HTTP headers to the API request. Useful for sending extra metadata or third-party identifiers. Authorization headers are handled automatically and should not be added here. |
Output
The node outputs an array of JSON objects representing the orders retrieved from the Schwab Trader API. Each item corresponds to one order with its full details as returned by the API.
If multiple orders are returned, each is output as a separate item in the workflow.
No binary data output is produced by this node.
Example output structure (simplified):
{
"orderId": "123456",
"status": "WORKING",
"enteredTime": "2024-05-01T10:00:00.000Z",
"symbol": "AAPL",
"quantity": 100,
"price": 150.25,
...
}
In case of errors (e.g., API failure), the output contains an error object with details about the failure, including HTTP status code and message, if "Continue On Fail" is enabled.
Dependencies
- Requires an OAuth2 API credential configured for authenticating with the Schwab Trader API.
- The node sends requests to
https://api.schwabapi.com/trader/v1. - No other external dependencies are required.
- The user must ensure valid OAuth2 credentials and appropriate permissions to access order data.
Troubleshooting
- Missing or invalid OAuth2 credentials: The node will fail authentication. Ensure the OAuth2 credential is correctly set up and authorized.
- Invalid date formats for 'From Entered Time' or 'To Entered Time': Dates must be in valid ISO-8601 format and within 60 days from the current date. Incorrect formats or out-of-range dates will cause API errors.
- Missing required parameters: Both 'From Entered Time' and 'To Entered Time' are mandatory. Omitting either will result in an error.
- API rate limits or network issues: May cause request failures. Check network connectivity and API usage limits.
- Unexpected API responses: If the API returns non-JSON or malformed data, parsing errors may occur.
- Custom headers misuse: Adding authorization headers manually in "Additional Headers" can cause conflicts; these should be omitted as authorization is handled automatically.
Error messages typically include HTTP status codes and descriptive messages from the API. Reviewing these helps identify issues like unauthorized access, bad requests, or server errors.