Actions8
- Trading Actions
- Quantitative Account Actions
Overview
This node interacts with the MyPet Stocks quantitative trading system, specifically providing commission statistics for selected quantitative trading accounts over various time scopes. It is useful for traders or portfolio managers who want to analyze commission costs incurred by their trading accounts within specific periods. For example, a user can retrieve commission data for all their accounts during the last month or a custom date range to evaluate trading expenses and optimize strategies.
Properties
| Name | Meaning |
|---|---|
| Time Scope | The time period for which commission statistics are requested. Options: All Time, Today, Yesterday, This Week, Last Week, This Month, Last Month, Custom Range. |
| Accounts | Select one or more quantitative trading accounts to include in the commission statistics. |
| Capital Type | Unit of commission values. Options: USD (Dollar), Cent. |
| Start Date | (Required if Time Scope is "Custom Range") The start date of the custom time range in YYYY-MM-DD format. |
| End Date | (Required if Time Scope is "Custom Range") The end date of the custom time range in YYYY-MM-DD format. |
Output
The output JSON contains the following fields:
message: A status message from the API.code: Numeric code indicating success or failure.cardInfo: Summary card information related to commissions.commissionDetail: Detailed commission statistics per account or category.commissionDayDetail: Daily breakdown of commission statistics.queryParams: The parameters used for the query including scope, accounts, capital type, and optionally start and end dates for custom ranges.
The node does not output binary data.
Dependencies
- Requires an API key credential for the MyPet Stocks API.
- The node uses HTTP requests to the MyPet Stocks API endpoints.
- Proper authentication must be configured using either username/password or token-based methods.
- The base URL for the API and credentials must be set in the node's credential configuration.
Troubleshooting
- Authentication failed: Ensure that the correct authentication method is selected and credentials (username/password or token) are valid.
- No credentials found: Verify that the API key credential is properly configured and assigned to the node.
- At least one account must be selected: When requesting commission statistics, you must select one or more accounts; otherwise, the node will throw an error.
- Start time and end time are required for custom scope: If the time scope is set to "Custom Range," both start and end dates must be provided in the correct format.
- Commission statistics query failed: Check network connectivity, API endpoint availability, and ensure the request parameters are valid.
Links and References
- MyPet Stocks API Documentation (Replace with actual link if available)
- n8n Documentation on Creating Custom Nodes
- General info on quantitative trading and commission analysis tools.