Actions13
- Accounts Actions
- Orders Actions
- Transactions Actions
- User Preference Actions
Overview
This node integrates with the Schwab Trader API, allowing users to perform various operations on Schwab resources. Specifically, for the Orders resource and the Cancel Order operation, it enables cancelling an existing order by sending a properly authenticated request to the Schwab API.
Common scenarios where this node is beneficial include:
- Automating order management workflows in trading systems.
- Integrating Schwab order cancellation into larger automation pipelines.
- Quickly cancelling orders based on external triggers or conditions without manual intervention.
For example, a user might set up a workflow that cancels an order automatically if certain market conditions are met or if a related event occurs in another system.
Properties
| Name | Meaning |
|---|---|
| Account Number | The encrypted ID of the account associated with the order to be cancelled. |
| Order Id | The unique identifier of the order that needs to be cancelled. |
| Additional Headers | Optional custom HTTP headers to include in the API request. Useful for adding extra metadata or client-specific identifiers. Authorization headers are handled automatically. |
Output
The node outputs the JSON response returned by the Schwab API after attempting to cancel the order. This typically includes confirmation details about the cancellation or error information if the cancellation failed.
- The output is structured as an array of items, each containing a
jsonfield with the API response data. - If the API returns multiple objects (e.g., a list), each object is output as a separate item.
- In case of errors, the output contains an
errorfield describing the issue along with status codes and request details if "Continue On Fail" is enabled. - The node does not output binary data.
Dependencies
- Requires an OAuth2 API credential configured for Schwab's Trader API to authenticate requests.
- The base URL for requests is fixed to Schwab's API endpoint:
https://api.schwabapi.com/trader/v1. - No other external dependencies are required.
Troubleshooting
- No routing found for operation: This error indicates that the node configuration references an unsupported operation-resource combination. Verify that the Resource is set to "Orders" and Operation to "Cancel Order".
- Authentication errors: If the OAuth2 token is invalid or expired, the API will reject requests. Ensure the OAuth2 credentials are correctly set up and refreshed.
- Invalid input parameters: Missing or incorrect
Account NumberorOrder Idcan cause the API to fail. Double-check these values. - API rate limits or downtime: Network or API service issues may cause request failures. Review error messages and retry as needed.
- When "Continue On Fail" is enabled, errors are returned as part of the output instead of stopping execution, which helps in bulk processing scenarios.
Links and References
- Schwab Trader API Documentation (official API docs)
- n8n OAuth2 Credential Setup
- n8n Node Development Guide